Java Mode resources and Libraries

This commit is contained in:
Stef Tervelde
2024-12-16 20:34:24 +01:00
parent 09620131ba
commit d057c46fd2
15 changed files with 35 additions and 105 deletions
-5
View File
@@ -8,12 +8,7 @@
<module fileurl="file://$PROJECT_DIR$/.idea/modules/app/processing.app.desktopTest.iml" filepath="$PROJECT_DIR$/.idea/modules/app/processing.app.desktopTest.iml" />
<module fileurl="file://$PROJECT_DIR$/build/macos/appbundler/processing4-appbundler.iml" filepath="$PROJECT_DIR$/build/macos/appbundler/processing4-appbundler.iml" />
<module fileurl="file://$PROJECT_DIR$/core/methods/processing4-core-preproc.iml" filepath="$PROJECT_DIR$/core/methods/processing4-core-preproc.iml" />
<module fileurl="file://$PROJECT_DIR$/java/libraries/dxf/processing4-dxf.iml" filepath="$PROJECT_DIR$/java/libraries/dxf/processing4-dxf.iml" />
<module fileurl="file://$PROJECT_DIR$/java/libraries/javafx/processing4-javafx.iml" filepath="$PROJECT_DIR$/java/libraries/javafx/processing4-javafx.iml" />
<module fileurl="file://$PROJECT_DIR$/java/libraries/net/processing4-net.iml" filepath="$PROJECT_DIR$/java/libraries/net/processing4-net.iml" />
<module fileurl="file://$PROJECT_DIR$/java/libraries/pdf/processing4-pdf.iml" filepath="$PROJECT_DIR$/java/libraries/pdf/processing4-pdf.iml" />
<module fileurl="file://$PROJECT_DIR$/java/libraries/serial/processing4-serial.iml" filepath="$PROJECT_DIR$/java/libraries/serial/processing4-serial.iml" />
<module fileurl="file://$PROJECT_DIR$/java/libraries/svg/processing4-svg.iml" filepath="$PROJECT_DIR$/java/libraries/svg/processing4-svg.iml" />
<module fileurl="file://$PROJECT_DIR$/build/shared/tools/MovieMaker/processing4-tools-moviemaker.iml" filepath="$PROJECT_DIR$/build/shared/tools/MovieMaker/processing4-tools-moviemaker.iml" />
</modules>
</component>
+7 -1
View File
@@ -141,7 +141,7 @@ tasks.register<Copy>("unzipJDK") {
tarTree(dl.dest)
}
from(archive){ eachFile{ file.setWritable(true, false) } }
from(archive){ eachFile{ permissions{ unix("755") } } }
into(layout.buildDirectory.dir("resources-bundled/common"))
}
tasks.register<Copy>("copyShared"){
@@ -161,6 +161,12 @@ tasks.register<Copy>("unzipExamples") {
}
into(layout.buildDirectory.dir("resources-bundled/common/modes/java/examples"))
}
tasks.register<Copy>("copyJavaMode"){
dependsOn("unzipExamples")
dependsOn(project(":java").tasks.named("extraResources"))
from(project(":java").layout.buildDirectory.dir("resources-bundled"))
into(layout.buildDirectory.dir("resources-bundled"))
}
afterEvaluate {
tasks.findByName("prepareAppResources")?.dependsOn("unzipJDK","copyShared", "copyCore", "unzipExamples")
+16 -2
View File
@@ -43,11 +43,25 @@ tasks.compileJava{
options.encoding = "UTF-8"
}
// TODO: This is a temporary workaround until the resources are properly handled
tasks.register<Copy>("extraResources"){
from(".")
include("keywords.txt")
into("build/resources/main")
include("theme/**/*")
include("application/**/*")
into( layout.buildDirectory.dir("resources-bundled/common/modes/java"))
}
val libraries = arrayOf("dxf","io","net","pdf","serial","svg")
libraries.forEach { library ->
tasks.register<Copy>("library-$library-extraResources"){
dependsOn(project(":java:libraries:$library").tasks.named("build"))
from("libraries/$library")
include("*.properties")
include("library/**/*")
include("examples/**/*")
into( layout.buildDirectory.dir("resources-bundled/common/modes/java/libraries/$library"))
}
tasks.named("extraResources"){ dependsOn("library-$library-extraResources") }
}
tasks.jar { dependsOn("extraResources") }
tasks.processResources{ finalizedBy("extraResources") }
+1
View File
@@ -0,0 +1 @@
ant.importBuild("build.xml")
-13
View File
@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager">
<output url="file://$MODULE_DIR$/bin" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="processing4-core" />
</component>
</module>
+1
View File
@@ -0,0 +1 @@
ant.importBuild("build.xml")
+1
View File
@@ -0,0 +1 @@
ant.importBuild("build.xml")
-13
View File
@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager">
<output url="file://$MODULE_DIR$/bin" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="processing4-core" />
</component>
</module>
+1
View File
@@ -0,0 +1 @@
ant.importBuild("build.xml")
-22
View File
@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="processing4-core" />
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/library/itext.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="library" name="itext" level="project" />
</component>
</module>
+1
View File
@@ -0,0 +1 @@
ant.importBuild("build.xml")
@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="EclipseModuleManager">
<libelement value="jar://$MODULE_DIR$/library/jssc.jar!/" />
<src_description expected_position="0">
<src_folder value="file://$MODULE_DIR$/src" expected_position="0" />
</src_description>
</component>
<component name="NewModuleRootManager">
<output url="file://$MODULE_DIR$/bin" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library">
<library name="jssc.jar">
<CLASSES>
<root url="jar://$MODULE_DIR$/library/jssc.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module" module-name="processing4-core" />
</component>
</module>
+1
View File
@@ -0,0 +1 @@
ant.importBuild("build.xml")
-21
View File
@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="processing4-core" />
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/library/batik.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component>
</module>
+6
View File
@@ -5,6 +5,12 @@ include(
"app",
"java",
"java:preprocessor",
"java:libraries:dxf",
"java:libraries:io",
"java:libraries:net",
"java:libraries:pdf",
"java:libraries:serial",
"java:libraries:svg",
)
buildscript {