summaryrefslogtreecommitdiff
path: root/build.py
diff options
context:
space:
mode:
authorGravatar Cuchaz2015-05-24 11:41:35 -0400
committerGravatar Cuchaz2015-05-24 11:41:35 -0400
commit5a76df97229c75b0ef3538d82fd84575b2447f5b (patch)
tree900fef894daf8d81fb23a4e412a4c23c0d387e47 /build.py
parentSupport Gradle alongside SSJB (diff)
downloadenigma-5a76df97229c75b0ef3538d82fd84575b2447f5b.tar.gz
enigma-5a76df97229c75b0ef3538d82fd84575b2447f5b.tar.xz
enigma-5a76df97229c75b0ef3538d82fd84575b2447f5b.zip
fix ssjb building of test jars
proguard ssjb build jar (without obfuscation) for great justice
Diffstat (limited to 'build.py')
-rw-r--r--build.py18
1 files changed, 15 insertions, 3 deletions
diff --git a/build.py b/build.py
index 40da3271..c4e86b2b 100644
--- a/build.py
+++ b/build.py
@@ -44,6 +44,8 @@ TestDeps = [
44 44
45def buildTestJar(name, glob): 45def buildTestJar(name, glob):
46 46
47 ssjb.file.mkdir(os.path.join(DirBuild, "test-inputs"))
48 ssjb.file.mkdir(os.path.join(DirBuild, "test-obf"))
47 pathJar = os.path.join(DirBuild, "test-inputs/%s.jar" % name) 49 pathJar = os.path.join(DirBuild, "test-inputs/%s.jar" % name)
48 pathObfJar = os.path.join(DirBuild, "test-obf/%s.jar" % name) 50 pathObfJar = os.path.join(DirBuild, "test-obf/%s.jar" % name)
49 51
@@ -85,9 +87,19 @@ def buildStandaloneJar(dirOut):
85 Author, 87 Author,
86 "cuchaz.enigma.Main" 88 "cuchaz.enigma.Main"
87 ) 89 )
88 pathJar = os.path.join(DirBuild, "%s.jar" % ArtifactStandalone.getName()) 90 pathFatJar = os.path.join(DirBuild, "%s-fat.jar" % ArtifactStandalone.getName())
89 ssjb.jar.makeJar(pathJar, dirTemp, manifest=manifest) 91 ssjb.jar.makeJar(pathFatJar, dirTemp, manifest=manifest)
90 ssjb.ivy.deployJarToLocalMavenRepo(PathLocalMavenRepo, pathJar, ArtifactStandalone) 92
93 # proguard the jar (without obfuscating) to remove some bloat
94 # the guava library is particularly bad...
95 pathDietJar = os.path.join(DirBuild, "%s.jar" % ArtifactStandalone.getName())
96 ssjb.callJavaJar(
97 os.path.join(DirLib, "proguard.jar"),
98 ["@proguard-build.conf", "-injars", pathFatJar, "-outjars", pathDietJar]
99 )
100
101 ssjb.ivy.deployJarToLocalMavenRepo(PathLocalMavenRepo, pathDietJar, ArtifactStandalone)
102
91 103
92def buildLibJar(dirOut): 104def buildLibJar(dirOut):
93 with ssjb.file.TempDir(os.path.join(dirOut, "tmp")) as dirTemp: 105 with ssjb.file.TempDir(os.path.join(dirOut, "tmp")) as dirTemp: