52 lines
1.5 KiB
Groovy
52 lines
1.5 KiB
Groovy
plugins {
|
|
id 'java'
|
|
}
|
|
|
|
def publishScript = file(rootProject.getProjectDir().getPath() + '/publish.gradle')
|
|
if (publishScript.exists()) {
|
|
apply from: publishScript.path
|
|
}
|
|
|
|
project.group = projectGroup
|
|
project.version = projectVersion
|
|
|
|
repositories {
|
|
mavenLocal()
|
|
mavenCentral()
|
|
maven { url 'https://hub.spigotmc.org/nexus/content/groups/public' }
|
|
maven { url 'https://dmx-mc-project.gitlab.io/maven-repository/' }
|
|
}
|
|
|
|
ext {
|
|
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',
|
|
mysql: 'mysql:mysql-connector-java:8.0.22'
|
|
]
|
|
}
|
|
|
|
def compileOnly2(library) {
|
|
dependencies.compileOnly library.lib, {
|
|
library.exclude.each { String excludeLibStr ->
|
|
String[] excludeLib = excludeLibStr.split(':')
|
|
exclude group: excludeLib[0], module: excludeLib[1]
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compileOnly libs.lombok
|
|
annotationProcessor libs.lombok
|
|
|
|
compileOnly2 libs.bukkit
|
|
compileOnly libs.mysql
|
|
implementation libs.commons_text
|
|
implementation libs.reflection_object
|
|
} |