generated from android/android-dev-challenge-compose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
56 lines (51 loc) · 1.47 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
53
54
55
56
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("com.diffplug.spotless") version "5.7.0"
}
buildscript {
repositories {
google()
jcenter()
gradlePluginPortal()
maven(url = "http://dl.bintray.com/kotlin/kotlin-eap")
}
dependencies {
classpath(Dependencies.androidGradlePlugin)
classpath(Dependencies.Kotlin.gradlePlugin)
classpath(Dependencies.Koin.gradlePlugin)
}
}
subprojects {
apply {
plugin("com.diffplug.spotless")
}
repositories {
google()
jcenter()
maven(url = "https://jitpack.io")
maven(url = "https://dl.bintray.com/kotlin/kotlin-eap")
maven(url = "https://oss.sonatype.org/content/repositories/snapshots/")
if (Dependencies.Compose.version.endsWith("SNAPSHOT")) {
maven(url = Dependencies.Compose.snapshotUrl)
}
}
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
useIR = true
jvmTarget = Versions.java
freeCompilerArgs = freeCompilerArgs + listOf(
"-Xopt-in=kotlin.RequiresOptIn",
"-Xjvm-default=enable"
)
}
}
spotless {
kotlin {
target("**/*.kt")
targetExclude("$buildDir/**/*.kt")
targetExclude("bin/**/*.kt")
ktlint("0.40.0")
licenseHeaderFile(rootProject.file("spotless/copyright.kt"))
}
}
}