Skip to content

Commit

Permalink
Automatically build uber-jar
Browse files Browse the repository at this point in the history
  • Loading branch information
ThexXTURBOXx committed Aug 10, 2021
1 parent cdf7bf9 commit f28dbb7
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 3 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ jobs:
java-version: 1.8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
- name: Build library with Gradle
run: ./gradlew build --exclude-task test
- name: Build dex-tools with Gradle
run: ./gradlew distZip

- name: Create Release
Expand All @@ -48,9 +50,16 @@ jobs:
asset_name: dex-tools-2.1-SNAPSHOT.zip
asset_content_type: application/zip

- name: Archive artifacts
- name: Archive dex tools
uses: actions/upload-artifact@v2
if: success()
with:
name: dex-tools-2.1-SNAPSHOT
path: dex-tools/build/distributions/dex-tools-2.1-SNAPSHOT.zip

- name: Archive uber-jar
uses: actions/upload-artifact@v2
if: success()
with:
name: d2j-all-2.1-SNAPSHOT-all
path: d2j-all/build/libs/d2j-all-2.1-SNAPSHOT-all.jar
51 changes: 51 additions & 0 deletions d2j-all/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
plugins {
id "java"
id "com.github.johnrengelman.shadow" version "7.0.0"
}

apply plugin: 'com.github.johnrengelman.shadow'

description = 'Module for creating a uber-jar'
group 'com.googlecode.d2j'
version '2.1-SNAPSHOT'

repositories {
mavenCentral()
}

dependencies {
implementation(project(":d2j-base-cmd")) {
transitive = false
}
implementation(project(":d2j-j6")) {
transitive = false
}
implementation(project(":d2j-jasmin")) {
transitive = false
}
implementation(project(":d2j-smali")) {
transitive = false
}
implementation(project(":dex-ir")) {
transitive = false
}
implementation(project(":dex-reader")) {
transitive = false
}
implementation(project(":dex-reader-api")) {
transitive = false
}
implementation(project(":dex-tools")) {
transitive = false
}
implementation(project(":dex-translator")) {
transitive = false
}
implementation(project(":dex-writer")) {
transitive = false
}
}

tasks.packageSources.enabled = false // Don't build sources jar
tasks.jar.enabled = false // Don't build normal jar
tasks.assemble.dependsOn tasks.shadowJar // Build uber-jar on build task
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
rootProject.name = 'dex2jar'
include ':dex-reader-api',':dex-reader', ':dex-writer', ':dex-translator', ':dex-ir', ':dex-tools', ':d2j-smali', ':d2j-base-cmd', ':d2j-jasmin', ':d2j-j6'
include ':d2j-all', ':dex-reader-api',':dex-reader', ':dex-writer', ':dex-translator', ':dex-ir', ':dex-tools', ':d2j-smali', ':d2j-base-cmd', ':d2j-jasmin', ':d2j-j6'

0 comments on commit f28dbb7

Please sign in to comment.