forked from TwidereProject/TwidereX-Android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
54 lines (51 loc) · 1.6 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.diffplug.spotless").version(Versions.spotless)
id("com.github.ben-manes.versions").version("0.39.0")
}
buildscript {
repositories {
google()
}
dependencies {
classpath(kotlin("gradle-plugin", version = Versions.Kotlin.lang))
classpath("com.android.tools.build:gradle:${Versions.agp}")
classpath("com.squareup.sqldelight:gradle-plugin:${Versions.sqlDelight}")
}
}
allprojects {
configRepository()
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = Versions.Java.jvmTarget
allWarningsAsErrors = true
freeCompilerArgs = listOf(
"-Xopt-in=kotlin.RequiresOptIn",
"-Xjvm-default=all",
)
}
}
apply(plugin = "com.diffplug.spotless")
spotless {
kotlin {
target("**/*.kt")
targetExclude("$buildDir/**/*.kt", "bin/**/*.kt", "buildSrc/**/*.kt")
ktlint(Versions.ktlint)
licenseHeaderFile(rootProject.file("spotless/license"))
}
kotlinGradle {
target("*.gradle.kts")
ktlint(Versions.ktlint)
}
java {
target("**/*.java")
targetExclude("$buildDir/**/*.java", "bin/**/*.java")
licenseHeaderFile(rootProject.file("spotless/license"))
}
}
configurations.all {
resolutionStrategy {
force("org.objenesis:objenesis:3.2")
}
}
}