-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild.gradle
76 lines (67 loc) · 1.99 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
buildscript {
ext.kotlin_version = "1.7.20"
repositories {
google()
maven {
url "https://plugins.gradle.org/m2/"
}
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20'
classpath 'androidx.navigation:navigation-safe-args-gradle-plugin:2.5.3'
}
}
plugins {
id "org.jlleitschuh.gradle.ktlint" version "10.2.0"
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
id("org.jetbrains.dokka") version "1.6.10"
}
allprojects {
apply plugin: "org.jlleitschuh.gradle.ktlint" // Version should be inherited from parent
ktlint {
android = true
ignoreFailures = false
disabledRules = ["no-wildcard-imports", "import-ordering"]
reporters {
reporter "plain"
reporter "checkstyle"
}
filter {
exclude("**/generated/**")
include("**/kotlin/**")
}
}
repositories {
google()
maven { url "https://jitpack.io" }
mavenCentral()
}
}
subprojects {
repositories {
google()
mavenCentral()
}
apply {
plugin("org.jetbrains.dokka")
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
// Treat all Kotlin warnings as errors (disabled by default)
allWarningsAsErrors = project.hasProperty("warningsAsErrors") ? project.warningsAsErrors : false
freeCompilerArgs += '-Xopt-in=kotlin.RequiresOptIn'
// Enable experimental coroutines APIs, including Flow
freeCompilerArgs += '-Xopt-in=kotlin.Experimental'
// Set JVM target to 1.8
jvmTarget = "1.8"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
apply from: 'git-hooks.gradle'
apply from: 'versions.gradle'
apply from: "${rootDir}/scripts/publish-root.gradle"