-
Notifications
You must be signed in to change notification settings - Fork 16
/
build.gradle.kts
64 lines (52 loc) · 1.61 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.time.Duration
plugins {
with(libs.plugins) {
alias(kotlin.jvm)
alias(kotlin.serialization) apply false
alias(kotlin.jupyter.api) apply false
alias(dokka) apply false
alias(korro) apply false
alias(nexus.publish)
}
}
val buildNumber: String? = properties["build_counter"]?.toString()
val kandyVersion = version.toString() + if (buildNumber == null) "" else "-dev-$buildNumber"
allprojects {
group = "org.jetbrains.kotlinx"
version = kandyVersion
apply(plugin = "kotlin")
kotlin.explicitApi()
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
allWarningsAsErrors = true
jvmTarget = "11"
}
}
java { toolchain { languageVersion.set(JavaLanguageVersion.of(11)) } }
}
val published = listOf(
"kandy-api",
"kandy-echarts",
"kandy-lets-plot",
"kandy-util"
)
configure(subprojects.filter { it.name in published }) {
apply(from = project.rootProject.file("gradle/publish.gradle"))
}
val sonatypeUser: String = System.getenv("SONATYPE_USER") ?: ""
val sonatypePassword: String = System.getenv("SONATYPE_PASSWORD") ?: ""
nexusPublishing {
packageGroup.set(project.group.toString())
this.repositories {
sonatype {
username.set(sonatypeUser)
password.set(sonatypePassword)
repositoryDescription.set("kandy staging repository, version: $version")
}
}
transitionCheckOptions {
maxRetries.set(100)
delayBetween.set(Duration.ofSeconds(5))
}
}