Merge branch 'dev/gradle' into rc/1.13
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -9,4 +9,3 @@ out/
|
|||||||
# GRADLE #
|
# GRADLE #
|
||||||
.gradle/
|
.gradle/
|
||||||
build/
|
build/
|
||||||
publish.gradle
|
|
||||||
|
|||||||
86
build.gradle
86
build.gradle
@@ -2,13 +2,14 @@ plugins {
|
|||||||
id 'java'
|
id 'java'
|
||||||
}
|
}
|
||||||
|
|
||||||
def publishScript = file(rootProject.getProjectDir().getPath() + '/publish.gradle')
|
project.group = 'ghast'
|
||||||
if (publishScript.exists()) {
|
project.version = '1.12.2-SNAPSHOT'
|
||||||
apply from: publishScript.path
|
jar.archiveBaseName.set(project.name)
|
||||||
}
|
|
||||||
|
|
||||||
project.group = projectGroup
|
compileJava {
|
||||||
project.version = projectVersion
|
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
options.encoding = 'UTF-8'
|
||||||
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
@@ -17,61 +18,32 @@ repositories {
|
|||||||
maven { url 'https://dmx-mc-project.gitlab.io/maven-repository/' }
|
maven { url 'https://dmx-mc-project.gitlab.io/maven-repository/' }
|
||||||
}
|
}
|
||||||
|
|
||||||
ext {
|
def lombokVersion = '1.18.20'
|
||||||
junitVersion = '5.5.2'
|
def junitVersion = '5.8.1'
|
||||||
|
|
||||||
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.2',
|
|
||||||
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 ->
|
|
||||||
String[] excludeLib = excludeLibStr.split(':')
|
|
||||||
exclude group: excludeLib[0], module: excludeLib[1]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def testImplementation2(library) {
|
|
||||||
dependencies.testImplementation library.lib, {
|
|
||||||
library.exclude.each { String excludeLibStr ->
|
|
||||||
String[] excludeLib = excludeLibStr.split(':')
|
|
||||||
exclude group: excludeLib[0], module: excludeLib[1]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly libs.lombok
|
annotationProcessor("org.projectlombok:lombok:$lombokVersion")
|
||||||
annotationProcessor libs.lombok
|
compileOnly("org.projectlombok:lombok:$lombokVersion")
|
||||||
|
|
||||||
compileOnly2 libs.bukkit
|
compileOnly('org.bukkit:bukkit:1.12.2-R0.1-SNAPSHOT') {
|
||||||
implementation libs.commons_text
|
exclude(module: 'gson')
|
||||||
implementation libs.reflection_object
|
exclude(module: 'json-simple')
|
||||||
|
exclude(module: 'commons-lang')
|
||||||
|
exclude(module: 'snakeyaml')
|
||||||
|
}
|
||||||
|
implementation('org.apache.commons:commons-text:1.9')
|
||||||
|
implementation('ru.dmitriymx:reflection-object:1.2')
|
||||||
|
|
||||||
testImplementation libs.test.junit5
|
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitVersion")
|
||||||
testImplementation libs.test.mock
|
testImplementation("org.junit.jupiter:junit-jupiter-engine:$junitVersion")
|
||||||
testImplementation2 libs.bukkit
|
testImplementation('org.mockito:mockito-core:3.12.4')
|
||||||
testImplementation libs.test.h2db
|
testImplementation('org.bukkit:bukkit:1.12.2-R0.1-SNAPSHOT') {
|
||||||
|
exclude(module: 'gson')
|
||||||
|
exclude(module: 'json-simple')
|
||||||
|
exclude(module: 'commons-lang')
|
||||||
|
exclude(module: 'snakeyaml')
|
||||||
|
}
|
||||||
|
testImplementation('com.h2database:h2:1.4.200')
|
||||||
}
|
}
|
||||||
|
|
||||||
test {
|
test {
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
projectGroup=ghast
|
|
||||||
projectName=ghast-tools
|
|
||||||
projectVersion=1.12.1
|
|
||||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
rootProject.name=projectName
|
rootProject.name = 'ghast-tools'
|
||||||
|
|||||||
Reference in New Issue
Block a user