-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
34 lines (28 loc) · 1.01 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import org.eclipse.jgit.api.Git
import org.eclipse.jgit.internal.storage.file.FileRepository
buildscript {
repositories {
google()
mavenCentral()
maven("https://jitpack.io")
}
dependencies {
classpath("com.android.tools.build:gradle:7.0.2")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21")
classpath("org.eclipse.jgit:org.eclipse.jgit:5.12.0.202106070339-r")
}
}
val repo = FileRepository(rootProject.file(".git"))
val refId = repo.refDatabase.exactRef("refs/remotes/origin/dev-compose").objectId!!
val commitCount = Git(repo).log().add(refId).call().count()
val packageName by extra("com.github.sukieva.hhuer")
val verCode by extra(commitCount + 1000)
val verName by extra("1.0.0")
val targetSdkVersion by extra(31)
val minSdkVersion by extra(27)
val androidBuildToolsVersion by extra("31.0.0")
val compileSdkVersion by extra(31)
val compileNdkVersion by extra("23.0.7599858")
tasks.register("Delete", Delete::class) {
delete(rootProject.buildDir)
}