Automatically download jdk

This commit is contained in:
Stef Tervelde
2025-07-18 21:42:08 +02:00
parent 578c287606
commit 570e9db457
2 changed files with 4 additions and 5 deletions

View File

@@ -122,10 +122,14 @@ class GradleJob(
// Create the init.gradle.kts file in the working directory
// This allows us to run the gradle plugin that has been bundled with the editor
// TODO: Add the plugin repositories if they are defined
// TODO: Feedback when the JDK is being downloaded
val initGradle = workingDir.resolve("init.gradle.kts").apply {
val content = """
beforeSettings{
pluginManagement {
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
}
repositories {
maven("$repository")
gradlePluginPortal()
@@ -219,9 +223,6 @@ class GradleJob(
val arguments = mutableListOf("--init-script", initGradle.toAbsolutePath().toString())
// Hide Gradle output from the console if not in debug mode
if(!DEBUG) arguments += "--quiet"
// TODO: Fix continuous mode for the hot reload
arguments += "-t"
if(copy) arguments += listOf("--project-dir", sketchFolder.absolutePath)
arguments += variables.entries

View File

@@ -2,12 +2,10 @@ package org.processing.java.gradle
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.plugins.JavaPlugin
import org.gradle.api.plugins.JavaPluginExtension
import org.gradle.jvm.toolchain.JavaLanguageVersion
import org.gradle.jvm.toolchain.JvmVendorSpec
import org.jetbrains.compose.reload.gradle.ComposeHotReloadPlugin
import org.jetbrains.compose.reload.gradle.ComposeHotRun
class ProcessingHotReloadPlugin: Plugin<Project> {
override fun apply(project: Project) {