From c98c5d2c3426e2ec2065f58efbe89d07827580bc Mon Sep 17 00:00:00 2001 From: DmitriyMX Date: Wed, 6 Jan 2021 23:29:32 +0300 Subject: [PATCH] =?UTF-8?q?gradle:=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BD=D0=B5?= =?UTF-8?q?=D1=81=D0=B5=D0=BD=D1=8B=20=D0=B7=D0=B0=D0=B2=D0=B8=D1=81=D0=B8?= =?UTF-8?q?=D0=BC=D0=BE=D1=81=D1=82=D0=B8=20=D0=B2=20=D0=BE=D1=82=D0=B4?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BD=D1=8B=D0=B9=20=D1=84=D0=B0=D0=B9=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 29 +++-------------------------- libs.gradle | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 26 deletions(-) create mode 100644 libs.gradle diff --git a/build.gradle b/build.gradle index 0804fb1..d3e550b 100644 --- a/build.gradle +++ b/build.gradle @@ -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 diff --git a/libs.gradle b/libs.gradle new file mode 100644 index 0000000..2ee7fee --- /dev/null +++ b/libs.gradle @@ -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' + ] + ] +} \ No newline at end of file