-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
114 lines (97 loc) · 3.19 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
114 lines (97 loc) · 3.19 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
105
106
107
108
109
110
111
112
113
114
plugins {
kotlin("jvm") version "2.0.0"
application
id("com.github.johnrengelman.shadow") version "8.1.1"
id("com.gradleup.nmcp.aggregation").version("1.1.0")
`maven-publish`
signing
publishing
}
group = "graphics.scenery"
version = "0.1"
repositories {
mavenCentral()
}
dependencies {
implementation("org.jmdns:jmdns:3.5.9")
implementation("org.zeromq:jeromq:0.6.0")
implementation("org.slf4j:slf4j-api:2.0.7")
implementation("org.slf4j:slf4j-simple:2.0.7")
testImplementation(kotlin("test"))
}
application {
mainClass.set("graphics.scenery.AutofabMainKt")
}
tasks.test {
useJUnitPlatform()
}
java {
withJavadocJar()
withSourcesJar()
}
kotlin {
jvmToolchain(21)
}
publishing {
publications {
create<MavenPublication>("maven") {
groupId = "graphics.scenery"
artifactId = "autofab"
version = "0.1"
from(components["java"])
pom {
name.set("AutoFab")
description.set("Automated fabrication toolkit for graphics.scenery")
url.set("https://github.com/scenerygraphics/autofab")
licenses {
license {
name.set("GNU Lesser General Public License v3.0")
url.set("https://www.gnu.org/licenses/lgpl-3.0.html")
}
}
developers {
developer {
id.set("skalarproduktraum")
name.set("Ulrik Günther")
email.set("hello@ulrik.is")
}
}
scm {
connection.set("scm:git:git://github.com/scenerygraphics/autofab.git")
developerConnection.set("scm:git:ssh://github.com:scenerygraphics/autofab.git")
url.set("https://github.com/scenerygraphics/autofab")
}
}
}
}
repositories {
maven {
name = "sonatype"
url = if (version.toString().endsWith("SNAPSHOT")) {
uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
} else {
uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
}
credentials {
username = project.findProperty("sonatypeUsername") as String? ?: System.getenv("SONATYPE_USERNAME")
password = project.findProperty("sonatypePassword") as String? ?: System.getenv("SONATYPE_PASSWORD")
}
}
}
}
signing {
// setRequired({ project.hasProperty("release") })
useGpgCmd()
sign(publishing.publications["maven"])
sign(configurations.archives.get())
}
nmcpAggregation {
centralPortal {
username = (properties["sonatypeUsername"] as? String) ?: ""
password = (properties["sonatypePassword"] as? String) ?: ""
// publish manually from the portal
publishingType = "USER_MANAGED"
}
// Publish all projects that apply the 'maven-publish' plugin
publishAllProjectsProbablyBreakingProjectIsolation()
}