-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
72 lines (61 loc) · 1.95 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
plugins {
kotlin("jvm") version "1.9.22" apply (false)
kotlin("plugin.serialization") version "1.9.22" apply false
// derive gradle version from git tag
id("pl.allegro.tech.build.axion-release") version "1.16.1"
// publishing
id("io.github.gradle-nexus.publish-plugin") version "1.3.0"
id("signing")
`maven-publish`
// provide & configure dependencyUpdates
id("com.github.ben-manes.versions") version "0.51.0"
id("se.ascp.gradle.gradle-versions-filter") version "0.1.16"
}
ext.set("kotlinVersion", "1.9.22")
ext.set("ktorVersion", "2.3.8")
val libVersion: String = scmVersion.version
allprojects {
repositories {
mavenCentral()
}
group = "com.linked-planet"
version = libVersion
}
subprojects {
apply(plugin = "java-library")
apply(plugin = "maven-publish")
apply(plugin = "signing")
signing {
useInMemoryPgpKeys(
findProperty("signingKey").toString(),
findProperty("signingPassword").toString()
)
sign(publishing.publications)
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = "17"
}
tasks {
register("javadocJar", Jar::class) {
archiveClassifier.set("javadoc")
from("${layout.buildDirectory}/javadoc")
}
register("sourcesJar", Jar::class) {
archiveClassifier.set("sources")
from("$projectDir/src/main/kotlin")
}
}
}
nexusPublishing {
this.repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
}
}
}
// do not generate extra load on Nexus with new staging repository if signing fails
val initializeSonatypeStagingRepository by tasks.existing
initializeSonatypeStagingRepository {
shouldRunAfter(tasks.withType<Sign>())
}