Skip to content

Fix migration of 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 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions java/libraries/serial/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
bin
build
35 changes: 34 additions & 1 deletion java/libraries/serial/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1 +1,34 @@
ant.importBuild("build.xml")
plugins {
java
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}

val coreJar = file("../../../core/library/core.jar")

dependencies {

implementation(project(":core"))
implementation(files("library/jssc.jar"))
}

tasks.register("checkCore") {
doFirst {

if (!coreJar.exists()) {
throw GradleException("Missing core.jar at $coreJar. Please build the core module first.")
}
}
}

tasks.register<Jar>("serialJar") {
dependsOn("checkCore", "classes")
archiveBaseName.set("serial")
destinationDirectory.set(file("library"))
from(sourceSets.main.get().output)
}

16 changes: 16 additions & 0 deletions java/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.10.0"
}

rootProject.name = "processing"

include(":app")
include(":core")
include(":java:preprocessor")

include(":java:libraries:dxf")
include(":java:libraries:io")
include(":java:libraries:net")
include(":java:libraries:pdf")
include(":java:libraries:serial")
include(":java:libraries:svg")