-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
66 lines (62 loc) · 1.96 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
57
58
59
60
61
62
63
64
65
66
buildscript {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-serialization:_")
classpath("dev.icerock.moko:resources-generator:_")
classpath("com.squareup.sqldelight:gradle-plugin:_")
classpath("com.apollographql.apollo3:apollo-gradle-plugin:_")
classpath("com.google.gms:google-services:_")
}
}
allprojects {
configurations.configureEach {
resolutionStrategy {
eachDependency {
when (requested.name) {
"kotlinx-coroutines-core" -> useVersion(Version.coroutines)
}
}
}
}
}
plugins {
id("org.jlleitschuh.gradle.ktlint")
}
subprojects {
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().all {
kotlinOptions {
jvmTarget = "11"
}
}
afterEvaluate {
project.extensions.findByType<org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension>()
?.let { kmpExt ->
kmpExt.sourceSets.run {
all {
languageSettings.apply {
progressiveMode = true
optIn("kotlin.RequiresOptIn")
optIn("kotlin.time.ExperimentalTime")
optIn("kotlinx.serialization.ExperimentalSerializationApi")
optIn("kotlinx.coroutines.ExperimentalCoroutinesApi")
}
}
}
}
// tasks.named("check").configure {
// dependsOn(tasks.getByName("ktlintCheck"))
// }
}
}
tasks.register("clean", Delete::class).configure {
group = "build"
delete(rootProject.buildDir)
}
afterEvaluate {
// We install the hook at the first occasion
tasks["clean"].dependsOn(tasks.getByName("addKtlintFormatGitPreCommitHook"))
}