Skip to content

Commit b0fcad9

Browse files
committed
Port Net and SVG libraries from Ant to Gradle with Maven publishing
1 parent 75926c8 commit b0fcad9

File tree

2 files changed

+130
-1
lines changed

2 files changed

+130
-1
lines changed
Lines changed: 84 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,84 @@
1-
ant.importBuild("build.xml")
1+
import com.vanniktech.maven.publish.SonatypeHost
2+
3+
plugins {
4+
java
5+
alias(libs.plugins.mavenPublish)
6+
}
7+
8+
sourceSets {
9+
main {
10+
java {
11+
srcDirs("src")
12+
}
13+
}
14+
}
15+
16+
repositories {
17+
mavenCentral()
18+
}
19+
20+
dependencies {
21+
compileOnly(project(":core"))
22+
}
23+
24+
tasks.register<Copy>("createLibrary") {
25+
dependsOn("jar")
26+
into(layout.buildDirectory.dir("library"))
27+
28+
from(layout.projectDirectory) {
29+
include("library.properties")
30+
include("examples/**")
31+
}
32+
33+
from(configurations.runtimeClasspath) {
34+
into("library")
35+
}
36+
37+
from(tasks.jar) {
38+
into("library")
39+
rename { "net.jar" }
40+
}
41+
}
42+
43+
publishing {
44+
repositories {
45+
maven {
46+
name = "App"
47+
url = uri(project(":app").layout.buildDirectory.dir("resources-bundled/common/repository").get().asFile.absolutePath)
48+
}
49+
}
50+
}
51+
52+
mavenPublishing {
53+
coordinates("$group.core", name, version.toString())
54+
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, automaticRelease = true)
55+
56+
signAllPublications()
57+
58+
pom {
59+
name.set("Processing Net")
60+
description.set("Processing Net")
61+
url.set("https://processing.org")
62+
licenses {
63+
license {
64+
name.set("LGPL")
65+
url.set("https://www.gnu.org/licenses/lgpl-2.1.html")
66+
}
67+
}
68+
developers {
69+
developer {
70+
id.set("steftervelde")
71+
name.set("Stef Tervelde")
72+
}
73+
developer {
74+
id.set("benfry")
75+
name.set("Ben Fry")
76+
}
77+
}
78+
scm {
79+
url.set("https://github.com/processing/processing4")
80+
connection.set("scm:git:git://github.com/processing/processing4.git")
81+
developerConnection.set("scm:git:ssh://git@github.com/processing/processing4.git")
82+
}
83+
}
84+
}

java/libraries/svg/build.gradle.kts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
import com.vanniktech.maven.publish.SonatypeHost
2+
13
plugins {
24
java
5+
alias(libs.plugins.mavenPublish)
36
}
47

58
sourceSets {
@@ -9,6 +12,7 @@ sourceSets {
912
}
1013
}
1114
}
15+
1216
repositories {
1317
mavenCentral()
1418
}
@@ -38,3 +42,45 @@ tasks.register<Copy>("createLibrary") {
3842
}
3943
}
4044

45+
publishing {
46+
repositories {
47+
maven {
48+
name = "App"
49+
url = uri(project(":app").layout.buildDirectory.dir("resources-bundled/common/repository").get().asFile.absolutePath)
50+
}
51+
}
52+
}
53+
54+
mavenPublishing {
55+
coordinates("$group.core", name, version.toString())
56+
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, automaticRelease = true)
57+
58+
signAllPublications()
59+
60+
pom {
61+
name.set("Processing SVG")
62+
description.set("Processing SVG")
63+
url.set("https://processing.org")
64+
licenses {
65+
license {
66+
name.set("LGPL")
67+
url.set("https://www.gnu.org/licenses/lgpl-2.1.html")
68+
}
69+
}
70+
developers {
71+
developer {
72+
id.set("steftervelde")
73+
name.set("Stef Tervelde")
74+
}
75+
developer {
76+
id.set("benfry")
77+
name.set("Ben Fry")
78+
}
79+
}
80+
scm {
81+
url.set("https://github.com/processing/processing4")
82+
connection.set("scm:git:git://github.com/processing/processing4.git")
83+
developerConnection.set("scm:git:ssh://git@github.com/processing/processing4.git")
84+
}
85+
}
86+
}

0 commit comments

Comments
 (0)