mirror of
https://github.com/processing/processing4.git
synced 2026-03-13 07:57:47 +01:00
Publish Serial and IO libraries to Maven Central (#1421)
* serial: use jssc from maven instead of bundled jar * io: port from ant to gradle, add maven publishing * move io and net from legacy to regular library build * revert serial changes for separate pr * serial: add maven publishing, keep bundled jssc jar
This commit is contained in:
committed by
GitHub
parent
173f646e3b
commit
cd49b184fe
@@ -68,7 +68,7 @@ tasks.register<Copy>("copyCore"){
|
||||
into(coreProject.layout.projectDirectory.dir("library"))
|
||||
}
|
||||
|
||||
val legacyLibraries = arrayOf("io","net")
|
||||
val legacyLibraries = emptyArray<String>()
|
||||
legacyLibraries.forEach { library ->
|
||||
tasks.register<Copy>("library-$library-extraResources"){
|
||||
val build = project(":java:libraries:$library").tasks.named("build")
|
||||
@@ -88,7 +88,7 @@ legacyLibraries.forEach { library ->
|
||||
}
|
||||
}
|
||||
|
||||
val libraries = arrayOf("dxf", "pdf", "serial", "svg")
|
||||
val libraries = arrayOf("dxf", "io", "net", "pdf", "serial", "svg")
|
||||
|
||||
libraries.forEach { library ->
|
||||
val name = "create-$library-library"
|
||||
|
||||
@@ -1 +1,92 @@
|
||||
ant.importBuild("build.xml")
|
||||
import com.vanniktech.maven.publish.SonatypeHost
|
||||
|
||||
plugins {
|
||||
java
|
||||
alias(libs.plugins.mavenPublish)
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
srcDirs("src")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly(project(":core"))
|
||||
}
|
||||
|
||||
tasks.register<Copy>("createLibrary") {
|
||||
dependsOn("jar")
|
||||
into(layout.buildDirectory.dir("library"))
|
||||
|
||||
from(layout.projectDirectory) {
|
||||
include("library.properties")
|
||||
include("examples/**")
|
||||
}
|
||||
|
||||
from(configurations.runtimeClasspath) {
|
||||
into("library")
|
||||
}
|
||||
|
||||
from(tasks.jar) {
|
||||
into("library")
|
||||
rename { "io.jar" }
|
||||
}
|
||||
|
||||
from(layout.projectDirectory.dir("library")) {
|
||||
include("linux-arm64/**")
|
||||
include("linux-armv6hf/**")
|
||||
include("linux32/**")
|
||||
include("linux64/**")
|
||||
into("library")
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
repositories {
|
||||
maven {
|
||||
name = "App"
|
||||
url = uri(project(":app").layout.buildDirectory.dir("resources-bundled/common/repository").get().asFile.absolutePath)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mavenPublishing {
|
||||
coordinates("$group.core", name, version.toString())
|
||||
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, automaticRelease = true)
|
||||
|
||||
signAllPublications()
|
||||
|
||||
pom {
|
||||
name.set("Processing IO")
|
||||
description.set("Processing IO")
|
||||
url.set("https://processing.org")
|
||||
licenses {
|
||||
license {
|
||||
name.set("LGPL")
|
||||
url.set("https://www.gnu.org/licenses/lgpl-2.1.html")
|
||||
}
|
||||
}
|
||||
developers {
|
||||
developer {
|
||||
id.set("steftervelde")
|
||||
name.set("Stef Tervelde")
|
||||
}
|
||||
developer {
|
||||
id.set("benfry")
|
||||
name.set("Ben Fry")
|
||||
}
|
||||
}
|
||||
scm {
|
||||
url.set("https://github.com/processing/processing4")
|
||||
connection.set("scm:git:git://github.com/processing/processing4.git")
|
||||
developerConnection.set("scm:git:ssh://git@github.com/processing/processing4.git")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
import com.vanniktech.maven.publish.SonatypeHost
|
||||
|
||||
plugins {
|
||||
java
|
||||
alias(libs.plugins.mavenPublish)
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
@@ -23,15 +26,61 @@ dependencies {
|
||||
tasks.register<Copy>("createLibrary") {
|
||||
dependsOn("jar")
|
||||
into(layout.buildDirectory.dir("library"))
|
||||
|
||||
from(layout.projectDirectory) {
|
||||
include("library.properties")
|
||||
include("examples/**")
|
||||
}
|
||||
|
||||
from(configurations.runtimeClasspath) {
|
||||
into("library")
|
||||
}
|
||||
|
||||
from(tasks.jar) {
|
||||
into("library")
|
||||
rename { "serial.jar" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
repositories {
|
||||
maven {
|
||||
name = "App"
|
||||
url = uri(project(":app").layout.buildDirectory.dir("resources-bundled/common/repository").get().asFile.absolutePath)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mavenPublishing {
|
||||
coordinates("$group.core", name, version.toString())
|
||||
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, automaticRelease = true)
|
||||
|
||||
signAllPublications()
|
||||
|
||||
pom {
|
||||
name.set("Processing Serial")
|
||||
description.set("Processing Serial")
|
||||
url.set("https://processing.org")
|
||||
licenses {
|
||||
license {
|
||||
name.set("LGPL")
|
||||
url.set("https://www.gnu.org/licenses/lgpl-2.1.html")
|
||||
}
|
||||
}
|
||||
developers {
|
||||
developer {
|
||||
id.set("steftervelde")
|
||||
name.set("Stef Tervelde")
|
||||
}
|
||||
developer {
|
||||
id.set("benfry")
|
||||
name.set("Ben Fry")
|
||||
}
|
||||
}
|
||||
scm {
|
||||
url.set("https://github.com/processing/processing4")
|
||||
connection.set("scm:git:git://github.com/processing/processing4.git")
|
||||
developerConnection.set("scm:git:ssh://git@github.com/processing/processing4.git")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user