Skip to content

Commit 08c8ef5

Browse files
committed
Replace prebuilt ARSCLib with git submodule
1 parent 9aed33b commit 08c8ef5

File tree

8 files changed

+20
-13
lines changed

8 files changed

+20
-13
lines changed

.github/workflows/gradle_build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616

1717
steps:
1818
- uses: actions/checkout@v4
19+
with:
20+
submodules: 'recursive'
1921
- name: Set up JDK 8
2022
uses: actions/setup-java@v4
2123
with:

.github/workflows/gradle_build_beta.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616

1717
steps:
1818
- uses: actions/checkout@v4
19+
with:
20+
submodules: 'recursive'
1921
- name: Set up JDK 8
2022
uses: actions/setup-java@v4
2123
with:

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "modules/ARSCLib"]
2+
path = modules/ARSCLib
3+
url = https://github.com/REAndroid/ARSCLib.git

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,8 +508,8 @@ Examples:
508508

509509
```ShellSession
510510
511-
# 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.
512-
git clone https://github.com/REAndroid/APKEditor
511+
# ARSCLib is now included as a Git submodule, so clone with --recurse-submodules
512+
git clone --recurse-submodules https://github.com/REAndroid/APKEditor
513513
cd APKEditor
514514
./gradlew fatJar
515515
# Executable jar will be placed ./build/libs/APKEditor-x.x.x.jar

build.gradle

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,23 @@ java {
99
targetCompatibility JavaVersion.VERSION_1_8
1010
}
1111

12-
if (JavaVersion.current().isJava8Compatible()) {
13-
allprojects {
14-
tasks.compileJava {
15-
//options.addStringOption('-Xlint:unchecked', '-quiet')
16-
}
17-
}
12+
tasks.withType(JavaCompile) {
13+
options.encoding = 'UTF-8'
1814
}
15+
1916
repositories {
2017
mavenCentral()
2118
}
2219

2320
dependencies {
24-
//implementation("io.github.reandroid:ARSCLib:+")
25-
compile(files("$rootProject.projectDir/libs/ARSCLib.jar"))
21+
// Use ARSCLib as a submodule project dependency
22+
implementation project(':ARSCLib')
2623

2724
// built from: https://github.com/REAndroid/smali-lib
28-
compile(files("$rootProject.projectDir/libs/smali.jar"))
25+
implementation files("$rootProject.projectDir/libs/smali.jar")
2926

3027
// built from: https://github.com/REAndroid/JCommand
31-
compile(files("$rootProject.projectDir/libs/JCommand.jar"))
28+
implementation files("$rootProject.projectDir/libs/JCommand.jar")
3229
}
3330

3431
processResources {
@@ -52,7 +49,7 @@ task fatJar(type: Jar) {
5249
'Main-Class': 'com.reandroid.apkeditor.Main'
5350
)
5451
}
55-
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
52+
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
5653
with jar
5754
}
5855

libs/ARSCLib.jar

-4.72 MB
Binary file not shown.

modules/ARSCLib

Submodule ARSCLib added at b942b9b

settings.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
rootProject.name = 'APKEditor'
22

3+
include ':ARSCLib'
4+
project(':ARSCLib').projectDir = new File(rootProject.projectDir, 'modules/ARSCLib')

0 commit comments

Comments
 (0)