-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
105 lines (100 loc) · 4 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
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
import com.vanniktech.maven.publish.GradlePlugin
import com.vanniktech.maven.publish.JavaLibrary
import com.vanniktech.maven.publish.JavadocJar
import com.vanniktech.maven.publish.KotlinJvm
import com.vanniktech.maven.publish.KotlinMultiplatform
import com.vanniktech.maven.publish.MavenPublishBaseExtension
import com.vanniktech.maven.publish.SonatypeHost
buildscript {
repositories {
mavenLocal()
mavenCentral()
google()
gradlePluginPortal()
maven {
url = uri("https://oss.sonatype.org/service/local/repositories/snapshots/content")
} // SNAPSHOT Versions for statik
}
}
allprojects {
repositories {
mavenCentral()
google()
gradlePluginPortal()
maven {
url = uri("https://oss.sonatype.org/service/local/repositories/snapshots/content")
} // SNAPSHOT Versions for statik
}
}
plugins {
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.jetbrains.compose) apply false
alias(libs.plugins.vanniktech.maven.publish) apply false
}
if (hasProperty("buildScan")) {
extensions.findByName("buildScan")?.withGroovyBuilder {
setProperty("termsOfServiceUrl", "https://gradle.com/terms-of-service")
setProperty("termsOfServiceAgree", "yes")
}
}
subprojects
.forEach {
it.afterEvaluate {
val hasPublishPlugin = it.plugins.hasPlugin("com.vanniktech.maven.publish.base")
if (hasPublishPlugin) {
it.extensions.getByType(MavenPublishBaseExtension::class.java).apply {
publishToMavenCentral(SonatypeHost.S01, automaticRelease = true)
val isCI = System.getenv().containsKey("GITHUB_ACTIONS")
if (isCI) {
signAllPublications()
}
pom {
url.set("https://www.github.com/square/invert")
name = "Invert"
description = "Inverted view of your Gradle Project"
licenses {
license {
name.set("The Apache Software License, Version 2.0")
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt")
distribution.set("repo")
}
}
scm {
url.set("https://www.github.com/square/invert")
connection.set("scm:git:git://github.com/square/invert.git")
developerConnection.set("scm:git:ssh://git@github.com/square/invert.git")
}
developers {
developer {
name.set("Block, Inc.")
url.set("https://github.com/square")
}
}
}
if (plugins.hasPlugin("org.jetbrains.kotlin.jvm")) {
configure(
KotlinJvm(
javadocJar = JavadocJar.Dokka("dokkaHtml"),
sourcesJar = true,
)
)
}
if (plugins.hasPlugin("org.jetbrains.kotlin.multiplatform")) {
configure(
KotlinMultiplatform(
javadocJar = JavadocJar.Dokka("dokkaHtml"),
sourcesJar = true,
)
)
}
// configure(
// GradlePlugin(
// javadocJar = JavadocJar.None(),
// sourcesJar = true,
// )
// )
}
}
}
}