-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle.kts
70 lines (61 loc) · 1.93 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
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
buildscript {
repositories {
mavenCentral()
gradlePluginPortal()
google()
}
dependencies {
classpath(libs.android.gradle)
classpath(libs.paparazzi)
classpath("com.jeppeman.mockposable:mockposable-gradle")
}
}
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
kotlin("jvm") version libs.versions.kotlin.get() apply false
alias(libs.plugins.compose.compiler) apply false
}
allprojects {
repositories {
mavenCentral()
google()
}
tasks.withType(Test::class.java).configureEach {
testLogging {
exceptionFormat = TestExceptionFormat.FULL
showCauses = true
showExceptions = true
showStackTraces = true
showStandardStreams = true
events = setOf(
TestLogEvent.PASSED,
TestLogEvent.SKIPPED,
TestLogEvent.FAILED,
TestLogEvent.STANDARD_OUT,
TestLogEvent.STANDARD_ERROR
)
}
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class) {
kotlinOptions {
jvmTarget = JvmTarget.JVM_11.target
}
}
tasks.withType(JavaCompile::class).configureEach {
sourceCompatibility = JavaVersion.VERSION_11.toString()
targetCompatibility = JavaVersion.VERSION_11.toString()
}
plugins.withType(com.android.build.gradle.BasePlugin::class).configureEach {
val android = extensions.getByName("android") as com.android.build.gradle.BaseExtension
android.compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}
}
task("clean", Delete::class) {
delete(rootProject.buildDir)
}