forked from home-assistant/android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
52 lines (44 loc) · 1.15 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
alias(libs.plugins.ktlint)
}
buildscript {
repositories {
google()
gradlePluginPortal()
}
dependencies {
classpath(libs.android.plugin)
classpath(libs.kotlin.gradle.plugin)
classpath(libs.google.services)
classpath(libs.firebase.appdistribution.gradle)
classpath(libs.android.junit5)
classpath(libs.play.publisher)
classpath(libs.hilt.android.gradle.plugin)
}
}
allprojects {
apply(plugin = "org.jlleitschuh.gradle.ktlint")
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = "11"
}
}
}
gradle.projectsEvaluated {
project(":app").tasks.matching { it.name.startsWith("publish") }.configureEach {
mustRunAfter(project(":wear").tasks.matching { it.name.startsWith("publish") })
}
}
tasks.register("clean").configure {
delete("build")
}
ktlint {
android.set(true)
}
tasks.register("versionFile").configure {
group = "publishing"
doLast {
File(projectDir, "version.txt").writeText(project.version.toString())
}
}