use commit count as version code

This commit is contained in:
tehcneko 2024-05-28 19:22:54 +08:00
parent 622283dd14
commit 34f0dd41c4
2 changed files with 5 additions and 1 deletions

View File

@ -10,7 +10,7 @@ android {
applicationId "io.github.lsposed.disableflagsecure" applicationId "io.github.lsposed.disableflagsecure"
minSdkVersion 24 minSdkVersion 24
targetSdkVersion 34 targetSdkVersion 34
versionCode 8 versionCode rootProject.ext.commitCount
versionName "3.1.0" versionName "3.1.0"
} }

View File

@ -1,7 +1,11 @@
plugins { plugins {
id 'com.android.application' version '8.4.1' apply false id 'com.android.application' version '8.4.1' apply false
id 'org.lsposed.lsplugin.jgit' version "1.1"
} }
tasks.register('clean', Delete) { tasks.register('clean', Delete) {
delete rootProject.buildDir delete rootProject.buildDir
} }
var repo = jgit.repo(true)
ext.commitCount = repo.commitCount('refs/remotes/origin/main')