The command is:
/opt/reyboz/android/bin/publish-latest-branch-build.sh ${buildable.revision}
Source code:
This step will copy the built .apk to an indexed HTTP directory exposed by Apache:
Passed |
The command is:
/opt/reyboz/android/bin/publish-latest-branch-build.sh ${buildable.revision}
Source code:
This step will copy the built .apk to an indexed HTTP directory exposed by Apache:
1 | % Total % Received % Xferd Average Speed Time Time Time Current |
---|---|
2 | Dload Upload Total Spent Left Speed |
3 | |
4 | 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 |
5 | 100 467 100 150 100 317 2500 5283 --:--:-- --:--:-- --:--:-- 7783 |
6 |
1 | Current directory: |
---|---|
2 | /var/drydock/workingcopy-112/repo/libre-busto |
3 | Calculating sha256sum of: |
4 | ./app/build/outputs/apk/gitpull/app-gitpull-signed.apk |
5 | File info |
6 | -rw-r--r-- 1 phabricator-android-builder phabricator-android-builder 9712032 Sep 19 00:59 ./app/build/outputs/apk/gitpull/app-gitpull-signed.apk |
7 | Cleaning old builds |
8 | Update checksums |
9 | Published here: |
10 | https://lab.reyboz.it/builds/libre-busto/D165-libre-busto.apk |
11 | {"ok":false,"error_code":400,"description":"Bad Request: can't parse entities: Character '.' is reserved and must be escaped with the preceding '\\'"}Adding bipbop Comment to D165 |
12 | Cleaning |
13 | Done |
14 |
Passed |
This script is available here on gargantua.reyboz.it accessible to the Unix user phabricator-android-builder:
/opt/reyboz/android/bin/align-sign-fabione.sh
In general it does that:
#!/bin/sh # https://gitpull.it/harbormaster/step/view/16/ BASEDIR="app/build/outputs/apk/gitpull" OUT="app-gitpull-signed.apk" APK_UNSIGNED="app-gitpull-unsigned.apk" APK_ALIGNED="app-gitpull-unsigned-aligned.apk" KEYSTORE="/home/phabricator-android-builder/private-resources/gitpullkeystore-libre-busto.jks" PASSPHRASE="<omissis> echo "Entering in $BASEDIR" cd "$BASEDIR" echo "Aligning zip" ~/bin/zipalign -v -p 4 "$APK_UNSIGNED" "$APK_ALIGNED" echo "Signing APK" # NOTE: keep keystore unsescaped ~/bin/apksigner sign --ks "$KEYSTORE" --out "$OUT" --ks-pass pass:"$PASSPHRASE" "$APK_ALIGNED" echo "Sign concluded with exit status $?"
1212 | 8274052 res/yg.9.png (OK) |
---|---|
1213 | 8274487 res/yj.xml (OK - compressed) |
1214 | 8274884 res/yn.png (OK) |
1215 | 8277368 res/z-.9.png (OK) |
1216 | 8277632 res/z9.9.png (OK) |
1217 | 8278092 res/zE.png (OK) |
1218 | 8278456 res/zG.xml (OK - compressed) |
1219 | 8278776 res/zL.png (OK) |
1220 | 8279024 res/zP.png (OK) |
1221 | 8296984 res/zR.png (OK) |
1222 | 8299785 res/zR.xml (OK - compressed) |
1223 | 8300272 res/zV.9.png (OK) |
1224 | 8302776 res/zZ.png (OK) |
1225 | 8309471 res/zc.xml (OK - compressed) |
1226 | 8309920 res/zp.xml (OK - compressed) |
1227 | 8310177 res/zq.xml (OK - compressed) |
1228 | 8310488 res/zr.png (OK) |
1229 | 8313307 res/zu.xml (OK - compressed) |
1230 | 8314340 res/zz.png (OK) |
1231 | 8315264 res/zz.xml (OK - compressed) |
1232 | 8315456 resources.arsc (OK) |
1233 | Verification succesful |
1234 | Signing APK |
1235 | Sign concluded with exit status 0 |
1236 |
Passed |
This step will build an .apk using Gradle.
sudo apt install openjdk-11-jre-headless
Then aliased this gradle:
https://gitlab.com/fdroid/fdroidserver/-/blob/master/gradlew-fdroid
1 | Note: Some input files use or override a deprecated API. |
---|---|
2 | Note: Recompile with -Xlint:deprecation for details. |
3 | /var/drydock/workingcopy-112/repo/libre-busto/app/src/gitpull/AndroidManifest.xml:4: Error: Mock locations should only be requested in a test or debug-specific manifest file (typically src/debug/AndroidManifest.xml) [MockLocation] |
4 | <uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"/> |
5 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
6 | |
7 | Explanation for issues of type "MockLocation": |
8 | Using a mock location provider (by requiring the permission |
9 | android.permission.ACCESS_MOCK_LOCATION) should only be done in debug |
10 | builds (or from tests). In Gradle projects, that means you should only |
11 | request this permission in a test or debug source set specific manifest |
12 | file. |
13 | |
14 | To fix this, create a new manifest file in the debug folder and move the |
15 | <uses-permission> element there. A typical path to a debug manifest |
16 | override file in a Gradle project is src/debug/AndroidManifest.xml. |
17 | |
18 | 1 errors, 0 warnings |
19 | |
20 |
92 | w: file:///var/drydock/workingcopy-112/repo/libre-busto/app/src/main/java/it/reyboz/bustorino/util/ImportExport.kt:79:48 No cast needed |
---|---|
93 | w: file:///var/drydock/workingcopy-112/repo/libre-busto/app/src/main/java/it/reyboz/bustorino/util/ImportExport.kt:81:42 No cast needed |
94 | w: file:///var/drydock/workingcopy-112/repo/libre-busto/app/src/main/java/it/reyboz/bustorino/util/ImportExport.kt:83:56 Unchecked cast: Any to Set<String?> |
95 | w: file:///var/drydock/workingcopy-112/repo/libre-busto/app/src/main/java/it/reyboz/bustorino/viewmodels/LivePositionsViewModel.kt:271:29 Parameter 'req' is never used, could be renamed to _ |
96 | |
97 | > Task :app:compileGitpullJavaWithJavac |
98 | |
99 | > Task :app:dexBuilderGitpull |
100 | > Task :app:mergeGitpullGlobalSynthetics |
101 | > Task :app:processGitpullJavaRes |
102 | > Task :app:mergeGitpullJavaResource |
103 | > Task :app:mergeDexGitpull |
104 | > Task :app:compileGitpullArtProfile |
105 | > Task :app:packageGitpull |
106 | > Task :app:createGitpullApkListingFileRedirect |
107 | > Task :app:lintVitalAnalyzeGitpull |
108 | > Task :app:lintVitalReportGitpull |
109 | |
110 | > Task :app:lintVitalGitpull |
111 | |
112 | > Task :app:assembleGitpull |
113 | |
114 | BUILD SUCCESSFUL in 2m 26s |
115 | 42 actionable tasks: 42 executed |
116 |
Passed |
Clean Gradle directory to avoid nasty errors like:
1 | Found 8.1 via distributionUrl |
---|---|
2 | Running /home/phabricator-android-builder/versions/8.1/bin/gradle clean |
3 | Starting a Gradle Daemon (subsequent builds will be faster) |
4 | > Task :app:clean |
5 | |
6 | BUILD SUCCESSFUL in 15s |
7 | 1 actionable task: 1 executed |
8 |
Passed |
Passed |