-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
65 lines (62 loc) · 2.43 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
val developerId: String by project
val developerName: String by project
val developerUrl: String by project
val releaseGroup: String by project
val releaseArtifact: String by project
val releaseVersion: String by project
val releaseDescription: String by project
val releaseUrl: String by project
plugins {
kotlin("jvm") version libs.versions.kotlin apply false
alias(libs.plugins.ktlint) apply false
alias(libs.plugins.maven.publish) apply false
}
allprojects {
group = releaseGroup
version = releaseVersion
}
subprojects {
plugins.withType<org.jetbrains.kotlin.gradle.plugin.KotlinPluginWrapper>().configureEach {
the<org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension>()
.jvmToolchain(libs.versions.jdk.get().toInt())
}
plugins.withType<org.jlleitschuh.gradle.ktlint.KtlintPlugin>().configureEach {
the<org.jlleitschuh.gradle.ktlint.KtlintExtension>()
.version.set(libs.versions.ktlint.get())
}
plugins.withType<com.vanniktech.maven.publish.MavenPublishBasePlugin> {
configure<com.vanniktech.maven.publish.MavenPublishBaseExtension> {
configure(
com.vanniktech.maven.publish.KotlinJvm(
com.vanniktech.maven.publish.JavadocJar.Dokka("dokkaJavadoc")
)
)
publishToMavenCentral(com.vanniktech.maven.publish.SonatypeHost.S01)
signAllPublications()
pom {
name.set(project.name)
description.set(releaseDescription)
url.set(releaseUrl)
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
distribution.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
id.set(developerId)
name.set(developerName)
url.set(developerUrl)
}
}
scm {
url.set(releaseUrl)
connection.set("scm:git:https://github.com/$developerId/$releaseArtifact.git")
developerConnection.set("scm:git:ssh://git@github.com/$developerId/$releaseArtifact.git")
}
}
}
}
}