Fix fdroid build ci

This commit is contained in:
Matthieu 2024-08-30 21:24:45 +02:00
parent 42e44d47f9
commit f50fd578c8
2 changed files with 12 additions and 1 deletions

View File

@ -126,7 +126,7 @@ fdroid build:
- .gradle
script:
# Put the correct versionName and versionCode in the .fdroid.yml
- sed -e "s/\${versionName}/$(grep "versionName " app/build.gradle | awk '{print $2}' | tr -d \")$(grep "versionCode" app/build.gradle -m 1 | awk '{print $2}')/" -e "s/\${versionCode}/$(grep "versionCode" app/build.gradle -m 1 | awk '{print $2}')/" .fdroid.yml.template > .fdroid.yml
- sed -e "s/\${versionName}/$(./gradlew -q printVersionName)/" -e "s/\${versionCode}/$(./gradlew -q printVersionCode)/" .fdroid.yml.template > .fdroid.yml
- rm .fdroid.yml.template
# each `fdroid build --on-server` run expects sudo, then uninstalls it
- set -x

View File

@ -166,6 +166,17 @@ android {
}
}
tasks.register('printVersionName') {
doLast {
println android.defaultConfig.versionName
}
}
tasks.register('printVersionCode') {
doLast {
println android.defaultConfig.versionCode
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.hilt:hilt-common:1.2.0'