diff --git a/.github/workflows/gradle_build.yml b/.github/workflows/gradle_build.yml index 1a220dc4..8e284811 100644 --- a/.github/workflows/gradle_build.yml +++ b/.github/workflows/gradle_build.yml @@ -16,6 +16,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + submodules: 'recursive' - name: Set up JDK 8 uses: actions/setup-java@v4 with: diff --git a/.github/workflows/gradle_build_beta.yml b/.github/workflows/gradle_build_beta.yml index d8fecad6..690b82ab 100644 --- a/.github/workflows/gradle_build_beta.yml +++ b/.github/workflows/gradle_build_beta.yml @@ -16,6 +16,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + submodules: 'recursive' - name: Set up JDK 8 uses: actions/setup-java@v4 with: diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..2259b1a9 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "modules/ARSCLib"] + path = modules/ARSCLib + url = https://github.com/REAndroid/ARSCLib.git diff --git a/README.md b/README.md index c46318d0..76132cc1 100755 --- a/README.md +++ b/README.md @@ -508,8 +508,8 @@ Examples: ```ShellSession -# NB: Due to my lazyness , the dependency ARSCLib.jar is pre-built and placed under APKEditor/libs/ARSCLib.jar or you can build yourself and replace it. -git clone https://github.com/REAndroid/APKEditor +# ARSCLib is now included as a Git submodule, so clone with --recurse-submodules +git clone --recurse-submodules https://github.com/REAndroid/APKEditor cd APKEditor ./gradlew fatJar # Executable jar will be placed ./build/libs/APKEditor-x.x.x.jar diff --git a/build.gradle b/build.gradle index 3c66c9ce..434cadfa 100755 --- a/build.gradle +++ b/build.gradle @@ -9,26 +9,23 @@ java { targetCompatibility JavaVersion.VERSION_1_8 } -if (JavaVersion.current().isJava8Compatible()) { - allprojects { - tasks.compileJava { - //options.addStringOption('-Xlint:unchecked', '-quiet') - } - } +tasks.withType(JavaCompile) { + options.encoding = 'UTF-8' } + repositories { mavenCentral() } dependencies { - //implementation("io.github.reandroid:ARSCLib:+") - compile(files("$rootProject.projectDir/libs/ARSCLib.jar")) + // Use ARSCLib as a submodule project dependency + compile project(':ARSCLib') // built from: https://github.com/REAndroid/smali-lib - compile(files("$rootProject.projectDir/libs/smali.jar")) + compile files("$rootProject.projectDir/libs/smali.jar") // built from: https://github.com/REAndroid/JCommand - compile(files("$rootProject.projectDir/libs/JCommand.jar")) + compile files("$rootProject.projectDir/libs/JCommand.jar") } processResources { diff --git a/libs/ARSCLib.jar b/libs/ARSCLib.jar deleted file mode 100644 index 98d6b80d..00000000 Binary files a/libs/ARSCLib.jar and /dev/null differ diff --git a/modules/ARSCLib b/modules/ARSCLib new file mode 160000 index 00000000..b942b9b1 --- /dev/null +++ b/modules/ARSCLib @@ -0,0 +1 @@ +Subproject commit b942b9b104e9287299022ef088395d13def698ec diff --git a/settings.gradle b/settings.gradle index 448a368a..9f90ea19 100755 --- a/settings.gradle +++ b/settings.gradle @@ -1,2 +1,4 @@ rootProject.name = 'APKEditor' +include ':ARSCLib' +project(':ARSCLib').projectDir = new File(rootProject.projectDir, 'modules/ARSCLib')