-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
95 lines (83 loc) · 2.74 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
83
84
85
86
87
88
89
90
91
92
93
94
95
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
buildscript {
repositories {
google()
mavenCentral()
maven("https://plugins.gradle.org/m2/")
}
dependencies {
classpath("com.android.tools.build:gradle:${Versions.gradle}")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}")
classpath("org.jetbrains.kotlin:kotlin-serialization:${Versions.kotlin}")
classpath("org.jetbrains.dokka:dokka-gradle-plugin:${Versions.dokka}")
classpath("org.jlleitschuh.gradle:ktlint-gradle:${Versions.gradleKlint}")
classpath("de.mannodermaus.gradle.plugins:android-junit5:${Versions.androidJUnit5}")
classpath("org.jacoco:org.jacoco.core:${Versions.jacoco}")
classpath("com.google.gms:google-services:${Versions.googleServices}")
}
}
plugins {
id("org.sonarqube") version Versions.sonarqube
id("org.jetbrains.dokka") version Versions.dokka
}
allprojects {
apply(plugin = "org.jlleitschuh.gradle.ktlint")
repositories {
google()
mavenCentral()
maven("https://jitpack.io")
jcenter {
content {
includeGroup("com.schibsted.spain") // https://github.com/AdevintaSpain/Barista/issues/382
}
}
}
plugins.withType(JavaLibraryPlugin::class) {
tasks.getByName("test", Test::class) {
useJUnitPlatform()
testLogging {
exceptionFormat = TestExceptionFormat.FULL
events("passed", "failed", "skipped", "standardOut", "standardError")
}
}
}
sonarqube {
properties {
setProperty("sonar.sources", "src")
}
}
}
subprojects {
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions.jvmTarget = Versions.jvmTarget
}
apply(plugin = "jacoco")
apply(plugin = "plugins.jacoco-report")
apply(plugin = "org.jetbrains.dokka")
plugins.withType<JacocoPlugin> {
the<JacocoPluginExtension>().apply {
toolVersion = Versions.jacoco
reportsDir = file("$buildDir/jacoco/reports")
}
}
}
tasks.dokkaHtmlMultiModule.configure {
outputDirectory.set(buildDir.resolve("dokkaCustomMultiModuleOutput"))
}
tasks.register("clean", Delete::class.java) {
delete(rootProject.buildDir)
}
sonarqube {
properties {
setProperty("sonar.organization", "celerikdevops")
setProperty("sonar.projectKey", "flowos_android")
setProperty("sonar.host.url", "https://sonarcloud.io")
setProperty("sonar.sourceEncoding", "UTF-8")
setProperty("sonar.language", "kotlin")
setProperty("sonar.exclusions", "**/build/**, **/*.xml, **/test/**")
setProperty("sonar.coverage.exclusions", "**/test/**, **/androidTest/**")
setProperty("sonar.java.coveragePlugin", "jacoco")
setProperty("sonar.jacoco.reportPaths", "**/build/jacoco/*.exec")
}
}