-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
/
build.gradle
47 lines (43 loc) · 1.33 KB
/
build.gradle
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
35
36
37
38
39
40
41
42
43
44
45
46
47
import org.ajoberstar.grgit.Grgit
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id "com.android.tools.build" apply false
id 'net.ltgt.errorprone' apply false
id "com.google.devtools.ksp" apply false
id "org.ajoberstar.grgit" apply false
id "org.jetbrains.kotlin.jvm" apply false
id "com.vanniktech.maven.publish" apply false
id "org.jetbrains.dokka" apply false
id "androidx.baselineprofile" apply false
id "org.jetbrains.kotlinx.binary-compatibility-validator" apply false
}
allprojects {
def compileJavaVersion = JavaVersion.VERSION_17
def targetJavaVersion = JavaVersion.VERSION_17
pluginManager.withPlugin("java") {
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(compileJavaVersion.majorVersion))
}
}
tasks.withType(JavaCompile).configureEach {
options.release.set(targetJavaVersion.majorVersion)
}
}
pluginManager.withPlugin("org.jetbrains.kotlin.android") {
kotlin {
jvmToolchain(compileJavaVersion.majorVersion.toInteger())
}
tasks.withType(KotlinCompile).configureEach {
kotlinOptions.jvmTarget = targetJavaVersion.toString()
}
}
}
ext {
git = Grgit.open(currentDir: project.rootDir)
gitSha = git.head().id
gitBranch = git.branch.current().name
}
tasks.register('clean', Delete) {
delete rootProject.buildDir
}