-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
68 lines (59 loc) · 1.98 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
dependencies {
classpath("com.android.tools.build:gradle:7.3.0")
classpath("de.mannodermaus.gradle.plugins:android-junit5:1.8.2.1")
classpath("com.google.gms:google-services:4.3.14")
classpath("com.google.firebase:firebase-crashlytics-gradle:2.9.2")
classpath("com.google.firebase:perf-plugin:1.4.2")
}
}
plugins {
id(Plugins.detekt.name) version Plugins.detekt.version
id(Plugins.ktLint.name) version Plugins.ktLint.version
}
allprojects {
Keys.initialize(File("auth.properties"))
repositories.applyDefault()
val javaVersion = JavaVersion.VERSION_11.toString()
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().all {
kotlinOptions {
jvmTarget = javaVersion
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
// Enable experimental coroutines APIs, including collectAsState()
freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
}
}
tasks.withType<JavaCompile>().all {
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
}
apply {
plugin(Plugins.detekt.name)
plugin(Plugins.ktLint.name)
}
detekt {
toolVersion = "1.20.0"
config = rootProject.files("$rootDir/.detekt/config.yml")
reports {
html {
required.set(true)
outputLocation.set(file("build/reports/detekt/report.html"))
}
}
}
ktlint {
debug.set(false)
version.set("0.45.2")
verbose.set(true)
android.set(false)
outputToConsole.set(true)
ignoreFailures.set(false)
enableExperimentalRules.set(true)
filter {
exclude("**/generated/**")
include("**/kotlin/**")
}
}
}