Skip to content

Migration of the serial library to Gradle #1106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

madhav2348
Copy link

@madhav2348 madhav2348 commented May 16, 2025

Description

Migrated the serial library from Ant-based build.xml to Gradle build.gradle.kts

Resolve Issue

Changes

  • Added Gradle build logic using Kotlin DSL
  • Removed ant.importBuild("build.xml")
  • Add settings.gradle.kts

Let me know if further adjustments are needed!

@Stefterv
Copy link
Collaborator

Hi @madhav2348 I have opened #1189 as an example of how this kind of migration should be approached. Would you be interested in adjusting your approach based on that PR?

@madhav2348
Copy link
Author

Sure , I'll be happy to work on that

@Stefterv Stefterv changed the title Fix migration of serial library to Gradle Migration of the serial library to Gradle Jul 23, 2025
@madhav2348
Copy link
Author

madhav2348 commented Jul 24, 2025

hi @Stefterv , taking your example as reference, I searched jssc in Maven repository for the serial library :

dependencies {
    compileOnly(project(":core"))
    implementation("org.scream3r:jssc:2.8.0")  
}

But it doesn't have the method getPortProperties()used in :

public static Map<String, String> getProperties(String portName) {
return SerialPortList.getPortProperties(portName);
}

Somehow I found this issue processing/processing@f0cc875

now gohai/java-simple-serial-connector is only a repo, but doesn't have any release or .jar file that I could use Jitpack
and also there is no previous release I could find in the original repo

the solution I thought is

  • use the jssc.jar in the library directory

or fork the repo and build/upload the .jar file in release

But I need your advice on this: if I'm doing it right!

Thankyou

@Stefterv
Copy link
Collaborator

Stefterv commented Jul 24, 2025

Hi @madhav2348 thank you for flagging this and doing some of the initial research!

Looking at the history it seems that the last change reverted it back to a version of https://github.com/java-native/jssc rather than a custom build. Please check if the latest (2.10.2) works or try to find out which version is currently in the repo.

Otherwise just use an implementation() tag pointing at the existing .jar and add a TODO pointing to https://github.com/java-native/jssc and create a new issue here in the repo to request migration of jssc to a supported build on maven.

@madhav2348
Copy link
Author

madhav2348 commented Jul 25, 2025

would creating an issue be the correct step ? because it is customized by a previous contributor and its depending for many years
latest version (2.10.2) and other previous version not working of https://github.com/java-native/jssc , I searched most of releases

This is using a modified version of Java Simple Serial Connector by Alexey Sokolov. See https://github.com/gohai/java-simple-serial-connector and https://github.com/sampottinger/jssc for details on the modifications to support Processing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants