summaryrefslogtreecommitdiff
path: root/build.gradle
diff options
context:
space:
mode:
authorGravatar Runemoro2020-04-18 09:02:12 -0400
committerGravatar GitHub2020-04-18 14:02:12 +0100
commitaad12650ea7394e315ebe170ceebb345c739577d (patch)
tree130e544e082ec16be80fb17a3855dcead43af957 /build.gradle
parentAdded zoom for PanelEditor (#209) (diff)
downloadenigma-aad12650ea7394e315ebe170ceebb345c739577d.tar.gz
enigma-aad12650ea7394e315ebe170ceebb345c739577d.tar.xz
enigma-aad12650ea7394e315ebe170ceebb345c739577d.zip
Fix a few bugs (#219)
* Update Gradle and replace deprecated Gradle features * Allow naming class in default package (fixes #215) * Fix CFR crash (fixes #207) * Update README.md Co-Authored-By: liach <7806504+liach@users.noreply.github.com> Co-authored-by: liach <7806504+liach@users.noreply.github.com>
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle103
1 files changed, 47 insertions, 56 deletions
diff --git a/build.gradle b/build.gradle
index 34573cf0..e5889c4c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,30 +1,16 @@
1// Do it this way so people with older Gradle can hopefully still build. 1plugins {
2buildscript { 2 id 'java'
3 repositories { 3 id 'com.github.johnrengelman.shadow' version '5.2.0'
4 jcenter() 4 id 'maven-publish'
5 maven {
6 url "https://plugins.gradle.org/m2/"
7 }
8 }
9
10 dependencies {
11 classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.2'
12 }
13} 5}
14 6
15apply plugin: 'java'
16apply plugin: 'eclipse'
17apply plugin: 'idea'
18apply plugin: 'com.github.johnrengelman.shadow'
19apply plugin: 'maven'
20
21group = 'cuchaz' 7group = 'cuchaz'
22version = '0.15.1' 8version = '0.15.1'
23 9
24def generatedSourcesDir = "$buildDir/generated-src" 10def generatedSourcesDir = "$buildDir/generated-src"
25 11
26def ENV = System.getenv() 12def buildNumber = System.getenv("BUILD_NUMBER")
27version = version + "+" + (ENV.BUILD_NUMBER ? ("build." + ENV.BUILD_NUMBER) : "local") 13version = version + "+" + (buildNumber ? "build.$buildNumber" : "local")
28 14
29sourceCompatibility = 1.8 15sourceCompatibility = 1.8
30targetCompatibility = 1.8 16targetCompatibility = 1.8
@@ -46,13 +32,8 @@ repositories {
46 mavenCentral() 32 mavenCentral()
47 33
48 maven { 34 maven {
49 name "Cuchaz Custom Repository"
50 url 'http://maven.cuchazinteractive.com'
51 }
52
53 maven {
54 name "Modmuss Repository" 35 name "Modmuss Repository"
55 url 'http://maven.modmuss50.me/' 36 url 'https://maven.modmuss50.me/'
56 } 37 }
57 38
58 ivy { 39 ivy {
@@ -65,30 +46,29 @@ repositories {
65} 46}
66 47
67configurations { 48configurations {
68 proGuard // used to download ProGuard 49 proGuard
69 application // used for JSyntaxPane so it's not in the library POM
70
71 compile.extendsFrom application
72} 50}
73 51
74dependencies { 52dependencies {
75 compile 'com.google.guava:guava:28.0-jre' 53 implementation 'com.google.guava:guava:28.0-jre'
76 compile 'com.google.code.gson:gson:2.8.5' 54 implementation 'com.google.code.gson:gson:2.8.5'
77 compile 'org.ow2.asm:asm:8.0' 55 implementation 'org.ow2.asm:asm:8.0'
78 compile 'org.ow2.asm:asm-commons:8.0' 56 implementation 'org.ow2.asm:asm-commons:8.0'
79 compile 'org.ow2.asm:asm-tree:8.0' 57 implementation 'org.ow2.asm:asm-tree:8.0'
80 compile 'org.ow2.asm:asm-util:8.0' 58 implementation 'org.ow2.asm:asm-util:8.0'
81 compile 'net.sf.jopt-simple:jopt-simple:6.0-alpha-3' 59 implementation 'net.sf.jopt-simple:jopt-simple:6.0-alpha-3'
82 60 implementation 'net.fabricmc:procyon-fabric-compilertools:0.5.35.+'
83 compile 'net.fabricmc:procyon-fabric-compilertools:0.5.35.+' 61 implementation 'net.fabricmc:cfr:0.0.1'
84 compile 'net.fabricmc:cfr:0.0.1' 62 implementation name: "darcula", version: "1.0.0"
85 63 implementation 'de.sciss:syntaxpane:1.2.+'
86 application name: "darcula", version: "1.0.0" 64 implementation 'me.xdrop:fuzzywuzzy:1.2.0'
87 application 'de.sciss:syntaxpane:1.2.+' 65 implementation name: "darcula", version: "1.0.0"
88 application 'me.xdrop:fuzzywuzzy:1.2.0' 66 implementation 'de.sciss:syntaxpane:1.2.+'
89 67 implementation 'me.xdrop:fuzzywuzzy:1.2.0'
90 testCompile 'junit:junit:4.+' 68
91 testCompile 'org.hamcrest:hamcrest-all:1.+' 69 testImplementation 'junit:junit:4.+'
70 testImplementation 'org.hamcrest:hamcrest-all:1.+'
71
92 proGuard 'net.sf.proguard:proguard-base:6.+' 72 proGuard 'net.sf.proguard:proguard-base:6.+'
93} 73}
94 74
@@ -103,8 +83,8 @@ file('src/test/java/cuchaz/enigma/inputs').listFiles().each { theFile ->
103 include 'cuchaz/enigma/inputs/Keep.class' 83 include 'cuchaz/enigma/inputs/Keep.class'
104 } 84 }
105 85
106 archiveName = theFile.name + '.jar' 86 archiveFileName = theFile.name + '.jar'
107 destinationDir = file('build/test-inputs') 87 destinationDirectory = file('build/test-inputs')
108 } 88 }
109 89
110 task("${theFile.name}TestObf", type: JavaExec, 90 task("${theFile.name}TestObf", type: JavaExec,
@@ -184,12 +164,23 @@ artifacts {
184 archives sourcesJar 164 archives sourcesJar
185} 165}
186 166
187// And finally, make the build generate / install the jars. 167publishing {
188build.dependsOn install 168 publications {
189 169 mavenJava(MavenPublication) {
190apply from: 'https://github.com/FabricMC/fabric-docs/raw/master/gradle/maven.gradle' 170 artifact jar
171 }
172 }
191 173
192uploadArchives.repositories.mavenDeployer.pom.withXml { 174 // select the repositories you want to publish to
193 asNode().dependencies.'*'.findAll() { it.artifactId.text() == 'darcula' } 175 repositories {
194 .each() { it.parent().remove(it) } 176 if (project.hasProperty('mavenPass')) {
177 maven {
178 url = "http://mavenupload.modmuss50.me/"
179 credentials {
180 username = "buildslave"
181 password = project.getProperty('mavenPass')
182 }
183 }
184 }
185 }
195} 186}