diff options
| -rw-r--r-- | build.py | 18 |
1 files changed, 15 insertions, 3 deletions
| @@ -44,6 +44,8 @@ TestDeps = [ | |||
| 44 | 44 | ||
| 45 | def buildTestJar(name, glob): | 45 | def 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 | ||
| 92 | def buildLibJar(dirOut): | 104 | def 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: |