1
0
mirror of https://gitlab.shinice.net/pixeldroid/PixelDroid synced 2024-12-26 15:04:04 +01:00

Merge branch 'fix_fdroid_compilation' into 'master'

Fix fdroid build ci

See merge request pixeldroid/PixelDroid!603
This commit is contained in:
Matthieu 2024-08-30 19:25:16 +00:00
commit a103954beb
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'