Skip to content

Commit c8b553d

Browse files
committed
Publish pdf library: add coordinates and simplify signing
1 parent 11f1a1e commit c8b553d

File tree

1 file changed

+52
-1
lines changed

1 file changed

+52
-1
lines changed

java/libraries/pdf/build.gradle.kts

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1+
import com.vanniktech.maven.publish.SonatypeHost
2+
import java.util.Properties
3+
14
plugins{
25
java
6+
alias(libs.plugins.mavenPublish)
37
}
48

9+
val libraryProps = Properties()
10+
file("library.properties").inputStream().use { libraryProps.load(it) }
11+
val libVersion = libraryProps.getProperty("version") ?: "1.0.0"
12+
513
sourceSets {
614
main {
715
java {
@@ -37,4 +45,47 @@ tasks.register<Copy>("createLibrary"){
3745
into("library")
3846
rename { "pdf.jar" }
3947
}
40-
}
48+
}
49+
50+
publishing{
51+
repositories{
52+
maven {
53+
name = "App"
54+
url = uri(project(":app").layout.buildDirectory.dir("resources-bundled/common/repository").get().asFile.absolutePath)
55+
}
56+
}
57+
}
58+
59+
mavenPublishing{
60+
coordinates("org.processing", "pdf", libVersion)
61+
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, automaticRelease = true)
62+
63+
signAllPublications()
64+
65+
pom{
66+
name.set("Processing PDF Library")
67+
description.set("Processing PDF Library")
68+
url.set("https://processing.org")
69+
licenses {
70+
license {
71+
name.set("LGPL")
72+
url.set("https://www.gnu.org/licenses/lgpl-2.1.html")
73+
}
74+
}
75+
developers {
76+
developer {
77+
id.set("steftervelde")
78+
name.set("Stef Tervelde")
79+
}
80+
developer {
81+
id.set("benfry")
82+
name.set("Ben Fry")
83+
}
84+
}
85+
scm{
86+
url.set("https://github.com/processing/processing4")
87+
connection.set("scm:git:git://github.com/processing/processing4.git")
88+
developerConnection.set("scm:git:ssh://git@github.com/processing/processing4.git")
89+
}
90+
}
91+
}

0 commit comments

Comments
 (0)