0

Merge commit 'd3bae13c351aabb2a106d4ee3be1e824851da33e' into dev/messages

# Conflicts:
#	build.gradle
This commit is contained in:
2021-10-08 10:18:00 +03:00
6 changed files with 32 additions and 64 deletions

2
.gitattributes vendored
View File

@@ -4,4 +4,4 @@ gradlew.bat text eol=crlf
gradle/wrapper/gradle-wrapper.properties text eol=lf gradle/wrapper/gradle-wrapper.properties text eol=lf
# Other # Other
.gitattributes text eol=lf .gitattributes text eol=lf

1
.gitignore vendored
View File

@@ -9,4 +9,3 @@ out/
# GRADLE # # GRADLE #
.gradle/ .gradle/
build/ build/
publish.gradle

View File

@@ -3,13 +3,14 @@ plugins {
id 'jacoco' id 'jacoco'
} }
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()
@@ -18,61 +19,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 {

View File

@@ -1,3 +0,0 @@
projectGroup=ghast
projectName=ghast-tools
projectVersion=1.12.1

View File

@@ -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

View File

@@ -1 +1 @@
rootProject.name=projectName rootProject.name = 'ghast-tools'