-
Notifications
You must be signed in to change notification settings - Fork 181
/
build.gradle
99 lines (89 loc) · 3.22 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import io.github.droidkaigi.feeder.Dep
buildscript {
repositories {
google()
mavenCentral()
// This snippet enables jcenter only for the dependencies described within the block.
// Once they are on maven central you can just remove it.
// https://github.com/Kotlin/kotlinx.html/issues/173#issuecomment-800504909
jcenter {
content {
includeModule("org.jetbrains.kotlinx", "kotlinx-html-jvm")
includeModule("org.jetbrains.kotlinx", "kotlinx-collections-immutable-jvm")
}
}
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.0-rc01'
classpath Dep.Kotlin.bom
classpath Dep.Kotlin.plugin
classpath Dep.Kotlin.stdlibJdk8
classpath Dep.Kotlin.serializationPlugin
classpath Dep.PlayServices.plugin
classpath Dep.Dagger.plugin
classpath Dep.FirebaseCrashlytics.plugin
classpath Dep.exhaustivePlugin
classpath Dep.SQLDelight.plugin
classpath Dep.playServicesOssLicensesPlugin
classpath Dep.buildKonfig
}
}
plugins {
id 'com.diffplug.spotless' version '5.7.0'
}
allprojects {
repositories {
google()
mavenCentral()
// This snippet enables jcenter only for the dependencies described within the block.
// Once they are on maven central you can just remove it.
// https://github.com/Kotlin/kotlinx.html/issues/173#issuecomment-800504909
jcenter {
content {
includeModule("org.jetbrains.kotlinx", "kotlinx-html-jvm")
includeModule("org.jetbrains.kotlinx", "kotlinx-collections-immutable-jvm")
}
}
maven { url 'https://androidx.dev/snapshots/builds/6767375/artifacts/ui/repository' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
}
allprojects {
repositories {
google()
mavenCentral()
}
apply plugin: 'com.diffplug.spotless'
spotless {
ratchetFrom 'origin/main'
kotlin {
target '**/*.kt'
targetExclude("$buildDir/**/*.kt")
targetExclude('bin/**/*.kt')
targetExclude("**/generated/**/*.kt")
ktlint(Dep.ktlint.split(":").last())
.userData([android: "true", experimental: "true"])
}
}
// FIXME: opt-on does not working in Android Studio
def compilerArgs = [
"-Xopt-in=kotlin.contracts.ExperimentalContracts",
"-Xopt-in=androidx.compose.material.ExperimentalMaterialApi",
"-Xopt-in=androidx.compose.foundation.ExperimentalFoundationApi",
"-Xopt-in=com.google.accompanist.pager.ExperimentalPagerApi",
"-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
"-Xopt-in=kotlin.RequiresOptIn",
]
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
jvmTarget = "1.8"
compilerArgs.forEach { compilerArg ->
freeCompilerArgs += compilerArg
}
}
}
}
apply from: file('gradle/dependencyGraph.gradle')
wrapper {
distributionType = Wrapper.DistributionType.ALL
}