Skip to content

Optimise .jar files with JarTighten #12

Optimise .jar files with JarTighten

Optimise .jar files with JarTighten #12

Workflow file for this run

name: Draft release
on:
push:
# Sequence of patterns matched against refs/tags
tags: 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK 6 & 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: |
6
17
- name: Install advancecomp
run: sudo apt-get install advancecomp
- name: Install strip-nondeterminism
run: sudo apt-get install strip-nondeterminism
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Build with Gradle
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BUILD_RELEASE: ${{ github.event.release.prerelease == false }}
uses: gradle/gradle-build-action@v2
with:
gradle-version: wrapper
cache-disabled: true
arguments: build publish --scan --stacktrace --warning-mode all
- name: Run strip-nondeterminism on built .jar files
run: strip-nondeterminism mc-texture-gen-app/build/libs/*.jar
- name: Run advzip on built .jar files
run: advzip --shrink-insane --iter 99999 -k -p -z mc-texture-gen-app/build/libs/*.jar
- name: Run ECT on built .jar files
run: for file in ./mc-texture-gen-app/build/libs/*.jar; do ./ci-tools/ect-ubuntu-x86-64 --disable-png --disable-jpg -strip -zip $file; done
- name: Run ECT (-9) on built .jar files
run: for file in ./mc-texture-gen-app/build/libs/*.jar; do ./ci-tools/ect-ubuntu-x86-64 -9 --disable-png --disable-jpg -strip -zip $file; done
- name: Run ECT (-99) on built .jar files
run: for file in ./mc-texture-gen-app/build/libs/*.jar; do ./ci-tools/ect-ubuntu-x86-64 -99 --disable-png --disable-jpg -strip -zip $file; done
- name: Run ECT (-999) on built .jar files
run: for file in ./mc-texture-gen-app/build/libs/*.jar; do ./ci-tools/ect-ubuntu-x86-64 -999 --disable-png --disable-jpg -strip -zip $file; done
- name: Run ECT (-30060) on built .jar files
run: for file in ./mc-texture-gen-app/build/libs/*.jar; do ./ci-tools/ect-ubuntu-x86-64 -30060 --disable-png --disable-jpg -strip -zip $file; done
- name: Run ECT (-90032) on built .jar files
run: for file in ./mc-texture-gen-app/build/libs/*.jar; do ./ci-tools/ect-ubuntu-x86-64 -90032 --disable-png --disable-jpg -strip -zip $file; done
- name: Run ECT (-9999) on built .jar files
run: for file in ./mc-texture-gen-app/build/libs/*.jar; do ./ci-tools/ect-ubuntu-x86-64 -9999 --disable-png --disable-jpg -strip -zip $file; done
- name: Run JarTighten on built .jar files
run: for file in ./mc-texture-gen-app/build/libs/*.jar; do java -jar ./ci-tools/JarTighten-1.2.11-all.jar -x -o -c -E -S -t -z -j --mode=EXTENSIVE --zopfli-iter=9999 $file $file; done
- name: Draft release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref }}
name: Draft release ${{ github.ref }}
body: Replace this text with the description of this release!
draft: true
prerelease: false
files: mc-texture-gen-app/build/libs/*.jar