Skip to content

Commit 11dcedb

Browse files
committed
Port Net and SVG libraries from Ant to Gradle with Maven publishing
1 parent 11f1a1e commit 11dcedb

File tree

2 files changed

+169
-2
lines changed

2 files changed

+169
-2
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+
}
Lines changed: 85 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,85 @@
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+
implementation("org.apache.xmlgraphics:batik-all:1.19")
24+
}
25+
26+
tasks.register<Copy>("createLibrary") {
27+
dependsOn("jar")
28+
into(layout.buildDirectory.dir("library"))
29+
30+
from(layout.projectDirectory) {
31+
include("library.properties")
32+
}
33+
34+
from(configurations.runtimeClasspath) {
35+
into("library")
36+
}
37+
38+
from(tasks.jar) {
39+
into("library")
40+
rename { "svg.jar" }
41+
}
42+
}
43+
44+
publishing {
45+
repositories {
46+
maven {
47+
name = "App"
48+
url = uri(project(":app").layout.buildDirectory.dir("resources-bundled/common/repository").get().asFile.absolutePath)
49+
}
50+
}
51+
}
52+
53+
mavenPublishing {
54+
coordinates("$group.core", name, version.toString())
55+
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, automaticRelease = true)
56+
57+
signAllPublications()
58+
59+
pom {
60+
name.set("Processing SVG")
61+
description.set("Processing SVG")
62+
url.set("https://processing.org")
63+
licenses {
64+
license {
65+
name.set("LGPL")
66+
url.set("https://www.gnu.org/licenses/lgpl-2.1.html")
67+
}
68+
}
69+
developers {
70+
developer {
71+
id.set("steftervelde")
72+
name.set("Stef Tervelde")
73+
}
74+
developer {
75+
id.set("benfry")
76+
name.set("Ben Fry")
77+
}
78+
}
79+
scm {
80+
url.set("https://github.com/processing/processing4")
81+
connection.set("scm:git:git://github.com/processing/processing4.git")
82+
developerConnection.set("scm:git:ssh://git@github.com/processing/processing4.git")
83+
}
84+
}
85+
}

0 commit comments

Comments
 (0)