File tree 1 file changed +14
-8
lines changed
1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -21,13 +21,19 @@ if [ -z $JKS_KEYPASS ]; then
21
21
exit 1
22
22
fi
23
23
24
+ # Zipalign
25
+ zipalign=$( find $ANDROID_HOME /build-tools -name " zipalign" -print | head -n 1)
26
+ $zipalign -v 4 $input $input .new
27
+ mv $input .new $input
28
+
24
29
# Sign
25
- jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 \
26
- -storepass $JKS_STOREPASS -keypass $JKS_KEYPASS \
27
- -keystore android.jks $input activitywatch
28
- jarsigner -verify $input
29
- mv $input $output
30
+ # Using apksigner instead of jarsigner since API 30+: https://stackoverflow.com/a/69473649
31
+ apksigner sign --ks android.jks --ks-key-alias activitywatch \
32
+ --ks-pass env:JKS_STOREPASS --key-pass env:JKS_KEYPASS \
33
+ $input
30
34
31
- zipalign=$( find $ANDROID_HOME /build-tools -name " zipalign" -print | head -n 1)
32
- $zipalign -v 4 $output $output .new
33
- mv $output .new $output
35
+ # Verify
36
+ apksigner verify $input
37
+
38
+ # Move to output destination
39
+ mv $input $output
You can’t perform that action at this time.
0 commit comments