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 | Current directory: |
---|---|
2 | /var/drydock/workingcopy-79/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 8541082 Dec 12 13:18 ./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/HEAD-libre-busto.apk |
11 | Cleaning |
12 | Done |
13 |
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 $?"
1217 | 7135732 res/yq.png (OK) |
---|---|
1218 | 7136944 res/yw.png (OK) |
1219 | 7138748 res/yx.xml (OK - compressed) |
1220 | 7139268 res/z1.xml (OK - compressed) |
1221 | 7139509 res/z11.xml (OK - compressed) |
1222 | 7139864 res/z12.xml (OK - compressed) |
1223 | 7140191 res/z3.xml (OK - compressed) |
1224 | 7140460 res/z6.png (OK) |
1225 | 7141364 res/z61.png (OK) |
1226 | 7142548 res/zB.xml (OK - compressed) |
1227 | 7142910 res/zH.xml (OK - compressed) |
1228 | 7143474 res/zL.xml (OK - compressed) |
1229 | 7143797 res/zN.xml (OK - compressed) |
1230 | 7144152 res/zZ.png (OK) |
1231 | 7144509 res/z_.xml (OK - compressed) |
1232 | 7144760 res/zq.xml (OK - compressed) |
1233 | 7145223 res/zs.ttf (OK - compressed) |
1234 | 7193624 res/zt.png (OK) |
1235 | 7198100 res/zw.png (OK) |
1236 | 7198608 res/zy.png (OK) |
1237 | 7198852 resources.arsc (OK) |
1238 | Verification succesful |
1239 | Signing APK |
1240 | Sign concluded with exit status 0 |
1241 |
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
139 | at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) |
---|---|
140 | at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) |
141 | at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) |
142 | at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:49) |
143 | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) |
144 | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) |
145 | at java.base/java.lang.Thread.run(Thread.java:829) |
146 | /var/drydock/workingcopy-79/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] |
147 | <uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"/> |
148 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
149 | |
150 | Explanation for issues of type "MockLocation": |
151 | Using a mock location provider (by requiring the permission |
152 | android.permission.ACCESS_MOCK_LOCATION) should only be done in debug |
153 | builds (or from tests). In Gradle projects, that means you should only |
154 | request this permission in a test or debug source set specific manifest |
155 | file. |
156 | |
157 | To fix this, create a new manifest file in the debug folder and move the |
158 | <uses-permission> element there. A typical path to a debug manifest |
159 | override file in a Gradle project is src/debug/AndroidManifest.xml. |
160 | |
161 | 1 errors, 0 warnings |
162 | |
163 |
79 | w: file:///var/drydock/workingcopy-79/repo/libre-busto/app/src/main/java/it/reyboz/bustorino/middleware/AppLocationManager.kt:182:89 'TEMPORARILY_UNAVAILABLE: Int' is deprecated. Deprecated in Java |
---|---|
80 | w: file:///var/drydock/workingcopy-79/repo/libre-busto/app/src/main/java/it/reyboz/bustorino/middleware/AppLocationManager.kt:184:34 'LocationProvider' is deprecated. Deprecated in Java |
81 | w: file:///var/drydock/workingcopy-79/repo/libre-busto/app/src/main/java/it/reyboz/bustorino/middleware/AppLocationManager.kt:184:51 'AVAILABLE: Int' is deprecated. Deprecated in Java |
82 | |
83 | > Task :app:compileGitpullJavaWithJavac |
84 | |
85 | > Task :app:lintVitalAnalyzeGitpull |
86 | |
87 | > Task :app:dexBuilderGitpull |
88 | > Task :app:mergeGitpullJavaResource |
89 | > Task :app:mergeDexGitpull |
90 | > Task :app:compileGitpullArtProfile |
91 | > Task :app:packageGitpull |
92 | > Task :app:createGitpullApkListingFileRedirect |
93 | Daemon will be stopped at the end of the build after running out of JVM memory |
94 | |
95 | > Task :app:lintVitalReportGitpull |
96 | |
97 | > Task :app:lintVitalGitpull |
98 | |
99 | > Task :app:assembleGitpull |
100 | |
101 | BUILD SUCCESSFUL in 2m 8s |
102 | 40 actionable tasks: 40 executed |
103 |
Passed |
Clean Gradle directory to avoid nasty errors like:
1 | Found 7.6 via distributionUrl |
---|---|
2 | Running /home/phabricator-android-builder/versions/7.6/bin/gradle clean |
3 | Starting a Gradle Daemon (subsequent builds will be faster) |
4 | > Task :app:clean |
5 | |
6 | BUILD SUCCESSFUL in 14s |
7 | 1 actionable task: 1 executed |
8 |
Passed |
Passed |