-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
104 lines (93 loc) · 3.26 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
104 lines (93 loc) · 3.26 KB
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
import org.gradle.api.JavaVersion.VERSION_17
import org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jreleaser.model.Active
plugins {
alias(libs.plugins.kotlinJvm) apply false
alias(libs.plugins.jreleaser)
`maven-publish`
base
}
group = "dev.kensa"
version = project.properties["releaseVersion"]
?: "${file("snapshot-version.txt").readText().trim()}-SNAPSHOT"
subprojects {
group = "dev.kensa"
version = rootProject.version
repositories {
mavenLocal()
mavenCentral()
}
plugins.withId("maven-publish") {
configure<PublishingExtension> {
publications.withType<MavenPublication>().configureEach {
pom {
name.set("${rootProject.name}-${project.name}")
description.set(provider { project.description ?: "Kensa build plugins module: ${project.name}" })
url.set("https://kensa.dev")
licenses {
license {
name.set("Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.html")
}
}
developers {
developer {
name.set("Paul Brooks")
email.set("paul@kensa.dev")
}
}
scm {
connection.set("scm:git:git@github.com:kensa-dev/build-plugins.git")
developerConnection.set("scm:git:git@github.com:kensa-dev/build-plugins.git")
url.set("https://github.com/kensa-dev/build-plugins")
}
}
}
repositories {
maven {
name = "stagingDeploy"
url = uri(rootProject.layout.buildDirectory.dir("staging-deploy").get().asFile.absolutePath)
}
}
}
}
var javaVersion = VERSION_17
var kotlinJvmTarget = JVM_17
apply(plugin = "org.jetbrains.kotlin.jvm")
plugins.withId("org.jetbrains.kotlin.jvm") {
configure<JavaPluginExtension> {
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
withSourcesJar()
withJavadocJar()
}
}
tasks {
withType<KotlinCompile> {
compilerOptions {
jvmTarget.set(kotlinJvmTarget)
}
}
withType<Jar> {
archiveBaseName.set("${rootProject.name}-${project.name}")
}
}
}
jreleaser {
gitRootSearch.set(true)
deploy {
maven {
nexus2.create("snapshots") {
active.set(Active.SNAPSHOT)
snapshotUrl.set("https://central.sonatype.com/repository/maven-snapshots/")
applyMavenCentralRules.set(true)
snapshotSupported.set(true)
sign.set(false)
closeRepository.set(true)
releaseRepository.set(true)
stagingRepositories.add(layout.buildDirectory.dir("staging-deploy").get().asFile.absolutePath)
}
}
}
}