TabooLib/build.gradle
2019-07-10 21:45:12 +08:00

64 lines
1.8 KiB
Groovy

plugins {
id 'java'
id 'scala'
id 'idea'
id 'com.github.johnrengelman.shadow' version '4.0.4'
}
group = 'me.skymc'
version = '5.0'
sourceCompatibility = 1.8
targetCompatibility = 1.8
defaultTasks 'build', 'shadowJar'
tasks.withType(ScalaCompile) {
options.encoding = 'UTF-8'
scalaCompileOptions.encoding = 'UTF-8'
}
repositories {
mavenCentral()
maven { url "http://repo.extendedclip.com/content/repositories/placeholderapi/" }
}
dependencies {
shadow(group: 'org.apache.cassandra', name: 'cassandra-all', version: '0.8.1') {
exclude(module: 'slf4j-log4j12')
exclude(module: 'log4j')
}
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.8'
compile group: 'org.ow2.asm', name: 'asm', version: '7.0-beta'
compile group: 'com.google.code.gson', name: 'gson', version: '2.7'
shadow group: 'com.zaxxer', name: 'HikariCP', version: '3.1.0'
shadow group: 'org.scala-lang', name: 'scala-library', version: '2.12.8'
shadow group: 'me.clip', name: 'placeholderapi', version: '2.8.4'
shadow fileTree(dir: 'libs', includes: ['*.jar'])
}
shadowJar {
dependencies {
it.include it.dependency('org.apache.commons:.*')
it.include it.dependency('org.ow2.asm:.*')
it.include it.dependency('com.google.code.gson:.*')
it.include it.dependency('me.skymc:.*')
}
relocate 'org.apache.commons', 'io.izzel.taboolib.internal.apache'
relocate 'org.objectweb.asm', 'io.izzel.taboolib.internal.asm'
relocate 'com.google.gson', 'io.izzel.taboolib.internal.gson'
}
processResources {
inputs.property "version", project.version
from(sourceSets.main.resources.srcDirs) {
include 'version'
expand 'version': project.version
}
from(sourceSets.main.resources.srcDirs) {
exclude 'version'
}
}