0

gradle: перенесены зависимости в отдельный файл

This commit is contained in:
2021-01-06 23:29:32 +03:00
parent c47bb2093e
commit c98c5d2c34
2 changed files with 27 additions and 26 deletions

View File

@@ -2,6 +2,8 @@ plugins {
id 'java'
}
apply from: 'libs.gradle'
def publishScript = file(rootProject.getProjectDir().getPath() + '/publish.gradle')
if (publishScript.exists()) {
apply from: publishScript.path
@@ -17,31 +19,6 @@ repositories {
maven { url 'https://dmx-mc-project.gitlab.io/maven-repository/' }
}
ext {
junitVersion = '5.5.2'
libs = [
bukkit: [lib: 'org.bukkit:bukkit:1.12.2-R0.1-SNAPSHOT', exclude: [
'com.google.code.gson:gson',
'com.googlecode.json-simple:json-simple',
'commons-lang:commons-lang',
'org.yaml:snakeyaml'
]],
commons_text: 'org.apache.commons:commons-text:1.9',
lombok: 'org.projectlombok:lombok:1.18.12',
reflection_object: 'ru.dmitriymx:reflection-object:1.0-BETA',
test: [
junit5: [
"org.junit.jupiter:junit-jupiter-api:$junitVersion",
"org.junit.jupiter:junit-jupiter-engine:$junitVersion"
],
mock: ['org.mockito:mockito-core:1.10.19'],
h2db: 'com.h2database:h2:1.4.200'
]
]
}
def compileOnly2(library) {
dependencies.compileOnly library.lib, {
library.exclude.each { String excludeLibStr ->
@@ -66,7 +43,7 @@ dependencies {
compileOnly2 libs.bukkit
implementation libs.commons_text
implementation libs.reflection_object
implementation libs.refobj
testImplementation libs.test.junit5
testImplementation libs.test.mock

24
libs.gradle Normal file
View File

@@ -0,0 +1,24 @@
ext {
versions = [junit: '5.5.2']
libs = [
bukkit : [lib: 'org.bukkit:bukkit:1.12.2-R0.1-SNAPSHOT', exclude: [
'com.google.code.gson:gson',
'com.googlecode.json-simple:json-simple',
'commons-lang:commons-lang',
'org.yaml:snakeyaml'
]],
commons_text: 'org.apache.commons:commons-text:1.9',
lombok : 'org.projectlombok:lombok:1.18.12',
refobj : 'ru.dmitriymx:reflection-object:1.0-BETA',
test : [
junit5: [
"org.junit.jupiter:junit-jupiter-api:$versions.junit",
"org.junit.jupiter:junit-jupiter-engine:$versions.junit"
],
mock : ['org.mockito:mockito-core:1.10.19'],
h2db : 'com.h2database:h2:1.4.200'
]
]
}