Skip to content

Commit cbae263

Browse files
committed
[skip ci] Bump 1.6.7
1 parent 640fdfd commit cbae263

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

.github/workflows/android.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
- uses: actions/checkout@v3
1717
with:
1818
submodules: 'recursive'
19+
fetch-depth: 0
1920
- name: Setup JDK 17
2021
uses: actions/setup-java@v3
2122
with:

app/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ val releaseStorePassword: String? by rootProject
2626
val releaseKeyAlias: String? by rootProject
2727
val releaseKeyPassword: String? by rootProject
2828

29-
val appVerCode: String by rootProject
29+
val appVerCode: Int by rootProject
3030
val appVerName: String by rootProject
3131

3232
val kotlinVersion: String by rootProject
@@ -41,7 +41,7 @@ android {
4141
applicationId = "me.iacn.biliroaming"
4242
minSdk = 24
4343
targetSdk = 33 // Target Android T
44-
versionCode = appVerCode.toInt()
44+
versionCode = appVerCode
4545
versionName = appVerName
4646

4747
externalNativeBuild {

build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2+
import org.eclipse.jgit.api.Git
3+
import org.eclipse.jgit.internal.storage.file.FileRepository
24

35
buildscript {
46
val kotlinVersion by extra("1.7.20")
@@ -11,12 +13,18 @@ buildscript {
1113
classpath("com.android.tools.build:gradle:7.3.1")
1214
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
1315
classpath("com.google.protobuf:protobuf-gradle-plugin:0.9.1")
16+
classpath("org.eclipse.jgit:org.eclipse.jgit:6.3.0.202209071007-r")
1417

1518
// NOTE: Do not place your application dependencies here; they belong
1619
// in the individual module build.gradle files
1720
}
1821
}
1922

23+
val repo = FileRepository(rootProject.file(".git"))
24+
val refId = repo.refDatabase.exactRef("refs/remotes/origin/master").objectId!!
25+
val commitCount = Git(repo).log().add(refId).call().count()
26+
val appVerCode by extra(commitCount)
27+
2028
allprojects {
2129
repositories {
2230
google()

gradle.properties

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,4 @@ android.enableR8.fullMode=true
1818
android.experimental.enableNewResourceShrinker=true
1919
android.experimental.enableNewResourceShrinker.preciseShrinking=true
2020

21-
appVerName=1.6.6
22-
appVerCode=66
21+
appVerName=1.6.7

0 commit comments

Comments
 (0)