-
Notifications
You must be signed in to change notification settings - Fork 215
/
build.gradle
105 lines (92 loc) · 2.64 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
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
96
97
98
99
100
101
102
103
104
105
buildscript {
repositories {
mavenCentral()
google()
gradlePluginPortal()
//mavenLocal()
}
dependencies {
classpath libs.plugin.kotlin
classpath libs.plugin.kotlin.compose
classpath libs.plugin.kotlinApiDump
classpath libs.plugin.android
classpath libs.plugin.mavenPublish
classpath libs.plugin.dokka
classpath libs.plugin.spotless
classpath libs.plugin.buildConfig
classpath libs.plugin.poko
// Normally you would declare a version here, but we use dependency substitution in
// settings.gradle to use the version built from inside the repo.
classpath 'app.cash.paparazzi:paparazzi-gradle-plugin'
classpath 'app.cash.paparazzi:aar2jar'
}
}
apply plugin: 'binary-compatibility-validator'
apiValidation {
ignoredProjects += ['sample']
}
subprojects {
version = property("VERSION_NAME") as String
repositories {
mavenCentral()
google()
//mavenLocal()
}
// Uncomment to debug JNI issues in layoutlib
// jvmArgs '-Xcheck:jni'
tasks.withType(Test).configureEach {
testLogging {
events "passed", "failed", "skipped", "standardOut", "standardError"
exceptionFormat "full"
showExceptions true
showStackTraces true
showCauses true
}
}
tasks.withType(JavaCompile).configureEach {
sourceCompatibility = libs.versions.javaTarget.get()
targetCompatibility = libs.versions.javaTarget.get()
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile).configureEach {
kotlinOptions {
jvmTarget = libs.versions.javaTarget.get()
}
}
plugins.withId('org.jetbrains.kotlin.jvm') {
extensions.getByName('kotlin').explicitApi()
}
plugins.withId('com.vanniktech.maven.publish') {
publishing {
repositories {
maven {
name = "projectLocalMaven"
url = rootProject.layout.buildDirectory.dir("localMaven")
}
/**
* Want to push to an internal repository for testing?
* Set the following properties in ~/.gradle/gradle.properties.
*
* internalUrl=YOUR_INTERNAL_URL
* internalUsername=YOUR_USERNAME
* internalPassword=YOUR_PASSWORD
*/
maven {
name = "internal"
url = providers.gradleProperty("internalUrl")
credentials(PasswordCredentials)
}
}
}
}
apply plugin: 'com.diffplug.spotless'
spotless {
kotlin {
target("src/**/*.kt")
ktlint(libs.ktlint.core.get().version)
.setEditorConfigPath(rootProject.file(".editorconfig"))
}
}
}
tasks.register("clean", Delete).configure {
delete(rootProject.layout.buildDirectory)
}