Replace app-versioning plugin
This commit is contained in:
parent
e64f9ff879
commit
63c06e234e
|
@ -1,5 +1,7 @@
|
|||
import io.github.reactivecircus.appversioning.SemVer
|
||||
|
||||
plugins {
|
||||
id 'com.gladed.androidgitversion' version '0.4.14'
|
||||
id("io.github.reactivecircus.app-versioning") version "1.3.1"
|
||||
}
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
|
@ -37,6 +39,17 @@ if (build_param != "prod") {
|
|||
}
|
||||
}
|
||||
|
||||
appVersioning {
|
||||
overrideVersionCode { gitTag, providers, variantInfo ->
|
||||
//SemVer-based version code
|
||||
def semVer = SemVer.fromGitTag(gitTag)
|
||||
semVer.major * 1000000 + semVer.minor * 1000 + semVer.patch
|
||||
|
||||
//Timestamp-based version code
|
||||
//Instant.now().epochSecond.toInt()
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
namespace 'es.ugr.swad.swadroid'
|
||||
compileSdk 34
|
||||
|
@ -52,8 +65,6 @@ android {
|
|||
|
||||
defaultConfig {
|
||||
applicationId "es.ugr.swad.swadroid"
|
||||
versionName androidGitVersion.name()
|
||||
versionCode androidGitVersion.code()
|
||||
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 34
|
||||
|
|
|
@ -17,7 +17,9 @@ android.nonFinalResIds=false
|
|||
android.nonTransitiveRClass=false
|
||||
android.useAndroidX=true
|
||||
org.gradle.jvmargs=-Xmx2560M
|
||||
org.gradle.unsafe.configuration-cache=true
|
||||
# Forced to false due to app-versioning plugin incompatibilities with Gradle cache. More details, visit
|
||||
# https://github.com/ReactiveCircus/app-versioning/issues/24
|
||||
org.gradle.unsafe.configuration-cache=false
|
||||
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. More details, visit
|
||||
|
|
Loading…
Reference in New Issue
Block a user