diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..e261d24af --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: + # Set update schedule for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/build-artifacts.yml b/.github/workflows/build-artifacts.yml new file mode 100644 index 000000000..8a8955a7d --- /dev/null +++ b/.github/workflows/build-artifacts.yml @@ -0,0 +1,86 @@ +name: Build Artifacts + +on: + push: + branches: [ master, build-test ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up JDK + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: 8 + + - name: Set jadx version + run: | + JADX_LAST_TAG=$(git describe --abbrev=0 --tags) + JADX_VERSION="${JADX_LAST_TAG:1}.$GITHUB_RUN_NUMBER-${GITHUB_SHA:0:8}" + echo "JADX_VERSION=$JADX_VERSION" >> $GITHUB_ENV + + - uses: burrunan/gradle-cache-action@v1 + name: Build with Gradle + env: + TERM: dumb + with: + arguments: clean dist copyExe + + - name: Save bundle artifact + uses: actions/upload-artifact@v3 + with: + name: ${{ format('jadx-{0}', env.JADX_VERSION) }} + # Waiting fix for https://github.com/actions/upload-artifact/issues/39 to upload zip file + # Upload unpacked files for now + path: build/jadx/**/* + if-no-files-found: error + retention-days: 30 + + - name: Save exe artifact + uses: actions/upload-artifact@v3 + with: + name: ${{ format('jadx-gui-{0}-no-jre-win.exe', env.JADX_VERSION) }} + path: build/*.exe + if-no-files-found: error + retention-days: 30 + + build-win-bundle: + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up JDK + uses: oracle-actions/setup-java@v1 # set latest java version by default + + - name: Print Java version + shell: bash + run: java -version + + - name: Set jadx version + shell: bash + run: | + JADX_LAST_TAG=$(git describe --abbrev=0 --tags) + JADX_VERSION="${JADX_LAST_TAG:1}.$GITHUB_RUN_NUMBER-${GITHUB_SHA:0:8}" + echo "JADX_VERSION=$JADX_VERSION" >> $GITHUB_ENV + + - uses: gradle/gradle-build-action@v2 + name: Build with Gradle + env: + TERM: dumb + with: + arguments: clean dist -PbundleJRE=true + + - name: Save exe bundle artifact + uses: actions/upload-artifact@v3 + with: + name: ${{ format('jadx-gui-{0}-with-jre-win', env.JADX_VERSION) }} + path: jadx-gui/build/*-with-jre-win/* + if-no-files-found: error + retention-days: 30 diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml new file mode 100644 index 000000000..bb3ad56f1 --- /dev/null +++ b/.github/workflows/build-test.yml @@ -0,0 +1,28 @@ +name: Build Test + +on: + push: + branches: [ master, build-test ] + pull_request: + branches: [ master ] + +jobs: + tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up JDK + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: 8 + + - uses: burrunan/gradle-cache-action@v1 + name: Build with Gradle + env: + TERM: dumb + with: + arguments: clean build dist copyExe --warning-mode=all diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 4001458d5..000000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Build - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Set up JDK - uses: actions/setup-java@v1 - with: - java-version: 8 - - - name: Set jadx version - run: | - JADX_LAST_TAG=$(git describe --abbrev=0 --tags) - JADX_VERSION="${JADX_LAST_TAG:1}.$GITHUB_RUN_NUMBER-${GITHUB_SHA:0:8}" - echo "JADX_VERSION=$JADX_VERSION" >> $GITHUB_ENV - - - uses: burrunan/gradle-cache-action@v1 - name: Build with Gradle - env: - TERM: dumb - TEST_INPUT_PLUGIN: dx - with: - arguments: clean build dist copyExe --warning-mode=all - - - name: Save bundle artifact - if: success() && github.event_name == 'push' - uses: actions/upload-artifact@v2 - with: - name: ${{ format('jadx-{0}', env.JADX_VERSION) }} - # Waiting fix for https://github.com/actions/upload-artifact/issues/39 to upload zip file - # Upload unpacked files for now - path: build/jadx/**/* - if-no-files-found: error - - - name: Save exe artifact - if: success() && github.event_name == 'push' - uses: actions/upload-artifact@v2 - with: - name: ${{ format('jadx-gui-{0}-no-jre-win.exe', env.JADX_VERSION) }} - path: build/*.exe - if-no-files-found: error diff --git a/README.md b/README.md index 9d4f431e9..23105f159 100644 --- a/README.md +++ b/README.md @@ -33,8 +33,9 @@ See these features in action here: [jadx-gui features overview](https://github.c ### Download -- release from [github: ![Latest release](https://img.shields.io/github/release/skylot/jadx.svg)](https://github.com/skylot/jadx/releases/latest) -- latest [unstable build](https://nightly.link/skylot/jadx/workflows/build/master) +- release + from [github: ![Latest release](https://img.shields.io/github/release/skylot/jadx.svg)](https://github.com/skylot/jadx/releases/latest) +- latest [unstable build](https://nightly.link/skylot/jadx/workflows/build-artifacts/master) After download unpack zip file go to `bin` directory and run: - `jadx` - command line version diff --git a/appdata.xml b/appdata.xml deleted file mode 100644 index 8b56ecc77..000000000 --- a/appdata.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - com.github.skylot.jadx - CC0-1.0 - Apache-2.0 - JADX - Dex to Java decompiler - -

Command line and GUI tools for producing Java source code from Android Dex and Apk files

- -
- - - https://user-images.githubusercontent.com/118523/142730720-839f017e-38db-423e-b53f-39f5f0a0316f.png - - - - com.github.skylot.jadx.desktop - https://github.com/skylot/jadx - https://github.com/skylot/jadx/issues - - - -
diff --git a/build.gradle b/build.gradle index 5d634a537..e98643345 100644 --- a/build.gradle +++ b/build.gradle @@ -14,7 +14,6 @@ allprojects { version = jadxVersion sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 compileJava { options.encoding = "UTF-8" diff --git a/jadx-gui/build.gradle b/jadx-gui/build.gradle index 50b011477..4f8fdaf01 100644 --- a/jadx-gui/build.gradle +++ b/jadx-gui/build.gradle @@ -100,7 +100,6 @@ runtime { addModules( 'java.desktop', 'java.naming', - //'java.sql', // TODO: GSON register adapter for java.sql.Time 'java.xml', ) jpackage { @@ -113,10 +112,9 @@ runtime { } } -task distWinWithJre(type: Zip, dependsOn: ['runtime', 'createExe']) { +task copyDistWinWithJre(type: Copy, dependsOn: ['runtime', 'createExe']) { group 'jadx' - destinationDirectory = buildDir - archiveFileName = "jadx-gui-${jadxVersion}-with-jre-win.zip" + destinationDir = new File(buildDir, "jadx-gui-${jadxVersion}-with-jre-win") from(runtime.jreDir) { include '**/*' into 'jre' @@ -126,3 +124,13 @@ task distWinWithJre(type: Zip, dependsOn: ['runtime', 'createExe']) { } duplicatesStrategy = DuplicatesStrategy.EXCLUDE } + +task distWinWithJre(type: Zip, dependsOn: ['copyDistWinWithJre']) { + group 'jadx' + destinationDirectory = buildDir + archiveFileName = "jadx-gui-${jadxVersion}-with-jre-win.zip" + from(copyDistWinWithJre.outputs) { + include '**/*' + } + duplicatesStrategy = DuplicatesStrategy.EXCLUDE +}