Commit 382d51f6 authored by Christophe Deschamps's avatar Christophe Deschamps
Browse files

Moved to semantic naming


Former-commit-id: 71891ce757286d82314701f72f28078bbbc3f9ff
parent 29476722
Pipeline #28994 failed with stage
......@@ -34,13 +34,11 @@ job-android:
- ./gradlew app:dependencies | grep org.linphone
- ./gradlew assembleDebug
- ./gradlew assembleRelease
- cp ./app/build/outputs/apk/debug/app-debug.apk lindoor-debug-unsigned.apk
- cp ./app/build/outputs/apk/release/app-release.apk lindoor-release-signed.apk
artifacts:
paths:
- lindoor-debug-unsigned.apk
- lindoor-release-signed.apk
- ./app/build/outputs/apk/debug/lindoor-android-debug-*.apk
- ./app/build/outputs/apk/release/lindoor-android-release-*.apk
when: always
expire_in: 1 week
......@@ -41,6 +41,40 @@ afterEvaluate {
task.dependsOn tasks.zipTheme
}
task getGitVersion() {
def gitVersion = "5.0.0"
def gitVersionStream = new ByteArrayOutputStream()
def gitCommitsCount = new ByteArrayOutputStream()
def gitCommitHash = new ByteArrayOutputStream()
try {
exec {
executable "git" args "describe", "--abbrev=0", "--tags"
standardOutput = gitVersionStream
}
exec {
executable "git" args "rev-list", gitVersionStream.toString().trim() + "..HEAD", "--count"
standardOutput = gitCommitsCount
}
exec {
executable "git" args "rev-parse", "--short", "HEAD"
standardOutput = gitCommitHash
}
if (gitCommitsCount.toString().toInteger() == 0) {
gitVersion = gitVersionStream.toString().trim()
} else {
gitVersion = gitVersionStream.toString().trim() + "." + gitCommitsCount.toString().trim() + "+" + gitCommitHash.toString().trim()
}
println("Git version: " + gitVersion)
} catch (ignored) {
println("Git not found")
}
project.version = gitVersion
}
project.tasks['preBuild'].dependsOn 'getGitVersion'
android {
compileSdkVersion 29
......@@ -56,6 +90,9 @@ android {
applicationVariants.all { variant ->
variant.getMergedFlavor().manifestPlaceholders = [lindoor_file_provider: applicationId + ".fileprovider"]
variant.outputs.all {
outputFileName = "lindoor-android-${variant.buildType.name}-${project.version}.apk"
}
}
signingConfigs {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment