Skip to content

Commit 83aa3b5

Browse files
committed
serial: use jssc from maven instead of bundled jar
1 parent 8b049ef commit 83aa3b5

File tree

2 files changed

+52
-3
lines changed

2 files changed

+52
-3
lines changed

java/libraries/serial/build.gradle.kts

Lines changed: 47 additions & 2 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 {
@@ -16,8 +19,7 @@ repositories {
1619

1720
dependencies {
1821
compileOnly(project(":core"))
19-
// TODO: https://github.com/java-native/jssc
20-
implementation(files("library/jssc.jar"))
22+
implementation("io.github.java-native:jssc:2.10.2")
2123
}
2224

2325
tasks.register<Copy>("createLibrary") {
@@ -34,4 +36,47 @@ tasks.register<Copy>("createLibrary") {
3436
into("library")
3537
rename { "serial.jar" }
3638
}
39+
}
40+
41+
publishing {
42+
repositories {
43+
maven {
44+
name = "App"
45+
url = uri(project(":app").layout.buildDirectory.dir("resources-bundled/common/repository").get().asFile.absolutePath)
46+
}
47+
}
48+
}
49+
50+
mavenPublishing {
51+
coordinates("$group.core", name, version.toString())
52+
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, automaticRelease = true)
53+
54+
signAllPublications()
55+
56+
pom {
57+
name.set("Processing Serial")
58+
description.set("Processing Serial")
59+
url.set("https://processing.org")
60+
licenses {
61+
license {
62+
name.set("LGPL")
63+
url.set("https://www.gnu.org/licenses/lgpl-2.1.html")
64+
}
65+
}
66+
developers {
67+
developer {
68+
id.set("steftervelde")
69+
name.set("Stef Tervelde")
70+
}
71+
developer {
72+
id.set("benfry")
73+
name.set("Ben Fry")
74+
}
75+
}
76+
scm {
77+
url.set("https://github.com/processing/processing4")
78+
connection.set("scm:git:git://github.com/processing/processing4.git")
79+
developerConnection.set("scm:git:ssh://git@github.com/processing/processing4.git")
80+
}
81+
}
3782
}

java/libraries/serial/src/processing/serial/Serial.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,12 @@ public boolean getDSR() {
259259
}
260260

261261

262+
/**
263+
* @deprecated No longer supported
264+
*/
265+
@Deprecated
262266
public static Map<String, String> getProperties(String portName) {
263-
return SerialPortList.getPortProperties(portName);
267+
return new java.util.HashMap<>();
264268
}
265269

266270

0 commit comments

Comments
 (0)