-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathbuild.gradle.kts
89 lines (81 loc) · 2.38 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:4.2.0-alpha16")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${Deps.kotlin.version}")
classpath("org.jetbrains.kotlin:kotlin-serialization:${Deps.kotlin.version}")
classpath("com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5")
}
}
plugins {
id("com.github.ben-manes.versions") version "0.36.0"
}
allprojects {
repositories {
google()
maven { setUrl("https://kotlin.bintray.com/kotlinx") }
maven { setUrl("https://jitpack.io") }
maven { setUrl("https://google.bintray.com/flexbox-layout") }
jcenter()
maven { setUrl("https://oss.sonatype.org/content/repositories/snapshots/") }
}
}
subprojects {
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompile> {
kotlinOptions {
freeCompilerArgs = freeCompilerArgs + listOf(
"-Xopt-in=kotlin.RequiresOptIn",
"-Xuse-experimental=kotlin.ExperimentalStdlibApi",
"-Xuse-experimental=kotlinx.coroutines.FlowPreview",
"-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi",
"-Xuse-experimental=kotlinx.serialization.ExperimentalSerializationApi",
// For Jetpack Compose
"-Xallow-jvm-ir-dependencies",
"-Xskip-prerelease-check"
)
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
@Suppress("DEPRECATION")
plugins.withType<com.android.build.gradle.BasePlugin> {
configure<com.android.build.gradle.BaseExtension> {
compileSdkVersion(Config.compileSdk)
defaultConfig {
minSdkVersion(Config.minSdk)
targetSdkVersion(Config.targetSdk)
versionCode(Config.versionCode)
versionName(Config.versionName)
ndk {
version = Config.ndk
}
}
compileOptions {
sourceCompatibility(JavaVersion.VERSION_1_8)
targetCompatibility(JavaVersion.VERSION_1_8)
}
sourceSets["main"].java.srcDirs("src/main/kotlin")
}
}
plugins.withType<JacocoPlugin> {
configure<JacocoPluginExtension> {
toolVersion = "0.8.6"
}
}
afterEvaluate {
tasks.withType<JacocoReport> {
reports {
xml.isEnabled = true
html.isEnabled = false
}
}
}
}
tasks.register("clean", Delete::class) {
delete(rootProject.buildDir)
}