-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
47 lines (39 loc) · 1.4 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
apply from: rootProject.file('./scripts/spotless.gradle')
dependencies {
classpath "com.diffplug.spotless:spotless-plugin-gradle:6.9.1"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.7.10"
}
}
plugins {
id "com.android.application" version "7.3.0" apply false
id "com.android.library" version "7.3.0" apply false
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
}
subprojects {
if ("app".equalsIgnoreCase(project.name)) {
apply plugin: 'com.android.application'
} else {
apply plugin: 'com.android.library'
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
// Treat all Kotlin warnings as errors
allWarningsAsErrors = false
// Set JVM target to 8-11
jvmTarget = JavaVersion.VERSION_1_8
}
}
if (project.hasProperty("android")) {
apply plugin: 'org.jetbrains.dokka'
project.dependencies {
dokkaHtmlPlugin("org.jetbrains.dokka:kotlin-as-java-plugin:1.7.10")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4")
}
project.android.ndkVersion = "22.1.7171670"
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}