diff options
Diffstat (limited to 'build.gradle')
| -rw-r--r-- | build.gradle | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/build.gradle b/build.gradle index 7d1e4196..34573cf0 100644 --- a/build.gradle +++ b/build.gradle | |||
| @@ -19,14 +19,12 @@ apply plugin: 'com.github.johnrengelman.shadow' | |||
| 19 | apply plugin: 'maven' | 19 | apply plugin: 'maven' |
| 20 | 20 | ||
| 21 | group = 'cuchaz' | 21 | group = 'cuchaz' |
| 22 | version = '0.15' | 22 | version = '0.15.1' |
| 23 | 23 | ||
| 24 | def generatedSourcesDir = "$buildDir/generated-src" | 24 | def generatedSourcesDir = "$buildDir/generated-src" |
| 25 | 25 | ||
| 26 | def ENV = System.getenv() | 26 | def ENV = System.getenv() |
| 27 | if (ENV.BUILD_NUMBER) { | 27 | version = version + "+" + (ENV.BUILD_NUMBER ? ("build." + ENV.BUILD_NUMBER) : "local") |
| 28 | version = version + "." + "${System.getenv().BUILD_NUMBER}" | ||
| 29 | } | ||
| 30 | 28 | ||
| 31 | sourceCompatibility = 1.8 | 29 | sourceCompatibility = 1.8 |
| 32 | targetCompatibility = 1.8 | 30 | targetCompatibility = 1.8 |
| @@ -60,6 +58,9 @@ repositories { | |||
| 60 | ivy { | 58 | ivy { |
| 61 | name "darcula" | 59 | name "darcula" |
| 62 | artifactPattern "https://raw.githubusercontent.com/bulenkov/Darcula/master/build/[module].[ext]" | 60 | artifactPattern "https://raw.githubusercontent.com/bulenkov/Darcula/master/build/[module].[ext]" |
| 61 | metadataSources { | ||
| 62 | artifact() | ||
| 63 | } | ||
| 63 | } | 64 | } |
| 64 | } | 65 | } |
| 65 | 66 | ||
| @@ -73,10 +74,10 @@ configurations { | |||
| 73 | dependencies { | 74 | dependencies { |
| 74 | compile 'com.google.guava:guava:28.0-jre' | 75 | compile 'com.google.guava:guava:28.0-jre' |
| 75 | compile 'com.google.code.gson:gson:2.8.5' | 76 | compile 'com.google.code.gson:gson:2.8.5' |
| 76 | compile 'org.ow2.asm:asm:7.1' | 77 | compile 'org.ow2.asm:asm:8.0' |
| 77 | compile 'org.ow2.asm:asm-commons:7.1' | 78 | compile 'org.ow2.asm:asm-commons:8.0' |
| 78 | compile 'org.ow2.asm:asm-tree:7.1' | 79 | compile 'org.ow2.asm:asm-tree:8.0' |
| 79 | compile 'org.ow2.asm:asm-util:7.1' | 80 | compile 'org.ow2.asm:asm-util:8.0' |
| 80 | compile 'net.sf.jopt-simple:jopt-simple:6.0-alpha-3' | 81 | compile 'net.sf.jopt-simple:jopt-simple:6.0-alpha-3' |
| 81 | 82 | ||
| 82 | compile 'net.fabricmc:procyon-fabric-compilertools:0.5.35.+' | 83 | compile 'net.fabricmc:procyon-fabric-compilertools:0.5.35.+' |
| @@ -88,9 +89,11 @@ dependencies { | |||
| 88 | 89 | ||
| 89 | testCompile 'junit:junit:4.+' | 90 | testCompile 'junit:junit:4.+' |
| 90 | testCompile 'org.hamcrest:hamcrest-all:1.+' | 91 | testCompile 'org.hamcrest:hamcrest-all:1.+' |
| 91 | proGuard 'net.sf.proguard:proguard-base:5.+' | 92 | proGuard 'net.sf.proguard:proguard-base:6.+' |
| 92 | } | 93 | } |
| 93 | 94 | ||
| 95 | def libraryJarsArg = JavaVersion.current().java9Compatible ? "<java.home>/jmods": "<java.home>/lib/rt.jar" | ||
| 96 | |||
| 94 | // For each set of test inputs, create an output jar and obfuscate it. | 97 | // For each set of test inputs, create an output jar and obfuscate it. |
| 95 | file('src/test/java/cuchaz/enigma/inputs').listFiles().each { theFile -> | 98 | file('src/test/java/cuchaz/enigma/inputs').listFiles().each { theFile -> |
| 96 | if (theFile.directory) { | 99 | if (theFile.directory) { |
| @@ -110,8 +113,8 @@ file('src/test/java/cuchaz/enigma/inputs').listFiles().each { theFile -> | |||
| 110 | classpath configurations.proGuard | 113 | classpath configurations.proGuard |
| 111 | 114 | ||
| 112 | args '@src/test/resources/proguard-test.conf', '-injars', file('build/test-inputs/' + | 115 | args '@src/test/resources/proguard-test.conf', '-injars', file('build/test-inputs/' + |
| 113 | "${theFile.name}.jar"), '-outjars', file('build/test-obf/' + | 116 | "${theFile.name}.jar"), '-libraryjars', libraryJarsArg, |
| 114 | "${theFile.name}.jar") | 117 | '-outjars', file('build/test-obf/' + "${theFile.name}.jar") |
| 115 | } | 118 | } |
| 116 | 119 | ||
| 117 | test.dependsOn "${theFile.name}TestObf" | 120 | test.dependsOn "${theFile.name}TestObf" |