-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
47 lines (42 loc) · 1.17 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
buildscript {
apply from: 'versions.gradle'
addRepos(repositories)
dependencies {
classpath deps.android_gradle_plugin
classpath deps.kotlin.plugin
classpath deps.google_services_plugin
}
}
// spotless for Kotlin style code formatting
plugins {
id "com.diffplug.gradle.spotless" version "3.14.0"
}
allprojects {
addRepos(repositories)
}
// increase error limit for compiler; dataBinding can throw hundreds of errors at a time
allprojects {
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xmaxerrs" << "1000"
}
}
}
subprojects {
apply plugin: 'com.diffplug.gradle.spotless'
spotless {
kotlin {
target "**/*.kt"
ktlint("0.28.0")
licenseHeaderFile project.rootProject.file('spotless/copyright.kt')
}
}
}
subprojects { subProject ->
afterEvaluate {
if (subProject.plugins.hasPlugin("kotlin") && subProject.plugins.hasPlugin("java-library")) {
subProject.kotlin.copyClassesToJavaOutput = true
subProject.jar.duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
}
}