anvilauth-injector/build.gradle

55 lines
1.4 KiB
Groovy
Raw Normal View History

2017-08-12 16:42:31 +02:00
plugins {
2018-01-25 12:49:32 +01:00
id 'com.github.johnrengelman.shadow' version '2.0.2'
id 'com.palantir.git-version' version '0.10.0'
2017-08-12 16:42:31 +02:00
id 'java'
}
repositories {
mavenCentral()
2017-08-13 11:43:13 +02:00
maven { url 'https://libraries.minecraft.net/' }
2017-08-12 16:42:31 +02:00
}
dependencies {
2018-01-25 12:49:32 +01:00
compile 'org.ow2.asm:asm:6.0'
compile 'org.yaml:snakeyaml:1.19'
2017-08-13 11:43:13 +02:00
compileOnly ('net.minecraft:launchwrapper:1.12') {
transitive = false
}
2017-08-12 16:42:31 +02:00
testCompile 'junit:junit:4.12'
}
def gitInfo = versionDetails()
2017-08-12 16:42:31 +02:00
sourceCompatibility = 1.8
version = '1.0.' + (System.getenv('BUILD_NUMBER')?:'0-SNAPSHOT') + '-' + gitInfo.gitHashFull[0..6]
if (!gitInfo.isCleanTag) version += '.dirty'
2017-08-12 16:42:31 +02:00
jar {
manifest {
attributes (
'Implementation-Title': project.name,
'Implementation-Version': version,
'Implementation-Vendor': 'to2mbn',
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
'Git-Commit': gitInfo.gitHashFull,
'Git-IsClean': gitInfo.isCleanTag,
2017-08-13 11:43:13 +02:00
'Premain-Class': 'org.to2mbn.authlibinjector.javaagent.AuthlibInjectorPremain',
'TweakClass': 'org.to2mbn.authlibinjector.tweaker.AuthlibInjectorTweaker'
2017-08-12 16:42:31 +02:00
)
}
}
2017-08-13 11:43:13 +02:00
shadowJar {
classifier = null
exclude 'META-INF/maven/**'
relocate 'org.yaml.snakeyaml', 'org.to2mbn.authlibinjector.internal.org.yaml.snakeyaml'
relocate 'org.objectweb.asm', 'org.to2mbn.authlibinjector.internal.org.objectweb.asm'
2017-08-13 11:43:13 +02:00
}
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
defaultTasks 'clean', 'shadowJar'