-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle.kts
58 lines (51 loc) · 1.76 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
import java.util.Properties
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
plugins {
id("org.jetbrains.kotlin.android") version "2.0.21" apply false
id("org.jetbrains.kotlin.plugin.serialization") version "2.0.21" apply false
id("org.jetbrains.kotlin.plugin.compose") version "2.0.21" apply false
id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.16.3" apply false
id("org.jmailen.kotlinter") version "4.5.0" apply false
id("com.android.application") version "8.7.3" apply false
id("com.vanniktech.maven.publish") version "0.30.0" apply false
id("com.gradleup.nmcp") version "0.0.9"
}
subprojects {
tasks.withType<KotlinJvmCompile>().configureEach {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
allWarningsAsErrors.set(true)
}
}
val signingPropsFile = rootProject.file("release/signing.properties")
if (signingPropsFile.exists()) {
val localProperties = Properties()
with(signingPropsFile.inputStream()) {
localProperties.load(this)
}
localProperties.forEach { key, value ->
if (key == "signing.secretKeyRingFile") {
project.ext.set(key as String, rootProject.file(value).absolutePath)
} else {
project.ext.set(key as String, value)
}
}
}
}
nmcp {
publishAggregation {
project(":bottomsheet")
project(":modalsheet")
project(":results")
val signingPropsFile = rootProject.file("release/signing.properties")
if (!signingPropsFile.exists()) return@publishAggregation
val localProperties = Properties()
with(signingPropsFile.inputStream()) {
localProperties.load(this)
}
username = localProperties.getProperty("centralSonatypeUsername")
password = localProperties.getProperty("centralSonatypePassword")
publicationType = "AUTOMATIC"
}
}