Skip to content

Commit 258a73b

Browse files
committed
test-ci
1 parent 72e7781 commit 258a73b

File tree

3 files changed

+48
-22
lines changed

3 files changed

+48
-22
lines changed

.github/workflows/android.yml

+42-13
Original file line numberDiff line numberDiff line change
@@ -18,39 +18,55 @@ jobs:
1818
with:
1919
format: YYYYMMDD-HH
2020
utcOffset: "+08:00"
21-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v4
2222
with:
2323
submodules: recursive
24-
- name: Decode Keystore
25-
env:
26-
ENCODED_STRING: ${{ secrets.SIGNING_STORE_BASE64 }}
27-
run: echo $ENCODED_STRING | base64 -di > app/keystore.jks
28-
- uses: AdoptOpenJDK/install-jdk@v1
24+
- name: Install dependencies
25+
run: |
26+
sudo apt-get update
27+
sudo apt-get install -y libarchive-zip-perl
28+
- name: Decode proguard rules
29+
uses: mobiledevops/secret-to-file-action@v1
2930
with:
30-
version: '17'
31-
architecture: x64
31+
base64-encoded-secret: ${{ secrets.PROGUARD_RULES }}
32+
filename: "app/proguard-rules.pro"
33+
- name: Decode keystore
34+
uses: mobiledevops/secret-to-file-action@v1
35+
with:
36+
base64-encoded-secret: ${{ secrets.SIGNING_STORE_BASE64 }}
37+
filename: "app/keystore.jks"
3238
- uses: AdoptOpenJDK/install-jdk@v1
3339
with:
34-
version: '15'
40+
version: '17'
3541
architecture: x64
36-
targets: 'JAVA_HOME_15'
3742
- name: Build Riru modules
3843
run: cd ./module && bash ./make.sh
44+
env:
45+
BUILD_RELEASE_MINIFYENABLED: ${{ vars.BUILD_RELEASE_MINIFYENABLED }}
46+
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
47+
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
48+
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
3949
- name: Grant execute permission for gradlew
4050
run: chmod +x gradlew
4151
- name: Build with Gradle
42-
run: ./gradlew clean ":app:assembleRelease"
52+
run: ./gradlew clean && ./gradlew ":app:assembleRelease" -Pxposed=true
4353
env:
54+
BUILD_RELEASE_MINIFYENABLED: ${{ vars.BUILD_RELEASE_MINIFYENABLED }}
4455
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
4556
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
4657
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
4758
- name: Upload Apk
48-
uses: actions/upload-artifact@v2.2.0
59+
uses: actions/upload-artifact@v4
4960
with:
5061
name: xposed.${{ steps.current-time.outputs.formattedTime }}
5162
path: app/build/outputs/apk/release/*.apk
63+
- name: Upload Mapping
64+
uses: actions/upload-artifact@v4
65+
with:
66+
name: mapping.${{ steps.current-time.outputs.formattedTime }}
67+
path: app/build/outputs/mapping/release
5268
- name: Upload Riru Modules
53-
uses: actions/upload-artifact@v2.2.0
69+
uses: actions/upload-artifact@v4
5470
with:
5571
name: magisk.${{ steps.current-time.outputs.formattedTime }}
5672
path: |
@@ -76,7 +92,18 @@ jobs:
7692
app/build/outputs/apk/release/*.apk
7793
module/build/release/*.zip
7894
body: "[Github Action](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})"
95+
- name: Check WebDAV credentials
96+
id: check-webdav
97+
run: |
98+
if [[ -n "${{ secrets.WEBDAV_ADDRESS }}" && -n "${{ secrets.WEBDAV_USERNAME }}" && -n "${{ secrets.WEBDAV_PASSWORD }}" ]]; then
99+
echo "webdav_available=true" >> $GITHUB_OUTPUT
100+
echo "WebDAV credentials are available"
101+
else
102+
echo "webdav_available=false" >> $GITHUB_OUTPUT
103+
echo "WebDAV credentials are missing or incomplete"
104+
fi
79105
- name: Upload artifacts - Xposed
106+
if: steps.check-webdav.outputs.webdav_available == 'true'
80107
uses: Wandalen/wretry.action@master
81108
with:
82109
action: bxb100/action-upload@main
@@ -92,6 +119,7 @@ jobs:
92119
attempt_limit: 3
93120
attempt_delay: 0
94121
- name: Upload artifacts - Zygisk
122+
if: steps.check-webdav.outputs.webdav_available == 'true'
95123
uses: Wandalen/wretry.action@master
96124
with:
97125
action: bxb100/action-upload@main
@@ -107,6 +135,7 @@ jobs:
107135
attempt_limit: 3
108136
attempt_delay: 0
109137
- name: Upload artifacts - Riru
138+
if: steps.check-webdav.outputs.webdav_available == 'true'
110139
uses: Wandalen/wretry.action@master
111140
with:
112141
action: bxb100/action-upload@main

app/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ android {
66
defaultConfig {
77
applicationId "com.surcumference.fingerprintpay"
88
minSdkVersion 14
9-
versionCode 34
10-
versionName "6.0.0"
9+
versionCode 33
10+
versionName "5.99.9"
1111
buildConfigField "String", "APP_PRODUCT_NAME", "\"FingerprintPay\""
1212
}
1313

1414
buildTypes {
1515
release {
16-
minifyEnabled false
17-
shrinkResources false
16+
minifyEnabled System.getenv("BUILD_RELEASE_MINIFYENABLED")?.toBoolean() ?: false
17+
shrinkResources System.getenv("BUILD_RELEASE_MINIFYENABLED")?.toBoolean() ?: false
1818
zipAlignEnabled true
1919
proguardFiles 'proguard-rules.pro'
2020
}

app/debug.gradle

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ext {
22
adbPath = "${android.getSdkDirectory()}/platform-tools/adb"
3-
buildXposed = false
3+
xposed = project.findProperty('xposed')?.toBoolean() ?: false
44
}
55
def adbPushToAppFiles(dexPath, targetName, targetPackage) {
66
exec {
@@ -50,7 +50,7 @@ android.applicationVariants.all { variant ->
5050
def dexTask = tasks.findByName(isMinifyEnabled ? "minify${buildTypeNameCapitalize}WithR8" : "mergeDex${buildTypeNameCapitalize}")
5151
if (minifyTask) {
5252
minifyTask.doFirst {
53-
if (buildXposed) {
53+
if (xposed) {
5454
return
5555
}
5656
def aaptRulesFile = file("${buildDir}/intermediates/aapt_proguard_file/release/aapt_rules.txt")
@@ -59,9 +59,6 @@ android.applicationVariants.all { variant ->
5959
}
6060
}
6161
}
62-
tasks.create(name: "assemble${buildTypeNameCapitalize}Xposed", dependsOn: [variant.assemble]) {
63-
buildXposed = true
64-
}
6562

6663
project.ext.appInfo.each {entry ->
6764
def name = entry.key

0 commit comments

Comments
 (0)