forked from upstream-mirrors/quik
Merge pull request #604 from Inhishonor/f-droid
Support building a fdroid variant
This commit is contained in:
@@ -130,10 +130,10 @@ jobs:
|
|||||||
uses: gradle/wrapper-validation-action@v1
|
uses: gradle/wrapper-validation-action@v1
|
||||||
|
|
||||||
- name: Build signed release APK
|
- name: Build signed release APK
|
||||||
run: ./gradlew clean assembleRelease
|
run: ./gradlew clean assembleRelease assembleFdroid
|
||||||
|
|
||||||
- name: Locate release artifact
|
- name: Locate release artifact
|
||||||
id: artifact
|
id: release_artifact
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
@@ -143,7 +143,20 @@ jobs:
|
|||||||
echo "::error title=APK lookup failed::Expected 1 APK, found ${#files[@]} (${files[*]:-none})."
|
echo "::error title=APK lookup failed::Expected 1 APK, found ${#files[@]} (${files[*]:-none})."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "apk_path=${files[0]}" >> "$GITHUB_OUTPUT"
|
echo "apk_release_path=${files[0]}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Locate f-droid artifact
|
||||||
|
id: fdroid_artifact
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
shopt -s nullglob
|
||||||
|
files=(presentation/build/outputs/apk/fdroid/QUIK-v*-fdroid.apk)
|
||||||
|
if [[ "${#files[@]}" -ne 1 ]]; then
|
||||||
|
echo "::error title=APK lookup failed::Expected 1 APK, found ${#files[@]} (${files[*]:-none})."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "apk_fdroid_path=${files[0]}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Generate release notes
|
- name: Generate release notes
|
||||||
id: notes
|
id: notes
|
||||||
@@ -208,7 +221,9 @@ jobs:
|
|||||||
draft: ${{ inputs.publish_release != true }}
|
draft: ${{ inputs.publish_release != true }}
|
||||||
prerelease: ${{ inputs.prerelease }}
|
prerelease: ${{ inputs.prerelease }}
|
||||||
body: ${{ steps.clean_notes.outputs.clean_notes }}
|
body: ${{ steps.clean_notes.outputs.clean_notes }}
|
||||||
files: ${{ steps.artifact.outputs.apk_path }}
|
files: |
|
||||||
|
${{ steps.release_artifact.outputs.apk_release_path }}
|
||||||
|
${{ steps.fdroid_artifact.outputs.apk_fdroid_path }}
|
||||||
fail_on_unmatched_files: true
|
fail_on_unmatched_files: true
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
@@ -73,6 +73,14 @@ android {
|
|||||||
resValue("string", "application_id", defaultConfig.applicationId)
|
resValue("string", "application_id", defaultConfig.applicationId)
|
||||||
signingConfig signingConfigs.debug
|
signingConfig signingConfigs.debug
|
||||||
}
|
}
|
||||||
|
fdroid {
|
||||||
|
minifyEnabled true
|
||||||
|
shrinkResources true
|
||||||
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
|
signingConfig signingConfigs.release
|
||||||
|
matchingFallbacks = ['release']
|
||||||
|
applicationIdSuffix ".fdroid"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
@@ -106,6 +114,7 @@ androidExtensions {
|
|||||||
configurations {
|
configurations {
|
||||||
debug
|
debug
|
||||||
release
|
release
|
||||||
|
fdroid
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
Reference in New Issue
Block a user