diff --git a/.idea/runConfigurations/Sketch.xml b/.idea/runConfigurations/Sketch.xml new file mode 100644 index 000000000..7b3ef9264 --- /dev/null +++ b/.idea/runConfigurations/Sketch.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 9d2c9bd3a..5942f0238 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -15,7 +15,7 @@ plugins{ group = rootProject.group tasks.withType { systemProperty("processing.version", version) - systemProperty("processing.revision", "1296") + systemProperty("processing.revision", "1300") systemProperty("processing.contributions.source", "https://contributions-preview.processing.org/contribs.txt") systemProperty("processing.download.page", "https://processing.org/download/") systemProperty("processing.download.latest", "https://processing.org/download/latest.txt") @@ -49,7 +49,7 @@ compose.desktop { modules("jdk.jdi", "java.compiler") targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb) packageName = "Processing" - packageVersion = rootProject.version as String + packageVersion = rootProject.version.toString() macOS{ bundleID = "org.processing.app" @@ -78,15 +78,13 @@ compose.desktop { } dependencies { + implementation(project(":core")) + implementation(libs.flatlaf) implementation(libs.jna) implementation(libs.jnaplatform) - implementation(project(":core")) - runtimeOnly(project(":java")) - implementation(project(":java:preprocessor")) - implementation(compose.runtime) implementation(compose.foundation) implementation(compose.material) @@ -104,11 +102,20 @@ dependencies { // Most of these are shims to be compatible with the old build system // They should be removed in the future, as we work towards making things more Gradle-native tasks.register("copyCore"){ - dependsOn(project(":core").tasks.jar) - from(project(":core").layout.buildDirectory.dir("libs")) - from(project(":core").configurations.runtimeClasspath) + val project = project(":core") + dependsOn(project.tasks.jar) + from(project.layout.buildDirectory.dir("libs")) + from(project.configurations.runtimeClasspath) into(layout.buildDirectory.dir("resources-bundled/common/core/library")) } +tasks.register("copyJava"){ + val project = project(":java") + dependsOn(project.tasks.jar) + from(project.layout.buildDirectory.dir("libs")) + from(project.configurations.runtimeClasspath) + into(layout.buildDirectory.dir("resources-bundled/common/modes/java/mode")) + duplicatesStrategy = DuplicatesStrategy.EXCLUDE +} tasks.register("downloadJDK") { val os: OperatingSystem = DefaultNativePlatform.getCurrentOperatingSystem() val arch: String = System.getProperty("os.arch").let { originalArch -> @@ -124,7 +131,8 @@ tasks.register("downloadJDK") { os.isMacOsX -> "mac" else -> "linux" } - val javaVersion = "17" + + val javaVersion = System.getProperty("java.version").split(".")[0] val imageType = "jdk" src("https://api.adoptium.net/v3/binary/latest/" + @@ -142,7 +150,7 @@ tasks.register("unzipJDK") { val dl = tasks.findByPath("downloadJDK") as Download dependsOn(dl) - val os: OperatingSystem = DefaultNativePlatform.getCurrentOperatingSystem() + val os = DefaultNativePlatform.getCurrentOperatingSystem() val archive = if (os.isWindows) { zipTree(dl.dest) } else { @@ -215,7 +223,7 @@ tasks.register("renameWindres") { into(dir) } afterEvaluate { - tasks.findByName("prepareAppResources")?.dependsOn("unzipJDK","copyShared", "copyCore", "unzipExamples","renameWindres", "copyJavaMode") + tasks.findByName("prepareAppResources")?.dependsOn("unzipJDK","copyShared", "copyCore", "copyJava", "unzipExamples","renameWindres", "copyJavaMode") tasks.register("setExecutablePermissions") { description = "Sets executable permissions on binaries in Processing.app resources" group = "compose desktop" diff --git a/app/src/processing/app/Platform.java b/app/src/processing/app/Platform.java index 0208d45a9..23a8df021 100644 --- a/app/src/processing/app/Platform.java +++ b/app/src/processing/app/Platform.java @@ -394,8 +394,7 @@ public class Platform { static public File getJavaHome() { var resourcesDir = System.getProperty("compose.application.resources.dir"); if(resourcesDir != null) { - // find the jdk folder starting with jdk-17 - var jdkFolder = Arrays.stream(new File(resourcesDir).listFiles((dir, name) -> dir.isDirectory() && name.startsWith("jdk-17"))) + var jdkFolder = Arrays.stream(new File(resourcesDir).listFiles((dir, name) -> dir.isDirectory() && name.startsWith("jdk-"))) .findFirst() .orElse(null); if(Platform.isMacOS()){ diff --git a/build.gradle.kts b/build.gradle.kts index c9fc85bd4..44805d0b1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,5 @@ group = "org.processing" -version = "4.3.3" +version = "4.4.0" plugins { kotlin("jvm") version libs.versions.kotlin apply false diff --git a/core/build.gradle.kts b/core/build.gradle.kts index f3e7bda5f..d4a1dcacb 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -2,6 +2,7 @@ import com.vanniktech.maven.publish.SonatypeHost plugins { id("java") + kotlin("jvm") version libs.versions.kotlin alias(libs.plugins.mavenPublish) }