TabooLib/build.gradle

70 lines
2.2 KiB
Groovy
Raw Normal View History

2019-03-02 07:48:21 +00:00
plugins {
id 'java'
id 'scala'
id 'idea'
id 'com.github.johnrengelman.shadow' version '4.0.4'
}
2019-09-18 15:57:04 +00:00
2019-03-02 07:48:21 +00:00
group = 'me.skymc'
2019-10-06 09:43:37 +00:00
version = '5.08'
2019-03-02 07:48:21 +00:00
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')
}
2019-06-24 08:59:45 +00:00
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.8'
2019-04-01 13:45:49 +00:00
compile group: 'org.ow2.asm', name: 'asm', version: '7.0-beta'
compile group: 'com.google.code.gson', name: 'gson', version: '2.7'
2019-07-10 14:03:31 +00:00
compile subprojects
shadow group: 'com.zaxxer', name: 'HikariCP', version: '3.1.0'
2019-03-02 07:48:21 +00:00
shadow group: 'org.scala-lang', name: 'scala-library', version: '2.12.8'
shadow group: 'me.clip', name: 'placeholderapi', version: '2.8.4'
2019-07-10 14:51:49 +00:00
shadow group: 'com.google.inject', name: 'guice', version: '4.2.2'
2019-03-02 07:48:21 +00:00
shadow fileTree(dir: 'libs', includes: ['*.jar'])
}
shadowJar {
2019-07-10 14:36:16 +00:00
// 免得 MANIFEST.MF 里面刷一堆 lib 难看
taskActions.removeIf { it.actionClassName.contains 'configureShadowTask' }
2019-07-10 13:45:12 +00:00
2019-07-10 14:03:31 +00:00
// 免得 MANIFEST.MF 里面刷一堆 lib 难看
taskActions.removeIf { it.actionClassName.contains 'configureShadowTask' }
2019-07-10 13:45:12 +00:00
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:.*')
}
2019-07-08 06:37:31 +00:00
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'
2019-04-01 13:45:49 +00:00
}
processResources {
inputs.property "version", project.version
from(sourceSets.main.resources.srcDirs) {
2019-07-14 11:22:48 +00:00
include '__resources__/version'
2019-08-02 02:36:01 +00:00
include 'plugin.yml'
2019-04-01 13:45:49 +00:00
expand 'version': project.version
}
2019-03-02 07:48:21 +00:00
}