-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
73 lines (66 loc) · 2.53 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
plugins {
alias(libs.plugins.kotlin.jvm) apply false
alias(libs.plugins.kapt) apply false
alias(libs.plugins.publish) apply false
alias(libs.plugins.dokka) apply false
signing
}
apply("./common.gradle.kts")
subprojects {
afterEvaluate {
extensions.getByType<org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension>().apply {
sourceSets.all {
languageSettings {
optIn("kotlin.contracts.ExperimentalContracts")
optIn("kotlin.RequiresOptIn")
}
}
target {
attributes {
attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 8)
}
compilations.configureEach {
kotlinOptions {
jvmTarget = "1.8"
}
compileJavaTaskProvider.get().apply {
targetCompatibility = "1.8"
sourceCompatibility = "1.8"
}
}
}
}
extensions.findByType<com.vanniktech.maven.publish.MavenPublishBaseExtension>()?.apply {
if (!version.toString().toLowerCase().endsWith("snapshot")) {
val stagingProfileId = project.findProperty("sonatypeRepositoryId")?.toString()
publishToMavenCentral(com.vanniktech.maven.publish.SonatypeHost.DEFAULT, stagingProfileId)
}
}
}
}
tasks.create("documentation") {
group = "documentation"
dependsOn(
":compiler-plugin-utils:dokkaHtml",
gradle.includedBuild("plugins").task(":compiler-plugin-utils-compiler-plugin:dokkaHtml"),
gradle.includedBuild("plugins").task(":compiler-plugin-utils-gradle-plugin:dokkaHtml")
)
}
tasks.create("publish") {
group = "publishing"
dependsOn(
":compiler-plugin-utils:publish",
":compiler-plugin-utils-native:publish",
gradle.includedBuild("plugins").task(":compiler-plugin-utils-compiler-plugin:publish"),
gradle.includedBuild("plugins").task(":compiler-plugin-utils-gradle-plugin:publish")
)
}
tasks.create("publishToMavenLocal") {
group = "publishing"
dependsOn(
":compiler-plugin-utils:publishToMavenLocal",
":compiler-plugin-utils-native:publishToMavenLocal",
gradle.includedBuild("plugins").task(":compiler-plugin-utils-compiler-plugin:publishToMavenLocal"),
gradle.includedBuild("plugins").task(":compiler-plugin-utils-gradle-plugin:publishToMavenLocal")
)
}