forked from getsentry/sentry-android
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
82 lines (73 loc) · 2.23 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import com.diffplug.spotless.LineEnding
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins {
`java-library`
id(Config.QualityPlugins.spotless) version Config.QualityPlugins.spotlessVersion apply true
jacoco
}
configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
buildscript {
repositories {
google()
jcenter()
maven { setUrl("https://dl.bintray.com/maranda/maven/") }
}
dependencies {
classpath(Config.BuildPlugins.androidGradle)
classpath(kotlin(Config.BuildPlugins.kotlinGradlePlugin, version = Config.kotlinVersion))
classpath(Config.QualityPlugins.errorpronePlugin)
classpath(Config.Deploy.novodaBintrayPlugin)
classpath(Config.QualityPlugins.gradleVersionsPlugin)
// add classpath of androidNativeBundle
// com.ydq.android.gradle.build.tool:nativeBundle:{version}}
classpath(Config.NativePlugins.nativeBundlePlugin)
// add classpath of sentry android gradle plugin
// classpath("io.sentry:sentry-android-gradle-plugin:{version}")
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
group = Config.Sentry.group
version = properties[Config.Sentry.versionNameProp].toString()
description = Config.Sentry.description
tasks {
withType<Test> {
testLogging.showStandardStreams = true
testLogging.exceptionFormat = TestExceptionFormat.FULL
testLogging.events = setOf(
TestLogEvent.SKIPPED,
TestLogEvent.PASSED,
TestLogEvent.FAILED)
dependsOn("cleanTest")
}
withType<JavaCompile> {
options.compilerArgs.addAll(arrayOf("-Xlint:all", "-Werror", "-Xlint:-classfile"))
}
}
}
spotless {
lineEndings = LineEnding.UNIX
java {
target("**/*.java")
removeUnusedImports()
googleJavaFormat()
}
kotlin {
ktlint()
target("**/*.kt")
}
kotlinGradle {
ktlint()
}
}
tasks.named("build") {
dependsOn(":spotlessApply")
}