├── .github └── workflows │ ├── job.build.yml │ ├── on.pr.yml │ ├── on.push.yml │ └── shim.sh ├── .gitignore ├── README.md ├── build.gradle.kts ├── elide-gradle-catalog └── build.gradle.kts ├── elide-gradle-plugin ├── .gitignore ├── build.gradle.kts └── src │ ├── functionalTest │ └── java │ │ └── com │ │ └── example │ │ └── plugin │ │ └── ElidePluginFunctionalTest.java │ ├── main │ └── java │ │ └── dev │ │ └── elide │ │ └── gradle │ │ ├── ElideExtension.java │ │ ├── ElideExtensionConfig.java │ │ ├── ElideGradlePlugin.java │ │ └── ElideTaskName.java │ └── test │ └── java │ └── com │ └── example │ └── plugin │ └── ElidePluginTest.java ├── elide-gradle-worker ├── .dev │ └── elide.lock.bin ├── .gitignore ├── elide.pkl ├── package-lock.kdl ├── worker-apis.d.ts ├── worker.ts └── wrangler.toml ├── elide.gradle.kts ├── example-project-remote ├── .dev │ └── elide.lock.bin ├── .gitignore ├── build.gradle.kts ├── elide.pkl ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── settings.gradle.kts └── src │ └── main │ └── java │ └── com │ └── example │ └── HelloWorld.java ├── example-project ├── .dev │ └── elide.lock.bin ├── .gitignore ├── build.gradle.kts ├── elide.pkl ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── settings.gradle.kts └── src │ └── main │ └── java │ └── com │ └── example │ └── HelloWorld.java ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle.kts /.github/workflows/job.build.yml: -------------------------------------------------------------------------------- 1 | name: "Job - Build" 2 | 3 | "on": 4 | workflow_call: 5 | inputs: 6 | runner: 7 | description: "Runner to use for the job" 8 | required: false 9 | type: string 10 | default: "ubuntu-latest" 11 | workflow_dispatch: 12 | inputs: 13 | runner: 14 | description: "Runner to use for the job" 15 | required: false 16 | default: "ubuntu-latest" 17 | 18 | jobs: 19 | build: 20 | name: "Build" 21 | runs-on: ${{ inputs.runner || vars.RUNNER_DEFAULT || 'ubuntu-latest' }} 22 | permissions: 23 | contents: "read" 24 | steps: 25 | - name: "Setup: Harden Runner" 26 | uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0 27 | with: 28 | disable-sudo: true 29 | egress-policy: audit 30 | allowed-endpoints: > 31 | api.github.com:443 32 | github.com:443 33 | - name: "Setup: Checkout" 34 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 35 | with: 36 | fetch-depth: 1 37 | persist-credentials: false 38 | - name: "Setup: GraalVM (Java 24)" 39 | uses: graalvm/setup-graalvm@01ed653ac833fe80569f1ef9f25585ba2811baab # v1.3.3 40 | with: 41 | distribution: "graalvm" 42 | java-version: "24" 43 | github-token: ${{ secrets.GITHUB_TOKEN }} 44 | - name: "Setup: Elide" 45 | uses: elide-dev/setup-elide@a62ce5ca052e16ecd1c6eb3f2efde2e0228d5e80 # main 46 | with: 47 | version: latest 48 | - name: "Setup: Gradle" 49 | uses: gradle/actions/setup-gradle@8379f6a1328ee0e06e2bb424dadb7b159856a326 # v4.4.0 50 | id: gradlebuild 51 | env: 52 | CI: true 53 | with: 54 | cache-disabled: true 55 | - name: "Setup: Dependencies (Example)" 56 | run: cd ./example-project && elide install 57 | - name: "Setup: Dependencies (Remote Example)" 58 | run: cd ./example-project-remote && elide install 59 | - name: "Setup: Gradle Java Compiler Shim" 60 | run: cp -fv ./.github/workflows/shim.sh $JAVA_HOME/bin/elide-javac && chmod +x $JAVA_HOME/bin/elide-javac 61 | - name: "Build: Projects" 62 | run: ./gradlew --stacktrace --info --no-daemon build 63 | - name: "Build: Remote Example" 64 | run: cd ./example-project-remote && ../gradlew --stacktrace --info --no-daemon build 65 | -------------------------------------------------------------------------------- /.github/workflows/on.pr.yml: -------------------------------------------------------------------------------- 1 | name: "PR" 2 | 3 | "on": 4 | pull_request: {} 5 | 6 | permissions: 7 | contents: read 8 | 9 | jobs: 10 | build: 11 | name: "Build" 12 | uses: ./.github/workflows/job.build.yml 13 | -------------------------------------------------------------------------------- /.github/workflows/on.push.yml: -------------------------------------------------------------------------------- 1 | name: "CI" 2 | 3 | "on": 4 | push: 5 | branches: 6 | - main 7 | 8 | permissions: 9 | contents: read 10 | 11 | jobs: 12 | build: 13 | name: "Build" 14 | uses: ./.github/workflows/job.build.yml 15 | -------------------------------------------------------------------------------- /.github/workflows/shim.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | exec elide javac -- "$@" 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | .gradle/ 3 | *.dev/dependencies/* 4 | .idea/ 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Elide Gradle Plugin 2 | 3 | Experimental plugin for using [Elide](https://github.com/elide-dev/elide) from within Gradle. 4 | 5 | ### Installation 6 | 7 | Make sure to [install Elide](https://docs.elide.dev/installation.html) before proceeding. In GHA, use our 8 | [`elide-dev/setup-elide`](https://github.com/elide-dev/setup-elide) action to install Elide. 9 | 10 | 1) Create the `javac` shim in your `JAVA_HOME`: 11 | 12 | **`$JAVA_HOME/bin/elide-javac`** 13 | ```bash 14 | #!/usr/bin/env bash 15 | exec elide javac -- "${@}" 16 | ``` 17 | 18 | Also, make sure to mark it as executable: 19 | ```bash 20 | chmod +x $JAVA_HOME/bin/elide-javac 21 | ``` 22 | 23 | 2) Install and use the plugin as shown below. 24 | 3) **That's it! Enjoy faster dependency resolution and Java compilation.** 25 | 26 | > [!NOTE] 27 | > We hope to eliminate the `JAVA_HOME` shim soon. 28 | 29 | ### Usage 30 | 31 | **`gradle.properties`** 32 | ```properties 33 | elidePluginVersion=latest 34 | ``` 35 | 36 | **`settings.gradle.kts`** 37 | ```kotlin 38 | // Use `latest` for the latest version, or any other tag, branch, or commit SHA on this project. 39 | val elidePluginVersion: String by settings 40 | apply(from = "https://gradle.elide.dev/$elidePluginVersion/elide.gradle.kts") 41 | ``` 42 | 43 | **`build.gradle.kts`** 44 | ```kotlin 45 | plugins { 46 | // The `elideRuntime` catalog is added for you. Add the plugin like this: 47 | alias(elideRuntime.plugins.elide) 48 | } 49 | 50 | // Settings here apply on a per-project basis. See below for available settings; all properties 51 | // are optional, and you don't need to include this block at all if you are fine with defaults. 52 | elide { 53 | // Use Elide's Maven resolver and downloader instead of Gradle's. Defaults to `true` when an 54 | // `elide.pkl` file is present in the project root. 55 | enableInstall = true 56 | 57 | // Use Elide to compile Java instead of the stock Compiler API facilities used by Gradle. 58 | // Defaults to `true` if the plugin is active in the project at all. 59 | enableJavaCompiler = true 60 | 61 | // Enable Elide project awareness for Gradle. For example, build scripts can show up as runnable 62 | // exec tasks within the Gradle build. 63 | enableProjectIntegration = true 64 | 65 | // Set the path to the project manifest, expressed in Pkl format. Elide project manifests can 66 | // specify dependencies, build scripts, and other project metadata. Defaults to `elide.pkl` and 67 | // automatically finds any present `elide.pkl` in the active project. 68 | manifest = layout.projectDirectory.file("elide.pkl") 69 | } 70 | ``` 71 | 72 | ### What's this? 73 | 74 | Elide is a runtime and batteries-included toolchain for Kotlin/Java, Python, JavaScript, and TypeScript, that can be 75 | used as a drop-in replacement for `javac` (among other tools). 76 | 77 | Elide builds `javac` as a native image and includes it within the Elide binary. This plugin changes your Gradle build 78 | (as applicable) to use Elide's toolchain facilities instead of Gradle's built-in ones. 79 | 80 | The result can be a significant performance improvement for **fetching dependencies** and **compiling code**. 81 | 82 | Learn more about Elide at [elide.dev](https://elide.dev). 83 | 84 | ### Features 85 | 86 | > [!NOTE] 87 | > Elide is in beta, and this plugin is experimental. Use at your own risk. Please report any issues you encounter. 88 | 89 | - [x] Provide a Gradle plugin 90 | - [x] Provide a Gradle Catalog 91 | - [x] Support for `elide install` as Gradle's Maven resolver 92 | - [x] Support for `elide javac -- ...` as Gradle's Java compiler 93 | - [x] Use Elide from the user's `PATH` 94 | - [x] Use a local copy of Elide within the project 95 | - [ ] Gradle-level Elide download cache 96 | - [ ] Ability to pin Elide version 97 | - [ ] Support the configuration cache 98 | - [ ] Race-and-report vs. `javac` 99 | - [ ] Augment project metadata for reporting 100 | - [ ] Generate dependency manifests 101 | 102 | ### How does it work? 103 | 104 | [Elide](https://github.com/elide-dev/elide) is a [GraalVM](https://graalvm.org) native image which functions as a Node- 105 | like runtime. It speaks multiple languages, including Java, Kotlin, Python, JavaScript, TypeScript, WASM, and Pkl. 106 | 107 | In addition to features which run code (i.e. the runtime!), Elide _also_ is a full batteries-included toolchain for 108 | supported languages, including: 109 | 110 | - A drop-in replacement for `javac` and `kotlinc` 111 | - A drop-in replacement for `jar` and `javadoc` 112 | - Maven-compatible dependency resolution and fetching 113 | 114 | This plugin configures your Gradle build to use Elide's dependency and/or compile features instead of Gradle's. 115 | 116 | #### Compiling Java with Elide + Gradle 117 | 118 | Gradle's `JavaCompile` tasks are configured to use Elide through `isFork = true` and `forkOptions.executable`. These 119 | point to a shim in the `JAVA_HOME` which invokes `elide javac -- ...` instead of `javac ...`. 120 | 121 | As a result, JIT warmup is entirely skipped when compiling Java. **Projects under 10,000 classes may see better compiler 122 | performance, in some cases up to 20x faster than stock `javac`.** 123 | 124 | #### Fetching Dependencies with Elide + Gradle 125 | 126 | Elide resolves and fetches Maven dependencies with identical semantics to Maven's own resolver, but again in a native 127 | image, and with an optimized resolution step (through the use of a checked-in lockfile). 128 | 129 | When activated for use with Gradle, a few changes are made to your build: 130 | 131 | - **An invocation of `elide install`** is added before any Java compilation tasks. 132 | - **Gradle is configured for a local Maven repo** at `.dev/dependencies/m2`, which is where Elide puts JARs. 133 | - Thus, when Gradle resolves dependencies, they are _already on disk_ and ready to be used in a classpath. 134 | 135 | In this mode, dependencies are downloaded once and then can be used with both Elide and Gradle. 136 | 137 | > [!WARNING] 138 | > Fetching dependencies with Elide currently requires an `elide.pkl` manifest listing your Maven dependencies. This will 139 | > change in the future. 140 | -------------------------------------------------------------------------------- /build.gradle.kts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elide-dev/gradle/c1f5b71dce2d217eedec5a60a3d41941d207af5d/build.gradle.kts -------------------------------------------------------------------------------- /elide-gradle-catalog/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | `version-catalog` 3 | `maven-publish` 4 | signing 5 | } 6 | 7 | val latestElide = findProperty("elide.version")?.toString() ?: error( 8 | "Please provide the 'elide.version' property in the gradle.properties file or as a command line argument." 9 | ) 10 | 11 | group = "dev.elide.gradle" 12 | version = findProperty("version")?.toString() ?: error( 13 | "Please provide the 'version' property in the gradle.properties file." 14 | ) 15 | 16 | val mainPluginId = "dev.elide" 17 | 18 | val allLibs = listOf( 19 | "core", 20 | "base", 21 | "graalvm", 22 | ) 23 | 24 | catalog { 25 | versionCatalog { 26 | version("elide", latestElide) 27 | plugin("elide", mainPluginId).versionRef("elide") 28 | allLibs.forEach { 29 | library(it, "dev.elide", "elide-$it").versionRef("elide") 30 | } 31 | } 32 | } 33 | 34 | publishing { 35 | repositories { 36 | maven { 37 | url = uri(rootProject.layout.buildDirectory.dir("elide-maven")) 38 | } 39 | } 40 | 41 | publications { 42 | create("maven") { 43 | from(components["versionCatalog"]) 44 | 45 | pom { 46 | name = "Elide Gradle Catalog" 47 | description = "Provides mapped versions for Elide and related libraries and plugins." 48 | inceptionYear = "2023" 49 | url = "https://elide.dev" 50 | } 51 | } 52 | } 53 | } 54 | 55 | signing { 56 | useGpgCmd() 57 | sign(publishing.publications["maven"]) 58 | } 59 | -------------------------------------------------------------------------------- /elide-gradle-plugin/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | .gradle/ 3 | *.dev/dependencies/* 4 | -------------------------------------------------------------------------------- /elide-gradle-plugin/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import de.undercouch.gradle.tasks.download.Download 2 | 3 | plugins { 4 | `maven-publish` 5 | `java-gradle-plugin` 6 | signing 7 | id("com.gradle.plugin-publish") version "1.2.1" 8 | id("de.undercouch.download") version "5.6.0" 9 | } 10 | 11 | val elideVersion = findProperty("elide.version")?.toString() ?: error( 12 | "Please provide the 'elide.version' property in the gradle.properties file or as a command line argument." 13 | ) 14 | 15 | group = "dev.elide.gradle" 16 | version = findProperty("version")?.toString() ?: error( 17 | "Please provide the 'version' property in the gradle.properties file." 18 | ) 19 | 20 | publishing { 21 | repositories { 22 | maven { 23 | url = uri(rootProject.layout.buildDirectory.dir("elide-maven")) 24 | } 25 | } 26 | } 27 | 28 | val elideArch = when (System.getProperty("os.arch").lowercase()) { 29 | "x86_64", "amd64" -> "amd64" 30 | "arm64", "aarch64" -> "arm64" 31 | else -> error("Unsupported architecture: ${System.getProperty("os.arch")}") 32 | } 33 | val elidePlatform = when (System.getProperty("os.name").lowercase()) { 34 | "linux" -> "linux-$elideArch" 35 | "mac os x" -> "darwin-$elideArch" 36 | "windows" -> "windows-$elideArch" 37 | else -> error("Unsupported OS: ${System.getProperty("os.name")}") 38 | } 39 | 40 | repositories { 41 | mavenCentral() 42 | } 43 | 44 | val elideRuntime: Configuration by configurations.creating { 45 | isCanBeResolved = true 46 | } 47 | 48 | dependencies { 49 | elideRuntime(files(zipTree(rootProject.layout.buildDirectory.dir("elide-runtime")))) 50 | 51 | // Use JUnit test framework for unit tests 52 | testImplementation("junit:junit:4.13.1") 53 | } 54 | 55 | gradlePlugin { 56 | website = "https://elide.dev" 57 | vcsUrl = "https://github.com/elide-dev/gradle" 58 | 59 | val elide by plugins.creating { 60 | id = "dev.elide" 61 | displayName = "Elide Gradle Plugin" 62 | implementationClass = "dev.elide.gradle.ElideGradlePlugin" 63 | description = "Use the Elide runtime and build tools from Gradle" 64 | tags.set(listOf("elide", "graalvm", "java", "javac", "maven", "dependencies", "resolver")) 65 | } 66 | } 67 | 68 | // Add a source set and a task for a functional test suite 69 | val functionalTest: SourceSet by sourceSets.creating 70 | gradlePlugin.testSourceSets(functionalTest) 71 | 72 | configurations[functionalTest.implementationConfigurationName].extendsFrom(configurations.testImplementation.get()) 73 | 74 | val runtimeHome = layout.buildDirectory.dir("elide-runtime/elide-$elideVersion-$elidePlatform") 75 | 76 | val functionalTestTask = tasks.register("functionalTest") { 77 | testClassesDirs = functionalTest.output.classesDirs 78 | classpath = configurations[functionalTest.runtimeClasspathConfigurationName] + functionalTest.output 79 | } 80 | 81 | val downloadElide by tasks.registering(Download::class) { 82 | src("https://elide.zip/cli/v1/snapshot/$elidePlatform/$elideVersion/elide.tgz") 83 | dest(layout.buildDirectory.dir("elide-runtime")) 84 | outputs.file(layout.buildDirectory.file("elide-runtime/elide.tgz")) 85 | } 86 | 87 | val extractElide by tasks.registering(Copy::class) { 88 | from(tarTree(layout.buildDirectory.file("elide-runtime/elide.tgz"))) 89 | into(layout.buildDirectory.dir("elide-runtime")) 90 | inputs.file(layout.buildDirectory.file("elide-runtime/elide.tgz")) 91 | dependsOn(downloadElide) 92 | } 93 | 94 | val prepareElide by tasks.registering { 95 | group = "build" 96 | description = "Prepare the Elide runtime" 97 | dependsOn(downloadElide, extractElide) 98 | } 99 | 100 | val checkElide by tasks.registering(Exec::class) { 101 | executable = runtimeHome.get().file("elide").asFile.absolutePath 102 | args("--version") 103 | dependsOn(downloadElide, extractElide, prepareElide) 104 | } 105 | 106 | listOf( 107 | tasks.build, 108 | tasks.test, 109 | tasks.check, 110 | ).forEach { 111 | it.configure { 112 | dependsOn(downloadElide, extractElide, prepareElide, checkElide) 113 | } 114 | } 115 | 116 | tasks.check { 117 | dependsOn(functionalTestTask) 118 | } 119 | -------------------------------------------------------------------------------- /elide-gradle-plugin/src/functionalTest/java/com/example/plugin/ElidePluginFunctionalTest.java: -------------------------------------------------------------------------------- 1 | package com.example.plugin; 2 | 3 | import org.gradle.testkit.runner.BuildResult; 4 | import org.gradle.testkit.runner.GradleRunner; 5 | import org.junit.Test; 6 | 7 | import java.io.File; 8 | import java.io.FileWriter; 9 | import java.io.IOException; 10 | import java.io.Writer; 11 | import java.nio.file.Files; 12 | import java.nio.file.Paths; 13 | 14 | import static org.junit.Assert.assertTrue; 15 | 16 | public class ElidePluginFunctionalTest { 17 | @Test 18 | public void canRunTasks() throws IOException { 19 | File projectDir = new File("build/functionalTest"); 20 | Files.createDirectories(projectDir.toPath()); 21 | writeString(new File(projectDir, "settings.gradle"), ""); 22 | writeString(new File(projectDir, "build.gradle"), 23 | """ 24 | plugins { 25 | id('dev.elide') 26 | } 27 | """); 28 | 29 | GradleRunner.create() 30 | .forwardOutput() 31 | .withPluginClasspath() 32 | .withArguments("tasks") 33 | .withProjectDir(projectDir) 34 | .build(); 35 | } 36 | 37 | @Test 38 | public void canShimJavac() throws IOException { 39 | File projectDir = new File("build/functionalTestJavac"); 40 | var helloPathRelative = Paths.get("src/main/java/com/example/HelloWorld.java"); 41 | var helloPath = projectDir.toPath().resolve(helloPathRelative); 42 | Files.createDirectories(projectDir.toPath()); 43 | writeString(new File(projectDir, "settings.gradle.kts"), ""); 44 | writeString(new File(projectDir, "build.gradle.kts"), 45 | """ 46 | plugins { 47 | id("dev.elide") 48 | java 49 | } 50 | repositories { 51 | mavenCentral() 52 | } 53 | """); 54 | 55 | Files.createDirectories(helloPath.getParent()); 56 | writeString(new File(projectDir, "src/main/java/com/example/HelloWorld.java"), 57 | """ 58 | package com.example; 59 | 60 | public class HelloWorld { 61 | public static void main(String[] args) { 62 | System.out.println("Hello, World!"); 63 | } 64 | } 65 | """); 66 | 67 | // Run `tasks` (tests configuration phase) 68 | BuildResult result = GradleRunner.create() 69 | .forwardOutput() 70 | .withPluginClasspath() 71 | .withArguments("tasks") 72 | .withProjectDir(projectDir) 73 | .build(); 74 | 75 | assertTrue(result.getOutput().contains("BUILD SUCCESSFUL")); 76 | 77 | BuildResult buildResult = GradleRunner.create() 78 | .forwardOutput() 79 | .withPluginClasspath() 80 | .withArguments("build", "--info") 81 | .withProjectDir(projectDir) 82 | .build(); 83 | 84 | assertTrue(buildResult.getOutput().contains("BUILD SUCCESSFUL")); 85 | assertTrue(buildResult.getOutput().contains("Using Elide ")); 86 | } 87 | 88 | private void writeString(File file, String string) throws IOException { 89 | try (Writer writer = new FileWriter(file)) { 90 | writer.write(string); 91 | } 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /elide-gradle-plugin/src/main/java/dev/elide/gradle/ElideExtension.java: -------------------------------------------------------------------------------- 1 | package dev.elide.gradle; 2 | 3 | import org.gradle.api.Project; 4 | import org.gradle.api.file.DirectoryProperty; 5 | import org.gradle.api.file.RegularFile; 6 | import org.gradle.api.file.RegularFileProperty; 7 | import org.gradle.api.model.ObjectFactory; 8 | import org.gradle.api.provider.Property; 9 | import org.gradle.api.provider.Provider; 10 | import org.gradle.api.tasks.Input; 11 | import org.gradle.api.tasks.PathSensitive; 12 | import org.gradle.api.tasks.PathSensitivity; 13 | 14 | import java.nio.file.Path; 15 | 16 | public class ElideExtension implements ElideExtensionConfig { 17 | private static final boolean USE_ROOT_FOR_DEPS = true; 18 | private static final String DEFAULT_DEV_ROOT = ".dev"; 19 | protected Project activeProject; 20 | protected boolean enableInstall = false; 21 | protected boolean useBuildEmbedded = false; 22 | protected boolean enableJavacIntegration = true; 23 | protected boolean enableProjectIntegration = true; 24 | protected boolean enableMavenIntegration = true; 25 | protected boolean enableShim = true; 26 | protected Property doEnableInstall; 27 | protected Property doEmbeddedBuild; 28 | protected Property doUseMavenIntegration; 29 | protected Property doEnableProjects; 30 | protected Property doEnableJavaCompiler; 31 | protected Property doResolveElideFromPath; 32 | protected Property enableDebugMode; 33 | protected Property enableVerboseMode; 34 | @PathSensitive(PathSensitivity.RELATIVE) protected RegularFileProperty projectManifest; 35 | @PathSensitive(PathSensitivity.ABSOLUTE) protected RegularFileProperty activeElideBin; 36 | @PathSensitive(PathSensitivity.RELATIVE) protected DirectoryProperty activeDevRoot; 37 | @PathSensitive(PathSensitivity.RELATIVE) @Input protected RegularFileProperty activeLockfile; 38 | 39 | @Override 40 | public Property getEnableInstall() { 41 | return doEnableInstall; 42 | } 43 | 44 | @Override 45 | public Property getEnableEmbeddedBuild() { 46 | return doEmbeddedBuild; 47 | } 48 | 49 | @Override 50 | public Property getEnableMavenIntegration() { 51 | return doUseMavenIntegration; 52 | } 53 | 54 | @Override 55 | public Property getEnableJavaCompiler() { 56 | return doEnableJavaCompiler; 57 | } 58 | 59 | @Override 60 | public Property getEnableProjectIntegration() { 61 | return doEnableProjects; 62 | } 63 | 64 | @Override 65 | public RegularFileProperty getManifest() { 66 | return projectManifest; 67 | } 68 | 69 | @Override 70 | public Property getResolveElideFromPath() { 71 | return doResolveElideFromPath; 72 | } 73 | 74 | @Override 75 | public DirectoryProperty getDevRoot() { 76 | return activeDevRoot; 77 | } 78 | 79 | @Override 80 | public RegularFileProperty getElideBin() { 81 | return activeElideBin; 82 | } 83 | 84 | @Override 85 | public Property getDebug() { 86 | return enableDebugMode; 87 | } 88 | 89 | @Override 90 | public Property getVerbose() { 91 | return enableVerboseMode; 92 | } 93 | 94 | boolean enableShim() { 95 | return enableShim; 96 | } 97 | 98 | Path resolveLocalDepsPath() { 99 | return activeDevRoot.getAsFile().get().toPath() 100 | .resolve("dependencies") 101 | .resolve("m2"); 102 | } 103 | 104 | Provider resolveLockfilePath() { 105 | return activeDevRoot.file("elide.lock.bin"); 106 | } 107 | 108 | ElideExtension(Project project, ObjectFactory objects) { 109 | this.activeProject = project; 110 | this.doEnableInstall = objects.property(Boolean.class).convention(enableInstall); 111 | this.doEmbeddedBuild = objects.property(Boolean.class).convention(useBuildEmbedded); 112 | this.doUseMavenIntegration = objects.property(Boolean.class).convention(enableMavenIntegration); 113 | this.doEnableProjects = objects.property(Boolean.class).convention(enableProjectIntegration); 114 | this.doEnableJavaCompiler = objects.property(Boolean.class).convention(enableJavacIntegration); 115 | this.doResolveElideFromPath = objects.property(Boolean.class).convention(false); 116 | this.projectManifest = objects.fileProperty() 117 | .convention(project.getLayout().getProjectDirectory().file("elide.pkl")); 118 | 119 | var devRootProject = (USE_ROOT_FOR_DEPS ? activeProject.getRootProject() : activeProject); 120 | this.activeElideBin = objects.fileProperty(); 121 | this.activeDevRoot = objects.directoryProperty() 122 | .convention(devRootProject.getLayout().getProjectDirectory().dir(DEFAULT_DEV_ROOT)); 123 | 124 | this.enableDebugMode = objects.property(Boolean.class).convention(false); 125 | this.enableVerboseMode = objects.property(Boolean.class).convention(false); 126 | this.activeLockfile = objects.fileProperty().convention(resolveLockfilePath()); 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /elide-gradle-plugin/src/main/java/dev/elide/gradle/ElideExtensionConfig.java: -------------------------------------------------------------------------------- 1 | package dev.elide.gradle; 2 | 3 | import org.gradle.api.file.DirectoryProperty; 4 | import org.gradle.api.file.RegularFileProperty; 5 | import org.gradle.api.provider.Property; 6 | 7 | public interface ElideExtensionConfig { 8 | Property getEnableInstall(); 9 | Property getEnableEmbeddedBuild(); 10 | Property getEnableMavenIntegration(); 11 | Property getEnableJavaCompiler(); 12 | Property getEnableProjectIntegration(); 13 | RegularFileProperty getManifest(); 14 | RegularFileProperty getElideBin(); 15 | Property getResolveElideFromPath(); 16 | Property getDebug(); 17 | Property getVerbose(); 18 | DirectoryProperty getDevRoot(); 19 | } 20 | -------------------------------------------------------------------------------- /elide-gradle-plugin/src/main/java/dev/elide/gradle/ElideGradlePlugin.java: -------------------------------------------------------------------------------- 1 | package dev.elide.gradle; 2 | 3 | import org.gradle.api.Plugin; 4 | import org.gradle.api.Project; 5 | import org.gradle.api.Task; 6 | import org.gradle.api.tasks.compile.JavaCompile; 7 | 8 | import javax.inject.Inject; 9 | import java.io.BufferedReader; 10 | import java.io.File; 11 | import java.io.IOException; 12 | import java.io.InputStreamReader; 13 | import java.net.URI; 14 | import java.nio.file.Files; 15 | import java.nio.file.Path; 16 | import java.nio.file.Paths; 17 | import java.util.*; 18 | import java.util.stream.Collectors; 19 | 20 | public class ElideGradlePlugin implements Plugin { 21 | // Plugin ID for Gradle's built-in Java support. 22 | private static final String javaPluginId = "java"; 23 | 24 | // Binary name for Elide. 25 | private static final String elideBinName = "elide"; 26 | 27 | // Extension name for configuring Elide's Gradle plugin. 28 | private static final String elideExtensionName = elideBinName; 29 | 30 | // Project where the plugin is installed. 31 | private final Project activeProject; 32 | 33 | @Inject 34 | public ElideGradlePlugin(Project project) { 35 | this.activeProject = project; 36 | } 37 | 38 | // Configure a Java compile task to use Elide instead of the standard compiler API. 39 | private Task configureJavaCompileToUseElide(Path elide, Project project, JavaCompile task, ElideExtension ext) { 40 | project.getLogger().info( 41 | "Installing Elide's javac support for task '{}' within project '{}'", 42 | task.getName(), 43 | activeProject.getName()); 44 | 45 | Path javaHome = Paths.get(System.getProperty("java.home")); 46 | Path resolvedElide = null; 47 | if (ext.enableShim()) { 48 | var javaHomeShim = javaHome 49 | .resolve("bin") 50 | .resolve("elide-javac"); 51 | 52 | if (!Files.exists(javaHomeShim)) { 53 | if (Files.isWritable(javaHomeShim.getParent())) { 54 | // we can create the shim; if we are configured to do, we should do so now. 55 | try(var writer = Files.newBufferedWriter(javaHomeShim)) { 56 | // write the shim to the file 57 | writer.write("#!/bin/sh\n"); 58 | writer.write("exec " + resolvePathToElide().toAbsolutePath() + " javac -- \"$@\"\n"); 59 | } catch (IOException e) { 60 | throw new RuntimeException("Failed to write Elide javac shim", e); 61 | } 62 | } else { 63 | // we can't write the shim, and it's not there, and we need it, so we should warn and fall back. 64 | project.getLogger().warn("Elide's javac shim was not found at '{}'; falling back to stock javac.", 65 | javaHomeShim.toAbsolutePath()); 66 | return task; 67 | } 68 | } else if (!Files.isExecutable(javaHomeShim)) { 69 | // the shim is there, but it's not executable. 70 | var result = javaHomeShim.toFile().setExecutable(true); 71 | if (result) { 72 | // we're good to go 73 | resolvedElide = javaHomeShim; 74 | } else { 75 | // we can't write the shim, and it's not there, and we need it, so we should warn and fall back. 76 | project.getLogger().warn("Elide's javac shim isn't executable, and can't be made executable Please " + 77 | "run 'chmod +x {}' to fix this.", 78 | javaHomeShim.toAbsolutePath()); 79 | return task; 80 | } 81 | } else { 82 | // the shim is there and executable, so we can use it. 83 | resolvedElide = javaHomeShim; 84 | } 85 | } else { 86 | // if the shim is not enabled, we use the Elide binary directly. 87 | resolvedElide = elide; 88 | } 89 | if (resolvedElide == null) { 90 | project.getLogger().error("Failed to resolve Elide javac shim, and Java Home is not writable."); 91 | throw new RuntimeException("Failed to resolve Elide javac shim; is your Java Home writable?"); 92 | } 93 | 94 | Objects.requireNonNull(resolvedElide); 95 | var pathAsString = resolvedElide.toString(); 96 | var options = task.getOptions(); 97 | var forkOptions = options.getForkOptions(); 98 | options.setFork(true); 99 | forkOptions.setExecutable(pathAsString); 100 | 101 | // if the shim is not enabled, we need to pass the `javac` flag and the separator (`--`) so that the binary can 102 | // resolve the arguments correctly. 103 | if (!ext.enableShim()) { 104 | forkOptions.setJavaHome(javaHome.toFile()); 105 | var allArgs = forkOptions.getJvmArgs(); 106 | if (allArgs == null) { 107 | allArgs = Collections.emptyList(); 108 | } 109 | var prefixed = new ArrayList(allArgs.size() + 2); 110 | prefixed.add("javac"); 111 | prefixed.add("--"); 112 | prefixed.addAll(allArgs); 113 | forkOptions.setJvmArgs(prefixed); 114 | } 115 | return task; 116 | } 117 | 118 | // Install integration with Gradle's Java plugin; this prefers Elide's Java Compiler support. 119 | private Collection installJavacSupport(Path path, Project project) { 120 | var elideExtension = project.getExtensions().getByType(ElideExtension.class); 121 | var compileTasks = project.getTasks().withType(JavaCompile.class); 122 | project.getLogger().info( 123 | "Installing Elide's javac support for {} Gradle tasks (path: '{}')", 124 | compileTasks.size(), 125 | path.toString()); 126 | 127 | return compileTasks.stream() 128 | .map(compileTask -> configureJavaCompileToUseElide(path, project, compileTask, elideExtension)) 129 | .collect(Collectors.toList()); 130 | } 131 | 132 | // Install integration with Gradle's Maven root support. 133 | private Collection installMavenDepsSupport(Project project, ElideExtension ext, boolean generateManifest) { 134 | var repos = project.getRepositories(); 135 | var localDepsPath = ext.resolveLocalDepsPath(); 136 | repos.mavenLocal(it -> { 137 | it.setName("elide"); 138 | it.setUrl(URI.create("file://" + localDepsPath.toAbsolutePath())); 139 | }); 140 | return Collections.emptyList(); 141 | } 142 | 143 | // Resolve the path to use when invoking the Elide binary. 144 | private Path resolvePathToElide() { 145 | var path = System.getenv("PATH"); 146 | var pathSplit = path.split(File.pathSeparator); 147 | var elideViaPath = Arrays.stream(pathSplit) 148 | .map(Paths::get) 149 | .map(p -> p.resolve(elideBinName)) 150 | .filter(Files::exists) 151 | .filter(Files::isExecutable) 152 | .findFirst(); 153 | 154 | // prefer elide on the user's path 155 | if (elideViaPath.isPresent()) { 156 | return elideViaPath.get().toAbsolutePath(); 157 | } 158 | 159 | // try the user's home? 160 | var elideWithinHome = Paths.get(System.getProperty("user.home")) 161 | .resolve("elide") 162 | .resolve(elideBinName); 163 | if (Files.exists(elideWithinHome) && Files.isExecutable(elideWithinHome)) { 164 | return elideWithinHome.toAbsolutePath(); 165 | } 166 | throw new RuntimeException("Failed to find `elide` on your PATH; is it installed?"); 167 | 168 | // otherwise, we should resolve from the root project's layout. the plugin will download elide and install it 169 | // in `/build/elide-runtime`. 170 | // 171 | // var elideBuildRoot = activeProject.getRootProject().getLayout().getBuildDirectory().dir("elide-runtime"); 172 | // return elideBuildRoot.get().dir("bin").file(elideBinName).getAsFile().toPath(); 173 | } 174 | 175 | // Determine whether Elide's Maven installer integration is enabled. 176 | private boolean enableMavenInstaller(Project project, ElideExtension ext) { 177 | var disableInstallerProp = project.findProperty("elide.builder.maven.install.enable"); 178 | if (disableInstallerProp != null) { 179 | return Boolean.parseBoolean(disableInstallerProp.toString()); 180 | } 181 | return ext.getEnableInstall().get() && ext.getEnableMavenIntegration().get(); 182 | } 183 | 184 | // Detect any extant or configured project manifest file. If one is present, `elide install` is run unconditionally. 185 | private boolean detectProjectManifest(Project project, ElideExtension ext) { 186 | return ( 187 | (ext.getManifest().isPresent() && ext.getManifest().getAsFile().get().exists()) || 188 | project.getLayout().getProjectDirectory().file("elide.pkl").getAsFile().exists() 189 | ); 190 | } 191 | 192 | // Determine whether Elide's javac shim is enabled. 193 | private boolean enableJavacShim(Project project, ElideExtension ext) { 194 | var disableShimProp = project.findProperty("elide.builder.javac.enable"); 195 | if (disableShimProp != null) { 196 | return Boolean.parseBoolean(disableShimProp.toString()); 197 | } 198 | return ext.getEnableJavaCompiler().get(); 199 | } 200 | 201 | // Call Elide in a subprocess at the provided path, and with the provided args; capture output and return it as a 202 | // string to the caller. 203 | private String callElideCaptured(Path path, String[] args) { 204 | var allArgs = new String[args.length + 1]; 205 | allArgs[0] = path.toAbsolutePath().toString(); 206 | var i = 1; 207 | for (var arg : args) { 208 | allArgs[i] = arg; 209 | i += 1; 210 | } 211 | 212 | var cwd = activeProject.getLayout().getProjectDirectory().getAsFile(); 213 | var subproc = new ProcessBuilder().command(allArgs).directory(cwd); 214 | try { 215 | var proc = subproc.start(); 216 | var builder = new StringBuilder(); 217 | 218 | try (BufferedReader br = new BufferedReader(new InputStreamReader(proc.getInputStream()))) { 219 | String line; 220 | while ((line = br.readLine()) != null) { 221 | builder.append(line).append(System.lineSeparator()); 222 | } 223 | } 224 | try (BufferedReader br = new BufferedReader(new InputStreamReader(proc.getErrorStream()))) { 225 | String line; 226 | while ((line = br.readLine()) != null) { 227 | builder.append(line).append(System.lineSeparator()); 228 | } 229 | } 230 | var exit = proc.waitFor(); 231 | if (exit != 0) { 232 | // print output 233 | activeProject.getLogger().error("Elide process exited with code {}: {}", exit, builder); 234 | throw new RuntimeException("Elide failed with exit code " + exit); 235 | } 236 | return builder.toString().trim(); 237 | } catch (InterruptedException ixr) { 238 | throw new RuntimeException("Failed to wait for Elide process", ixr); 239 | } catch (IOException ioe) { 240 | throw new RuntimeException("Failed to start Elide captured process", ioe); 241 | } 242 | } 243 | 244 | @SuppressWarnings({"deprecation", "UnstableApiUsage"}) 245 | public void apply(Project project) { 246 | var elideResolved = resolvePathToElide(); 247 | project.getLogger().debug("Elide resolved to '{}'", elideResolved); 248 | if (!project.getGradle().getStartParameter().isConfigurationCacheRequested()) { 249 | var versionPrinted = callElideCaptured(elideResolved, new String[]{"--version"}); 250 | var version = versionPrinted.replace("\n", ""); 251 | project.getLogger().lifecycle("Using Elide " + version); 252 | } 253 | 254 | var objectUtil = project.getObjects(); 255 | var extension = new ElideExtension(project, objectUtil); 256 | project.getExtensions().add(elideExtensionName, extension); 257 | 258 | project.afterEvaluate(_ -> { 259 | var pluginManager = project.getPluginManager(); 260 | var javaPluginActive = pluginManager.hasPlugin(javaPluginId); 261 | var javacSupportActive = enableJavacShim(project, extension); 262 | var mavenInstallerActive = enableMavenInstaller(project, extension); 263 | var hasProjectManifest = detectProjectManifest(project, extension); 264 | 265 | project.getLogger().info( 266 | "Elide Java support: (pluginActive={}, javacSupport={})", 267 | javaPluginActive, 268 | javacSupportActive); 269 | 270 | Collection javacTasks = null; 271 | if (javaPluginActive && javacSupportActive) { 272 | javacTasks = installJavacSupport(elideResolved, project); 273 | } 274 | 275 | boolean mustGenerateManifest = false; // @TODO implement 276 | boolean installerEnabled = extension.getEnableInstall().get(); 277 | boolean shouldRunInstallWithOrWithoutMaven = installerEnabled; 278 | LinkedList allPrepTasks = new LinkedList<>(); 279 | 280 | if (mavenInstallerActive) { 281 | // to enable integration with Maven dependency installation, we need to inject a local dependency root 282 | // path, and we need to run `elide install` before compilation runs. dependencies must also be gathered 283 | // if there is no project manifest file to read from. this comes first so that Gradle is configured to 284 | // be aware of our Maven dependencies before `elide install` is run. 285 | allPrepTasks.addAll(installMavenDepsSupport(project, extension, mustGenerateManifest)); 286 | installerEnabled = true; 287 | } 288 | if (installerEnabled && hasProjectManifest) { 289 | // if a project manifest is present, we should run `elide install` regardless of other criteria, as it 290 | // may install non-JVM dependencies on the user's behalf. 291 | shouldRunInstallWithOrWithoutMaven = true; 292 | } 293 | if (shouldRunInstallWithOrWithoutMaven) { 294 | // add a precursor task to run `elide install`. 295 | allPrepTasks.add(project.getTasks().create(ElideTaskName.ELIDE_TASK_INSTALL, Task.class, task -> { 296 | task.setGroup("Elide"); 297 | task.setDescription("Runs `elide install` to prepare the project for compilation."); 298 | task.dependsOn(allPrepTasks.stream().filter(it -> it != task).collect(Collectors.toList())); 299 | task.doLast(_ -> { 300 | var start = System.currentTimeMillis(); 301 | project.getLogger().info("Running `elide install`"); 302 | var result = callElideCaptured(elideResolved, new String[]{"install"}); 303 | var end = System.currentTimeMillis(); 304 | project.getLogger().info(result); 305 | project.getLogger().lifecycle("`elide install` completed in {}ms", (end - start)); 306 | }); 307 | })); 308 | } 309 | if (!allPrepTasks.isEmpty() && javacTasks != null && !javacTasks.isEmpty()) { 310 | javacTasks.forEach(javacTask -> { 311 | javacTask.dependsOn(allPrepTasks); 312 | }); 313 | } 314 | }); 315 | } 316 | } 317 | -------------------------------------------------------------------------------- /elide-gradle-plugin/src/main/java/dev/elide/gradle/ElideTaskName.java: -------------------------------------------------------------------------------- 1 | package dev.elide.gradle; 2 | 3 | public abstract class ElideTaskName { 4 | public static final String ELIDE_TASK_INSTALL = "elideInstall"; 5 | public static final String ELIDE_BUILD = "elideBuild"; 6 | public static final String ELIDE_TEST = "elideTest"; 7 | } 8 | -------------------------------------------------------------------------------- /elide-gradle-plugin/src/test/java/com/example/plugin/ElidePluginTest.java: -------------------------------------------------------------------------------- 1 | package com.example.plugin; 2 | 3 | import org.gradle.testfixtures.ProjectBuilder; 4 | import org.gradle.api.Project; 5 | import org.junit.Test; 6 | import static org.junit.Assert.assertNotNull; 7 | 8 | 9 | public class ElidePluginTest { 10 | @Test 11 | public void pluginDoesntFailTheBuild() { 12 | // Create a test project and apply the plugin 13 | Project project = ProjectBuilder.builder().build(); 14 | project.getPlugins().apply("dev.elide"); 15 | 16 | // Verify the result 17 | // assertNotNull(project.getTasks().findByName("tasks")); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /elide-gradle-worker/.dev/elide.lock.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elide-dev/gradle/c1f5b71dce2d217eedec5a60a3d41941d207af5d/elide-gradle-worker/.dev/elide.lock.bin -------------------------------------------------------------------------------- /elide-gradle-worker/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .dev/dependencies/ 3 | .dev/cache/ 4 | -------------------------------------------------------------------------------- /elide-gradle-worker/elide.pkl: -------------------------------------------------------------------------------- 1 | //amends "https://pkl.elide.dev/pkl/project.pkl" 2 | amends "elide:project.pkl" 3 | 4 | name = "elide" 5 | description = "Worker for Elide's Gradle integration" 6 | 7 | scripts { 8 | ["types"] = "wrangler types ./worker-apis.d.ts" 9 | ["build"] = "wrangler deploy --dry-run" 10 | ["deploy"] = "wrangler deploy" 11 | } 12 | 13 | dependencies { 14 | npm { 15 | devPackages { 16 | "@cloudflare/workers-types@4.20250313.0" 17 | "wrangler@latest" 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /elide-gradle-worker/package-lock.kdl: -------------------------------------------------------------------------------- 1 | lockfile-version 1 2 | root{ 3 | dev-dependencies{ 4 | "@cloudflare/workers-types" "4.20250313.0" 5 | wrangler latest 6 | } 7 | } 8 | pkg "@cloudflare/kv-asset-handler"{ 9 | version "0.4.0" 10 | resolved "https://registry.npmjs.org/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.4.0.tgz" 11 | integrity "sha512-+tv3z+SPp+gqTIcImN9o0hqE9xyfQjI1XD9pL6NuKjua9B1y7mNYv0S9cP+QEbA4ppVgGZEmKOvHX5G5Ei1CVA==" 12 | dependencies{ 13 | mime ">=3.0.0 <4.0.0-0" 14 | } 15 | } 16 | pkg "@cloudflare/unenv-preset"{ 17 | version "2.3.2" 18 | resolved "https://registry.npmjs.org/@cloudflare/unenv-preset/-/unenv-preset-2.3.2.tgz" 19 | integrity "sha512-MtUgNl+QkQyhQvv5bbWP+BpBC1N0me4CHHuP2H4ktmOMKdB/6kkz/lo+zqiA4mEazb4y+1cwyNjVrQ2DWeE4mg==" 20 | } 21 | pkg "@cloudflare/workerd-darwin-64"{ 22 | version "1.20250525.0" 23 | resolved "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20250525.0.tgz" 24 | integrity "sha512-L5l+7sSJJT2+riR5rS3Q3PKNNySPjWfRIeaNGMVRi1dPO6QPi4lwuxfRUFNoeUdilZJUVPfSZvTtj9RedsKznQ==" 25 | } 26 | pkg "@cloudflare/workerd-darwin-arm64"{ 27 | version "1.20250525.0" 28 | resolved "https://registry.npmjs.org/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20250525.0.tgz" 29 | integrity "sha512-Y3IbIdrF/vJWh/WBvshwcSyUh175VAiLRW7963S1dXChrZ1N5wuKGQm9xY69cIGVtitpMJWWW3jLq7J/Xxwm0Q==" 30 | } 31 | pkg "@cloudflare/workerd-linux-64"{ 32 | version "1.20250525.0" 33 | resolved "https://registry.npmjs.org/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20250525.0.tgz" 34 | integrity "sha512-KSyQPAby+c6cpENoO0ayCQlY6QIh28l/+QID7VC1SLXfiNHy+hPNsH1vVBTST6CilHVAQSsy9tCZ9O9XECB8yg==" 35 | } 36 | pkg "@cloudflare/workerd-linux-arm64"{ 37 | version "1.20250525.0" 38 | resolved "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20250525.0.tgz" 39 | integrity "sha512-Nt0FUxS2kQhJUea4hMCNPaetkrAFDhPnNX/ntwcqVlGgnGt75iaAhupWJbU0GB+gIWlKeuClUUnDZqKbicoKyg==" 40 | } 41 | pkg "@cloudflare/workerd-windows-64"{ 42 | version "1.20250525.0" 43 | resolved "https://registry.npmjs.org/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20250525.0.tgz" 44 | integrity "sha512-mwTj+9f3uIa4NEXR1cOa82PjLa6dbrb3J+KCVJFYIaq7e63VxEzOchCXS4tublT2pmOhmFqkgBMXrxozxNkR2Q==" 45 | } 46 | pkg "@cloudflare/workers-types"{ 47 | version "4.20250313.0" 48 | resolved "https://registry.npmjs.org/@cloudflare/workers-types/-/workers-types-4.20250313.0.tgz" 49 | integrity "sha512-iqyzZwogC+3yL8h58vMhjYQUHUZA8XazE3Q+ofR59wDOnsPe/u9W6+aCl408N0iNBhMPvpJQQ3/lkz0iJN2fhA==" 50 | } 51 | pkg "@cspotcode/source-map-support"{ 52 | version "0.8.1" 53 | resolved "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz" 54 | integrity "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==" 55 | dependencies{ 56 | "@jridgewell/trace-mapping" "0.3.9" 57 | } 58 | } 59 | pkg "@emnapi/runtime"{ 60 | version "1.4.3" 61 | resolved "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.4.3.tgz" 62 | integrity "sha512-pBPWdu6MLKROBX05wSNKcNb++m5Er+KQ9QkB+WVM+pW2Kx9hoSrVTnu3BdkI5eBLZoKu/J6mW/B6i6bJB2ytXQ==" 63 | dependencies{ 64 | tslib ">=2.4.0 <3.0.0-0" 65 | } 66 | } 67 | pkg "@esbuild/aix-ppc64"{ 68 | version "0.25.4" 69 | resolved "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.4.tgz" 70 | integrity "sha512-1VCICWypeQKhVbE9oW/sJaAmjLxhVqacdkvPLEjwlttjfwENRSClS8EjBz0KzRyFSCPDIkuXW34Je/vk7zdB7Q==" 71 | } 72 | pkg "@esbuild/android-arm"{ 73 | version "0.25.4" 74 | resolved "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.4.tgz" 75 | integrity "sha512-QNdQEps7DfFwE3hXiU4BZeOV68HHzYwGd0Nthhd3uCkkEKK7/R6MTgM0P7H7FAs5pU/DIWsviMmEGxEoxIZ+ZQ==" 76 | } 77 | pkg "@esbuild/android-arm64"{ 78 | version "0.25.4" 79 | resolved "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.4.tgz" 80 | integrity "sha512-bBy69pgfhMGtCnwpC/x5QhfxAz/cBgQ9enbtwjf6V9lnPI/hMyT9iWpR1arm0l3kttTr4L0KSLpKmLp/ilKS9A==" 81 | } 82 | pkg "@esbuild/android-x64"{ 83 | version "0.25.4" 84 | resolved "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.4.tgz" 85 | integrity "sha512-TVhdVtQIFuVpIIR282btcGC2oGQoSfZfmBdTip2anCaVYcqWlZXGcdcKIUklfX2wj0JklNYgz39OBqh2cqXvcQ==" 86 | } 87 | pkg "@esbuild/darwin-arm64"{ 88 | version "0.25.4" 89 | resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.4.tgz" 90 | integrity "sha512-Y1giCfM4nlHDWEfSckMzeWNdQS31BQGs9/rouw6Ub91tkK79aIMTH3q9xHvzH8d0wDru5Ci0kWB8b3up/nl16g==" 91 | } 92 | pkg "@esbuild/darwin-x64"{ 93 | version "0.25.4" 94 | resolved "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.4.tgz" 95 | integrity "sha512-CJsry8ZGM5VFVeyUYB3cdKpd/H69PYez4eJh1W/t38vzutdjEjtP7hB6eLKBoOdxcAlCtEYHzQ/PJ/oU9I4u0A==" 96 | } 97 | pkg "@esbuild/freebsd-arm64"{ 98 | version "0.25.4" 99 | resolved "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.4.tgz" 100 | integrity "sha512-yYq+39NlTRzU2XmoPW4l5Ifpl9fqSk0nAJYM/V/WUGPEFfek1epLHJIkTQM6bBs1swApjO5nWgvr843g6TjxuQ==" 101 | } 102 | pkg "@esbuild/freebsd-x64"{ 103 | version "0.25.4" 104 | resolved "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.4.tgz" 105 | integrity "sha512-0FgvOJ6UUMflsHSPLzdfDnnBBVoCDtBTVyn/MrWloUNvq/5SFmh13l3dvgRPkDihRxb77Y17MbqbCAa2strMQQ==" 106 | } 107 | pkg "@esbuild/linux-arm"{ 108 | version "0.25.4" 109 | resolved "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.4.tgz" 110 | integrity "sha512-kro4c0P85GMfFYqW4TWOpvmF8rFShbWGnrLqlzp4X1TNWjRY3JMYUfDCtOxPKOIY8B0WC8HN51hGP4I4hz4AaQ==" 111 | } 112 | pkg "@esbuild/linux-arm64"{ 113 | version "0.25.4" 114 | resolved "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.4.tgz" 115 | integrity "sha512-+89UsQTfXdmjIvZS6nUnOOLoXnkUTB9hR5QAeLrQdzOSWZvNSAXAtcRDHWtqAUtAmv7ZM1WPOOeSxDzzzMogiQ==" 116 | } 117 | pkg "@esbuild/linux-ia32"{ 118 | version "0.25.4" 119 | resolved "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.4.tgz" 120 | integrity "sha512-yTEjoapy8UP3rv8dB0ip3AfMpRbyhSN3+hY8mo/i4QXFeDxmiYbEKp3ZRjBKcOP862Ua4b1PDfwlvbuwY7hIGQ==" 121 | } 122 | pkg "@esbuild/linux-loong64"{ 123 | version "0.25.4" 124 | resolved "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.4.tgz" 125 | integrity "sha512-NeqqYkrcGzFwi6CGRGNMOjWGGSYOpqwCjS9fvaUlX5s3zwOtn1qwg1s2iE2svBe4Q/YOG1q6875lcAoQK/F4VA==" 126 | } 127 | pkg "@esbuild/linux-mips64el"{ 128 | version "0.25.4" 129 | resolved "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.4.tgz" 130 | integrity "sha512-IcvTlF9dtLrfL/M8WgNI/qJYBENP3ekgsHbYUIzEzq5XJzzVEV/fXY9WFPfEEXmu3ck2qJP8LG/p3Q8f7Zc2Xg==" 131 | } 132 | pkg "@esbuild/linux-ppc64"{ 133 | version "0.25.4" 134 | resolved "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.4.tgz" 135 | integrity "sha512-HOy0aLTJTVtoTeGZh4HSXaO6M95qu4k5lJcH4gxv56iaycfz1S8GO/5Jh6X4Y1YiI0h7cRyLi+HixMR+88swag==" 136 | } 137 | pkg "@esbuild/linux-riscv64"{ 138 | version "0.25.4" 139 | resolved "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.4.tgz" 140 | integrity "sha512-i8JUDAufpz9jOzo4yIShCTcXzS07vEgWzyX3NH2G7LEFVgrLEhjwL3ajFE4fZI3I4ZgiM7JH3GQ7ReObROvSUA==" 141 | } 142 | pkg "@esbuild/linux-s390x"{ 143 | version "0.25.4" 144 | resolved "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.4.tgz" 145 | integrity "sha512-jFnu+6UbLlzIjPQpWCNh5QtrcNfMLjgIavnwPQAfoGx4q17ocOU9MsQ2QVvFxwQoWpZT8DvTLooTvmOQXkO51g==" 146 | } 147 | pkg "@esbuild/linux-x64"{ 148 | version "0.25.4" 149 | resolved "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.4.tgz" 150 | integrity "sha512-6e0cvXwzOnVWJHq+mskP8DNSrKBr1bULBvnFLpc1KY+d+irZSgZ02TGse5FsafKS5jg2e4pbvK6TPXaF/A6+CA==" 151 | } 152 | pkg "@esbuild/netbsd-arm64"{ 153 | version "0.25.4" 154 | resolved "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.4.tgz" 155 | integrity "sha512-vUnkBYxZW4hL/ie91hSqaSNjulOnYXE1VSLusnvHg2u3jewJBz3YzB9+oCw8DABeVqZGg94t9tyZFoHma8gWZQ==" 156 | } 157 | pkg "@esbuild/netbsd-x64"{ 158 | version "0.25.4" 159 | resolved "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.4.tgz" 160 | integrity "sha512-XAg8pIQn5CzhOB8odIcAm42QsOfa98SBeKUdo4xa8OvX8LbMZqEtgeWE9P/Wxt7MlG2QqvjGths+nq48TrUiKw==" 161 | } 162 | pkg "@esbuild/openbsd-arm64"{ 163 | version "0.25.4" 164 | resolved "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.4.tgz" 165 | integrity "sha512-Ct2WcFEANlFDtp1nVAXSNBPDxyU+j7+tId//iHXU2f/lN5AmO4zLyhDcpR5Cz1r08mVxzt3Jpyt4PmXQ1O6+7A==" 166 | } 167 | pkg "@esbuild/openbsd-x64"{ 168 | version "0.25.4" 169 | resolved "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.4.tgz" 170 | integrity "sha512-xAGGhyOQ9Otm1Xu8NT1ifGLnA6M3sJxZ6ixylb+vIUVzvvd6GOALpwQrYrtlPouMqd/vSbgehz6HaVk4+7Afhw==" 171 | } 172 | pkg "@esbuild/sunos-x64"{ 173 | version "0.25.4" 174 | resolved "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.4.tgz" 175 | integrity "sha512-Mw+tzy4pp6wZEK0+Lwr76pWLjrtjmJyUB23tHKqEDP74R3q95luY/bXqXZeYl4NYlvwOqoRKlInQialgCKy67Q==" 176 | } 177 | pkg "@esbuild/win32-arm64"{ 178 | version "0.25.4" 179 | resolved "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.4.tgz" 180 | integrity "sha512-AVUP428VQTSddguz9dO9ngb+E5aScyg7nOeJDrF1HPYu555gmza3bDGMPhmVXL8svDSoqPCsCPjb265yG/kLKQ==" 181 | } 182 | pkg "@esbuild/win32-ia32"{ 183 | version "0.25.4" 184 | resolved "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.4.tgz" 185 | integrity "sha512-i1sW+1i+oWvQzSgfRcxxG2k4I9n3O9NRqy8U+uugaT2Dy7kLO9Y7wI72haOahxceMX8hZAzgGou1FhndRldxRg==" 186 | } 187 | pkg "@esbuild/win32-x64"{ 188 | version "0.25.4" 189 | resolved "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.4.tgz" 190 | integrity "sha512-nOT2vZNw6hJ+z43oP1SPea/G/6AbN6X+bGNhNuq8NtRHy4wsMhw765IKLNmnjek7GvjWBYQ8Q5VBoYTFg9y1UQ==" 191 | } 192 | pkg "@fastify/busboy"{ 193 | version "2.1.1" 194 | resolved "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz" 195 | integrity "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==" 196 | } 197 | pkg "@img/sharp-darwin-arm64"{ 198 | version "0.33.5" 199 | resolved "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz" 200 | integrity "sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==" 201 | optional-dependencies{ 202 | "@img/sharp-libvips-darwin-arm64" "1.0.4" 203 | } 204 | } 205 | pkg "@img/sharp-darwin-x64"{ 206 | version "0.33.5" 207 | resolved "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.5.tgz" 208 | integrity "sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==" 209 | optional-dependencies{ 210 | "@img/sharp-libvips-darwin-x64" "1.0.4" 211 | } 212 | } 213 | pkg "@img/sharp-libvips-darwin-arm64"{ 214 | version "1.0.4" 215 | resolved "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.4.tgz" 216 | integrity "sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==" 217 | } 218 | pkg "@img/sharp-libvips-darwin-x64"{ 219 | version "1.0.4" 220 | resolved "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.4.tgz" 221 | integrity "sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==" 222 | } 223 | pkg "@img/sharp-libvips-linux-arm"{ 224 | version "1.0.5" 225 | resolved "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.5.tgz" 226 | integrity "sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==" 227 | } 228 | pkg "@img/sharp-libvips-linux-arm64"{ 229 | version "1.0.4" 230 | resolved "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.4.tgz" 231 | integrity "sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==" 232 | } 233 | pkg "@img/sharp-libvips-linux-s390x"{ 234 | version "1.0.4" 235 | resolved "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.4.tgz" 236 | integrity "sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==" 237 | } 238 | pkg "@img/sharp-libvips-linux-x64"{ 239 | version "1.0.4" 240 | resolved "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.4.tgz" 241 | integrity "sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==" 242 | } 243 | pkg "@img/sharp-libvips-linuxmusl-arm64"{ 244 | version "1.0.4" 245 | resolved "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.4.tgz" 246 | integrity "sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==" 247 | } 248 | pkg "@img/sharp-libvips-linuxmusl-x64"{ 249 | version "1.0.4" 250 | resolved "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.4.tgz" 251 | integrity "sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==" 252 | } 253 | pkg "@img/sharp-linux-arm"{ 254 | version "0.33.5" 255 | resolved "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.5.tgz" 256 | integrity "sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==" 257 | optional-dependencies{ 258 | "@img/sharp-libvips-linux-arm" "1.0.5" 259 | } 260 | } 261 | pkg "@img/sharp-linux-arm64"{ 262 | version "0.33.5" 263 | resolved "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.5.tgz" 264 | integrity "sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==" 265 | optional-dependencies{ 266 | "@img/sharp-libvips-linux-arm64" "1.0.4" 267 | } 268 | } 269 | pkg "@img/sharp-linux-s390x"{ 270 | version "0.33.5" 271 | resolved "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.5.tgz" 272 | integrity "sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==" 273 | optional-dependencies{ 274 | "@img/sharp-libvips-linux-s390x" "1.0.4" 275 | } 276 | } 277 | pkg "@img/sharp-linux-x64"{ 278 | version "0.33.5" 279 | resolved "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.5.tgz" 280 | integrity "sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==" 281 | optional-dependencies{ 282 | "@img/sharp-libvips-linux-x64" "1.0.4" 283 | } 284 | } 285 | pkg "@img/sharp-linuxmusl-arm64"{ 286 | version "0.33.5" 287 | resolved "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.5.tgz" 288 | integrity "sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==" 289 | optional-dependencies{ 290 | "@img/sharp-libvips-linuxmusl-arm64" "1.0.4" 291 | } 292 | } 293 | pkg "@img/sharp-linuxmusl-x64"{ 294 | version "0.33.5" 295 | resolved "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.5.tgz" 296 | integrity "sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==" 297 | optional-dependencies{ 298 | "@img/sharp-libvips-linuxmusl-x64" "1.0.4" 299 | } 300 | } 301 | pkg "@img/sharp-wasm32"{ 302 | version "0.33.5" 303 | resolved "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.33.5.tgz" 304 | integrity "sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==" 305 | dependencies{ 306 | "@emnapi/runtime" ">=1.2.0 <2.0.0-0" 307 | } 308 | } 309 | pkg "@img/sharp-win32-ia32"{ 310 | version "0.33.5" 311 | resolved "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.5.tgz" 312 | integrity "sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==" 313 | } 314 | pkg "@img/sharp-win32-x64"{ 315 | version "0.33.5" 316 | resolved "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.5.tgz" 317 | integrity "sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==" 318 | } 319 | pkg "@jridgewell/resolve-uri"{ 320 | version "3.1.2" 321 | resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz" 322 | integrity "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==" 323 | } 324 | pkg "@jridgewell/sourcemap-codec"{ 325 | version "1.5.0" 326 | resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz" 327 | integrity "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==" 328 | } 329 | pkg "@jridgewell/trace-mapping"{ 330 | version "0.3.9" 331 | resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz" 332 | integrity "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==" 333 | dependencies{ 334 | "@jridgewell/resolve-uri" ">=3.0.3 <4.0.0-0" 335 | "@jridgewell/sourcemap-codec" ">=1.4.10 <2.0.0-0" 336 | } 337 | } 338 | pkg acorn{ 339 | version "8.14.0" 340 | resolved "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz" 341 | integrity "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==" 342 | } 343 | pkg acorn-walk{ 344 | version "8.3.2" 345 | resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz" 346 | integrity "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==" 347 | } 348 | pkg as-table{ 349 | version "1.0.55" 350 | resolved "https://registry.npmjs.org/as-table/-/as-table-1.0.55.tgz" 351 | integrity "sha512-xvsWESUJn0JN421Xb9MQw6AsMHRCUknCe0Wjlxvjud80mU4E6hQf1A6NzQKcYNmYw62MfzEtXc+badstZP3JpQ==" 352 | dependencies{ 353 | printable-characters ">=1.0.42 <2.0.0-0" 354 | } 355 | } 356 | pkg blake3-wasm{ 357 | version "2.1.5" 358 | resolved "https://registry.npmjs.org/blake3-wasm/-/blake3-wasm-2.1.5.tgz" 359 | integrity "sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g==" 360 | } 361 | pkg color{ 362 | version "4.2.3" 363 | resolved "https://registry.npmjs.org/color/-/color-4.2.3.tgz" 364 | integrity "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==" 365 | dependencies{ 366 | color-convert ">=2.0.1 <3.0.0-0" 367 | color-string ">=1.9.0 <2.0.0-0" 368 | } 369 | } 370 | pkg color-convert{ 371 | version "2.0.1" 372 | resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" 373 | integrity "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==" 374 | dependencies{ 375 | color-name ">=1.1.4 <1.2.0-0" 376 | } 377 | } 378 | pkg color-name{ 379 | version "1.1.4" 380 | resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" 381 | integrity "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" 382 | } 383 | pkg color-string{ 384 | version "1.9.1" 385 | resolved "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz" 386 | integrity "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==" 387 | dependencies{ 388 | color-name ">=1.0.0 <2.0.0-0" 389 | simple-swizzle ">=0.2.2 <0.3.0-0" 390 | } 391 | } 392 | pkg cookie{ 393 | version "0.7.2" 394 | resolved "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz" 395 | integrity "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==" 396 | } 397 | pkg data-uri-to-buffer{ 398 | version "2.0.2" 399 | resolved "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-2.0.2.tgz" 400 | integrity "sha512-ND9qDTLc6diwj+Xe5cdAgVTbLVdXbtxTJRXRhli8Mowuaan+0EJOtdqJ0QCHNSSPyoXGx9HX2/VMnKeC34AChA==" 401 | } 402 | pkg defu{ 403 | version "6.1.4" 404 | resolved "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz" 405 | integrity "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==" 406 | } 407 | pkg detect-libc{ 408 | version "2.0.4" 409 | resolved "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.4.tgz" 410 | integrity "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==" 411 | } 412 | pkg esbuild{ 413 | version "0.25.4" 414 | resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.25.4.tgz" 415 | integrity "sha512-8pgjLUcUjcgDg+2Q4NYXnPbo/vncAY4UmyaCm0jZevERqCHZIaWwdJHkf8XQtu4AxSKCdvrUbT0XUr1IdZzI8Q==" 416 | optional-dependencies{ 417 | "@esbuild/aix-ppc64" "0.25.4" 418 | "@esbuild/android-arm" "0.25.4" 419 | "@esbuild/android-arm64" "0.25.4" 420 | "@esbuild/android-x64" "0.25.4" 421 | "@esbuild/darwin-arm64" "0.25.4" 422 | "@esbuild/darwin-x64" "0.25.4" 423 | "@esbuild/freebsd-arm64" "0.25.4" 424 | "@esbuild/freebsd-x64" "0.25.4" 425 | "@esbuild/linux-arm" "0.25.4" 426 | "@esbuild/linux-arm64" "0.25.4" 427 | "@esbuild/linux-ia32" "0.25.4" 428 | "@esbuild/linux-loong64" "0.25.4" 429 | "@esbuild/linux-mips64el" "0.25.4" 430 | "@esbuild/linux-ppc64" "0.25.4" 431 | "@esbuild/linux-riscv64" "0.25.4" 432 | "@esbuild/linux-s390x" "0.25.4" 433 | "@esbuild/linux-x64" "0.25.4" 434 | "@esbuild/netbsd-arm64" "0.25.4" 435 | "@esbuild/netbsd-x64" "0.25.4" 436 | "@esbuild/openbsd-arm64" "0.25.4" 437 | "@esbuild/openbsd-x64" "0.25.4" 438 | "@esbuild/sunos-x64" "0.25.4" 439 | "@esbuild/win32-arm64" "0.25.4" 440 | "@esbuild/win32-ia32" "0.25.4" 441 | "@esbuild/win32-x64" "0.25.4" 442 | } 443 | } 444 | pkg exit-hook{ 445 | version "2.2.1" 446 | resolved "https://registry.npmjs.org/exit-hook/-/exit-hook-2.2.1.tgz" 447 | integrity "sha512-eNTPlAD67BmP31LDINZ3U7HSF8l57TxOY2PmBJ1shpCvpnxBF93mWCE8YHBnXs8qiUZJc9WDcWIeC3a2HIAMfw==" 448 | } 449 | pkg exsolve{ 450 | version "1.0.5" 451 | resolved "https://registry.npmjs.org/exsolve/-/exsolve-1.0.5.tgz" 452 | integrity "sha512-pz5dvkYYKQ1AHVrgOzBKWeP4u4FRb3a6DNK2ucr0OoNwYIU4QWsJ+NM36LLzORT+z845MzKHHhpXiUF5nvQoJg==" 453 | } 454 | pkg fsevents{ 455 | version "2.3.3" 456 | resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz" 457 | integrity "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==" 458 | } 459 | pkg get-source{ 460 | version "2.0.12" 461 | resolved "https://registry.npmjs.org/get-source/-/get-source-2.0.12.tgz" 462 | integrity "sha512-X5+4+iD+HoSeEED+uwrQ07BOQr0kEDFMVqqpBuI+RaZBpBpHCuXxo70bjar6f0b0u/DQJsJ7ssurpP0V60Az+w==" 463 | dependencies{ 464 | data-uri-to-buffer ">=2.0.0 <3.0.0-0" 465 | source-map ">=0.6.1 <0.7.0-0" 466 | } 467 | } 468 | pkg glob-to-regexp{ 469 | version "0.4.1" 470 | resolved "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz" 471 | integrity "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==" 472 | } 473 | pkg is-arrayish{ 474 | version "0.3.2" 475 | resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz" 476 | integrity "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" 477 | } 478 | pkg mime{ 479 | version "3.0.0" 480 | resolved "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz" 481 | integrity "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==" 482 | } 483 | pkg miniflare{ 484 | version "4.20250525.0" 485 | resolved "https://registry.npmjs.org/miniflare/-/miniflare-4.20250525.0.tgz" 486 | integrity "sha512-F5XRDn9WqxUaHphUT8qwy5WXC/3UwbBRJTdjjP5uwHX82vypxIlHNyHziZnplPLhQa1kbSdIY7wfuP1XJyyYZw==" 487 | dependencies{ 488 | "@cspotcode/source-map-support" "0.8.1" 489 | acorn "8.14.0" 490 | acorn-walk "8.3.2" 491 | exit-hook "2.2.1" 492 | glob-to-regexp "0.4.1" 493 | sharp ">=0.33.5 <0.34.0-0" 494 | stoppable "1.1.0" 495 | undici ">=5.28.5 <6.0.0-0" 496 | workerd "1.20250525.0" 497 | ws "8.18.0" 498 | youch "3.3.4" 499 | zod "3.22.3" 500 | } 501 | } 502 | pkg mustache{ 503 | version "4.2.0" 504 | resolved "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz" 505 | integrity "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==" 506 | } 507 | pkg ohash{ 508 | version "2.0.11" 509 | resolved "https://registry.npmjs.org/ohash/-/ohash-2.0.11.tgz" 510 | integrity "sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==" 511 | } 512 | pkg path-to-regexp{ 513 | version "6.3.0" 514 | resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz" 515 | integrity "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==" 516 | } 517 | pkg pathe{ 518 | version "2.0.3" 519 | resolved "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz" 520 | integrity "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==" 521 | } 522 | pkg printable-characters{ 523 | version "1.0.42" 524 | resolved "https://registry.npmjs.org/printable-characters/-/printable-characters-1.0.42.tgz" 525 | integrity "sha512-dKp+C4iXWK4vVYZmYSd0KBH5F/h1HoZRsbJ82AVKRO3PEo8L4lBS/vLwhVtpwwuYcoIsVY+1JYKR268yn480uQ==" 526 | } 527 | pkg semver{ 528 | version "7.7.2" 529 | resolved "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz" 530 | integrity "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==" 531 | } 532 | pkg sharp{ 533 | version "0.33.5" 534 | resolved "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz" 535 | integrity "sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==" 536 | dependencies{ 537 | color ">=4.2.3 <5.0.0-0" 538 | detect-libc ">=2.0.3 <3.0.0-0" 539 | semver ">=7.6.3 <8.0.0-0" 540 | } 541 | optional-dependencies{ 542 | "@img/sharp-darwin-arm64" "0.33.5" 543 | "@img/sharp-darwin-x64" "0.33.5" 544 | "@img/sharp-libvips-darwin-arm64" "1.0.4" 545 | "@img/sharp-libvips-darwin-x64" "1.0.4" 546 | "@img/sharp-libvips-linux-arm" "1.0.5" 547 | "@img/sharp-libvips-linux-arm64" "1.0.4" 548 | "@img/sharp-libvips-linux-s390x" "1.0.4" 549 | "@img/sharp-libvips-linux-x64" "1.0.4" 550 | "@img/sharp-libvips-linuxmusl-arm64" "1.0.4" 551 | "@img/sharp-libvips-linuxmusl-x64" "1.0.4" 552 | "@img/sharp-linux-arm" "0.33.5" 553 | "@img/sharp-linux-arm64" "0.33.5" 554 | "@img/sharp-linux-s390x" "0.33.5" 555 | "@img/sharp-linux-x64" "0.33.5" 556 | "@img/sharp-linuxmusl-arm64" "0.33.5" 557 | "@img/sharp-linuxmusl-x64" "0.33.5" 558 | "@img/sharp-wasm32" "0.33.5" 559 | "@img/sharp-win32-ia32" "0.33.5" 560 | "@img/sharp-win32-x64" "0.33.5" 561 | } 562 | } 563 | pkg simple-swizzle{ 564 | version "0.2.2" 565 | resolved "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz" 566 | integrity "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==" 567 | dependencies{ 568 | is-arrayish ">=0.3.1 <0.4.0-0" 569 | } 570 | } 571 | pkg source-map{ 572 | version "0.6.1" 573 | resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" 574 | integrity "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" 575 | } 576 | pkg stacktracey{ 577 | version "2.1.8" 578 | resolved "https://registry.npmjs.org/stacktracey/-/stacktracey-2.1.8.tgz" 579 | integrity "sha512-Kpij9riA+UNg7TnphqjH7/CzctQ/owJGNbFkfEeve4Z4uxT5+JapVLFXcsurIfN34gnTWZNJ/f7NMG0E8JDzTw==" 580 | dependencies{ 581 | as-table ">=1.0.36 <2.0.0-0" 582 | get-source ">=2.0.12 <3.0.0-0" 583 | } 584 | } 585 | pkg stoppable{ 586 | version "1.1.0" 587 | resolved "https://registry.npmjs.org/stoppable/-/stoppable-1.1.0.tgz" 588 | integrity "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==" 589 | } 590 | pkg tslib{ 591 | version "2.8.1" 592 | resolved "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz" 593 | integrity "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" 594 | } 595 | pkg ufo{ 596 | version "1.6.1" 597 | resolved "https://registry.npmjs.org/ufo/-/ufo-1.6.1.tgz" 598 | integrity "sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==" 599 | } 600 | pkg undici{ 601 | version "5.29.0" 602 | resolved "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz" 603 | integrity "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==" 604 | dependencies{ 605 | "@fastify/busboy" ">=2.0.0 <3.0.0-0" 606 | } 607 | } 608 | pkg unenv{ 609 | version "2.0.0-rc.17" 610 | resolved "https://registry.npmjs.org/unenv/-/unenv-2.0.0-rc.17.tgz" 611 | integrity "sha512-B06u0wXkEd+o5gOCMl/ZHl5cfpYbDZKAT+HWTL+Hws6jWu7dCiqBBXXXzMFcFVJb8D4ytAnYmxJA83uwOQRSsg==" 612 | dependencies{ 613 | defu ">=6.1.4 <7.0.0-0" 614 | exsolve ">=1.0.4 <2.0.0-0" 615 | ohash ">=2.0.11 <3.0.0-0" 616 | pathe ">=2.0.3 <3.0.0-0" 617 | ufo ">=1.6.1 <2.0.0-0" 618 | } 619 | } 620 | pkg workerd{ 621 | version "1.20250525.0" 622 | resolved "https://registry.npmjs.org/workerd/-/workerd-1.20250525.0.tgz" 623 | integrity "sha512-SXJgLREy/Aqw2J71Oah0Pbu+SShbqbTExjVQyRBTM1r7MG7fS5NUlknhnt6sikjA/t4cO09Bi8OJqHdTkrcnYQ==" 624 | optional-dependencies{ 625 | "@cloudflare/workerd-darwin-64" "1.20250525.0" 626 | "@cloudflare/workerd-darwin-arm64" "1.20250525.0" 627 | "@cloudflare/workerd-linux-64" "1.20250525.0" 628 | "@cloudflare/workerd-linux-arm64" "1.20250525.0" 629 | "@cloudflare/workerd-windows-64" "1.20250525.0" 630 | } 631 | } 632 | pkg wrangler{ 633 | version "4.18.0" 634 | resolved "https://registry.npmjs.org/wrangler/-/wrangler-4.18.0.tgz" 635 | integrity "sha512-/ng0KI9io97SNsBU1rheADBLLTE5Djybgsi4gXuvH1RBKJGpyj1xWvZ2fuWu8vAonit3EiZkwtERTm6kESHP3A==" 636 | dependencies{ 637 | "@cloudflare/kv-asset-handler" "0.4.0" 638 | "@cloudflare/unenv-preset" "2.3.2" 639 | blake3-wasm "2.1.5" 640 | esbuild "0.25.4" 641 | miniflare "4.20250525.0" 642 | path-to-regexp "6.3.0" 643 | unenv "2.0.0-rc.17" 644 | workerd "1.20250525.0" 645 | } 646 | optional-dependencies{ 647 | fsevents ">=2.3.2 <2.4.0-0" 648 | } 649 | } 650 | pkg ws{ 651 | version "8.18.0" 652 | resolved "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz" 653 | integrity "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==" 654 | } 655 | pkg youch{ 656 | version "3.3.4" 657 | resolved "https://registry.npmjs.org/youch/-/youch-3.3.4.tgz" 658 | integrity "sha512-UeVBXie8cA35DS6+nBkls68xaBBXCye0CNznrhszZjTbRVnJKQuNsyLKBTTL4ln1o1rh2PKtv35twV7irj5SEg==" 659 | dependencies{ 660 | cookie ">=0.7.1 <0.8.0-0" 661 | mustache ">=4.2.0 <5.0.0-0" 662 | stacktracey ">=2.1.8 <3.0.0-0" 663 | } 664 | } 665 | pkg zod{ 666 | version "3.22.3" 667 | resolved "https://registry.npmjs.org/zod/-/zod-3.22.3.tgz" 668 | integrity "sha512-EjIevzuJRiRPbVH4mGc8nApb/lVLKVpmUhAaR5R5doKGfAnGJ6Gr3CViAVjP+4FWSxCsybeWQdcgCtbX+7oZug==" 669 | } 670 | -------------------------------------------------------------------------------- /elide-gradle-worker/worker.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | import { WorkerEntrypoint } from "cloudflare:workers" 5 | 6 | const mainBranch = 'main'; 7 | const latestTag = 'latest'; 8 | const redirectStatus = 302; 9 | const expectedScript = 'elide.gradle.kts' 10 | const githubUrlBase = 'https://raw.githubusercontent.com/elide-dev/gradle'; 11 | 12 | enum CacheMode { 13 | Short, 14 | Long, 15 | } 16 | 17 | function renderCacheControl(mode: CacheMode): string { 18 | const base = `public`; 19 | switch (mode) { 20 | case CacheMode.Short: 21 | return `${base}, max-age=60, stale-while-revalidate=60`; 22 | case CacheMode.Long: 23 | return `${base}, max-age=604800, stale-while-revalidate=604800`; 24 | default: 25 | return base; 26 | } 27 | } 28 | 29 | // Entrypoint for the worker. 30 | export default class extends WorkerEntrypoint { 31 | async fetch(request: Request): Promise { 32 | const url = new URL(request.url); 33 | const { pathname } = url; 34 | if (pathname === '/') { 35 | return new Response('NOT_FOUND', { status: 404 }); 36 | } 37 | let revision: string = ''; 38 | let type: string = ''; 39 | let cacheMode: CacheMode = CacheMode.Short; 40 | 41 | if (pathname === `/${expectedScript}`) { 42 | revision = mainBranch; 43 | type = 'refs/heads'; 44 | } else { 45 | // remove `/tag/` segment unconditionally to cover errant url format published briefly 46 | const firstSegment = (pathname.replace("/tag/", "/")).split('/')[1] || ''; 47 | if (firstSegment === latestTag) { 48 | revision = mainBranch; 49 | type = 'refs/heads'; 50 | } 51 | if (firstSegment === mainBranch) { 52 | revision = mainBranch; 53 | type = 'refs/heads'; 54 | } 55 | if (firstSegment.indexOf('1.0') === 0) { 56 | // it's a version 57 | revision = firstSegment; 58 | type = 'refs/tags'; 59 | cacheMode = CacheMode.Long; 60 | } 61 | if (!revision) { 62 | // we should assume it's a commit 63 | revision = firstSegment; 64 | type = 'refs'; 65 | cacheMode = CacheMode.Long; 66 | } 67 | } 68 | const finalizedUrl = `${githubUrlBase}/${type}/${revision}/${expectedScript}`; 69 | const headers = new Headers(); 70 | headers.set("Cache-Control", renderCacheControl(cacheMode)); 71 | headers.set("Location", finalizedUrl); 72 | return new Response(null, { status: redirectStatus, headers }) 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /elide-gradle-worker/wrangler.toml: -------------------------------------------------------------------------------- 1 | name = "elide-gradle" 2 | main = "worker.ts" 3 | compatibility_date = "2025-03-14" 4 | 5 | routes = [ 6 | { pattern = "gradle.elide.dev", custom_domain = true }, 7 | ] 8 | 9 | analytics_engine_datasets = [ 10 | { binding = "ANALYTICS", dataset = "elide_gradle_v1" }, 11 | ] 12 | 13 | [observability.logs] 14 | enabled = true 15 | -------------------------------------------------------------------------------- /elide.gradle.kts: -------------------------------------------------------------------------------- 1 | // 2 | // Elide Gradle Plugin 3 | // 4 | 5 | val thisVersion = "1.0.0" 6 | 7 | pluginManagement { 8 | // Installs Elide's maven repository for plugin resolution. 9 | repositories { 10 | maven { 11 | name = "elide" 12 | url = uri("https://maven.elide.dev") 13 | } 14 | } 15 | } 16 | 17 | dependencyResolutionManagement { 18 | // Installs Elide's maven repository for dependency resolution. 19 | @Suppress("UnstableApiUsage") 20 | repositories { 21 | maven { 22 | name = "elide" 23 | url = uri("https://maven.elide.dev") 24 | } 25 | } 26 | 27 | // Installs Elide's Gradle Version Catalog for dependency management. 28 | versionCatalogs { 29 | create("elideRuntime") { 30 | from("dev.elide.gradle:elide-gradle-catalog:$thisVersion") 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /example-project-remote/.dev/elide.lock.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elide-dev/gradle/c1f5b71dce2d217eedec5a60a3d41941d207af5d/example-project-remote/.dev/elide.lock.bin -------------------------------------------------------------------------------- /example-project-remote/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | .gradle/ 3 | *.dev/dependencies/* 4 | -------------------------------------------------------------------------------- /example-project-remote/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | alias(elideRuntime.plugins.elide) 3 | java 4 | application 5 | } 6 | 7 | application { 8 | mainClass = "com.example.HelloWorld" 9 | } 10 | 11 | elide { 12 | // Use Elide instead of Gradle to resolve and download dependencies. Note that Elide uses Maven's resolver semantics 13 | // by default, so this may produce a different dependency graph than Gradle. 14 | enableInstall = true 15 | 16 | // Use Elide to compile the project instead of stock `javac`. 17 | enableJavaCompiler = true 18 | 19 | // Use the project's `elide.pkl` manifest to resolve dependencies and create tasks. 20 | manifest = layout.projectDirectory.file("elide.pkl") 21 | } 22 | 23 | dependencies { 24 | // Versions are mapped here so that Gradle becomes aware of the classpath needed to build and run the project. Elide 25 | // is used to resolve and download these dependencies, even though they are declared here. 26 | // 27 | // That's because `elide install` creates an `m2`-compatible root (a "local Maven repository") at 28 | // `.dev/dependencies/m2`. Gradle picks up the dependencies from there. 29 | implementation("com.google.guava:guava:33.4.8-jre") 30 | } 31 | -------------------------------------------------------------------------------- /example-project-remote/elide.pkl: -------------------------------------------------------------------------------- 1 | amends "elide:project.pkl" 2 | 3 | name = "elide-gradle-example" 4 | description = "Example project using Elide Gradle" 5 | 6 | dependencies { 7 | maven { 8 | packages { 9 | // Guava 10 | "com.google.guava:guava:33.4.8-jre" 11 | } 12 | } 13 | } 14 | 15 | -------------------------------------------------------------------------------- /example-project-remote/gradle.properties: -------------------------------------------------------------------------------- 1 | elidePluginVersion=latest 2 | org.gradle.configuration-cache=false 3 | -------------------------------------------------------------------------------- /example-project-remote/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elide-dev/gradle/c1f5b71dce2d217eedec5a60a3d41941d207af5d/example-project-remote/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /example-project-remote/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /example-project-remote/gradlew: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Copyright © 2015-2021 the original authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | # SPDX-License-Identifier: Apache-2.0 19 | # 20 | 21 | ############################################################################## 22 | # 23 | # Gradle start up script for POSIX generated by Gradle. 24 | # 25 | # Important for running: 26 | # 27 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is 28 | # noncompliant, but you have some other compliant shell such as ksh or 29 | # bash, then to run this script, type that shell name before the whole 30 | # command line, like: 31 | # 32 | # ksh Gradle 33 | # 34 | # Busybox and similar reduced shells will NOT work, because this script 35 | # requires all of these POSIX shell features: 36 | # * functions; 37 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}», 38 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»; 39 | # * compound commands having a testable exit status, especially «case»; 40 | # * various built-in commands including «command», «set», and «ulimit». 41 | # 42 | # Important for patching: 43 | # 44 | # (2) This script targets any POSIX shell, so it avoids extensions provided 45 | # by Bash, Ksh, etc; in particular arrays are avoided. 46 | # 47 | # The "traditional" practice of packing multiple parameters into a 48 | # space-separated string is a well documented source of bugs and security 49 | # problems, so this is (mostly) avoided, by progressively accumulating 50 | # options in "$@", and eventually passing that to Java. 51 | # 52 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, 53 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; 54 | # see the in-line comments for details. 55 | # 56 | # There are tweaks for specific operating systems such as AIX, CygWin, 57 | # Darwin, MinGW, and NonStop. 58 | # 59 | # (3) This script is generated from the Groovy template 60 | # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt 61 | # within the Gradle project. 62 | # 63 | # You can find Gradle at https://github.com/gradle/gradle/. 64 | # 65 | ############################################################################## 66 | 67 | # Attempt to set APP_HOME 68 | 69 | # Resolve links: $0 may be a link 70 | app_path=$0 71 | 72 | # Need this for daisy-chained symlinks. 73 | while 74 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path 75 | [ -h "$app_path" ] 76 | do 77 | ls=$( ls -ld "$app_path" ) 78 | link=${ls#*' -> '} 79 | case $link in #( 80 | /*) app_path=$link ;; #( 81 | *) app_path=$APP_HOME$link ;; 82 | esac 83 | done 84 | 85 | # This is normally unused 86 | # shellcheck disable=SC2034 87 | APP_BASE_NAME=${0##*/} 88 | # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) 89 | APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s 90 | ' "$PWD" ) || exit 91 | 92 | # Use the maximum available, or set MAX_FD != -1 to use that value. 93 | MAX_FD=maximum 94 | 95 | warn () { 96 | echo "$*" 97 | } >&2 98 | 99 | die () { 100 | echo 101 | echo "$*" 102 | echo 103 | exit 1 104 | } >&2 105 | 106 | # OS specific support (must be 'true' or 'false'). 107 | cygwin=false 108 | msys=false 109 | darwin=false 110 | nonstop=false 111 | case "$( uname )" in #( 112 | CYGWIN* ) cygwin=true ;; #( 113 | Darwin* ) darwin=true ;; #( 114 | MSYS* | MINGW* ) msys=true ;; #( 115 | NONSTOP* ) nonstop=true ;; 116 | esac 117 | 118 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 119 | 120 | 121 | # Determine the Java command to use to start the JVM. 122 | if [ -n "$JAVA_HOME" ] ; then 123 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 124 | # IBM's JDK on AIX uses strange locations for the executables 125 | JAVACMD=$JAVA_HOME/jre/sh/java 126 | else 127 | JAVACMD=$JAVA_HOME/bin/java 128 | fi 129 | if [ ! -x "$JAVACMD" ] ; then 130 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 131 | 132 | Please set the JAVA_HOME variable in your environment to match the 133 | location of your Java installation." 134 | fi 135 | else 136 | JAVACMD=java 137 | if ! command -v java >/dev/null 2>&1 138 | then 139 | die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 140 | 141 | Please set the JAVA_HOME variable in your environment to match the 142 | location of your Java installation." 143 | fi 144 | fi 145 | 146 | # Increase the maximum file descriptors if we can. 147 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then 148 | case $MAX_FD in #( 149 | max*) 150 | # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. 151 | # shellcheck disable=SC2039,SC3045 152 | MAX_FD=$( ulimit -H -n ) || 153 | warn "Could not query maximum file descriptor limit" 154 | esac 155 | case $MAX_FD in #( 156 | '' | soft) :;; #( 157 | *) 158 | # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. 159 | # shellcheck disable=SC2039,SC3045 160 | ulimit -n "$MAX_FD" || 161 | warn "Could not set maximum file descriptor limit to $MAX_FD" 162 | esac 163 | fi 164 | 165 | # Collect all arguments for the java command, stacking in reverse order: 166 | # * args from the command line 167 | # * the main class name 168 | # * -classpath 169 | # * -D...appname settings 170 | # * --module-path (only if needed) 171 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. 172 | 173 | # For Cygwin or MSYS, switch paths to Windows format before running java 174 | if "$cygwin" || "$msys" ; then 175 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) 176 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) 177 | 178 | JAVACMD=$( cygpath --unix "$JAVACMD" ) 179 | 180 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 181 | for arg do 182 | if 183 | case $arg in #( 184 | -*) false ;; # don't mess with options #( 185 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath 186 | [ -e "$t" ] ;; #( 187 | *) false ;; 188 | esac 189 | then 190 | arg=$( cygpath --path --ignore --mixed "$arg" ) 191 | fi 192 | # Roll the args list around exactly as many times as the number of 193 | # args, so each arg winds up back in the position where it started, but 194 | # possibly modified. 195 | # 196 | # NB: a `for` loop captures its iteration list before it begins, so 197 | # changing the positional parameters here affects neither the number of 198 | # iterations, nor the values presented in `arg`. 199 | shift # remove old arg 200 | set -- "$@" "$arg" # push replacement arg 201 | done 202 | fi 203 | 204 | 205 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 206 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 207 | 208 | # Collect all arguments for the java command: 209 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, 210 | # and any embedded shellness will be escaped. 211 | # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be 212 | # treated as '${Hostname}' itself on the command line. 213 | 214 | set -- \ 215 | "-Dorg.gradle.appname=$APP_BASE_NAME" \ 216 | -classpath "$CLASSPATH" \ 217 | org.gradle.wrapper.GradleWrapperMain \ 218 | "$@" 219 | 220 | # Stop when "xargs" is not available. 221 | if ! command -v xargs >/dev/null 2>&1 222 | then 223 | die "xargs is not available" 224 | fi 225 | 226 | # Use "xargs" to parse quoted args. 227 | # 228 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed. 229 | # 230 | # In Bash we could simply go: 231 | # 232 | # readarray ARGS < <( xargs -n1 <<<"$var" ) && 233 | # set -- "${ARGS[@]}" "$@" 234 | # 235 | # but POSIX shell has neither arrays nor command substitution, so instead we 236 | # post-process each arg (as a line of input to sed) to backslash-escape any 237 | # character that might be a shell metacharacter, then use eval to reverse 238 | # that process (while maintaining the separation between arguments), and wrap 239 | # the whole thing up as a single "set" statement. 240 | # 241 | # This will of course break if any of these variables contains a newline or 242 | # an unmatched quote. 243 | # 244 | 245 | eval "set -- $( 246 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | 247 | xargs -n1 | 248 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | 249 | tr '\n' ' ' 250 | )" '"$@"' 251 | 252 | exec "$JAVACMD" "$@" 253 | -------------------------------------------------------------------------------- /example-project-remote/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | @rem SPDX-License-Identifier: Apache-2.0 17 | @rem 18 | 19 | @if "%DEBUG%"=="" @echo off 20 | @rem ########################################################################## 21 | @rem 22 | @rem Gradle startup script for Windows 23 | @rem 24 | @rem ########################################################################## 25 | 26 | @rem Set local scope for the variables with windows NT shell 27 | if "%OS%"=="Windows_NT" setlocal 28 | 29 | set DIRNAME=%~dp0 30 | if "%DIRNAME%"=="" set DIRNAME=. 31 | @rem This is normally unused 32 | set APP_BASE_NAME=%~n0 33 | set APP_HOME=%DIRNAME% 34 | 35 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 36 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 37 | 38 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 39 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 40 | 41 | @rem Find java.exe 42 | if defined JAVA_HOME goto findJavaFromJavaHome 43 | 44 | set JAVA_EXE=java.exe 45 | %JAVA_EXE% -version >NUL 2>&1 46 | if %ERRORLEVEL% equ 0 goto execute 47 | 48 | echo. 1>&2 49 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 50 | echo. 1>&2 51 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 52 | echo location of your Java installation. 1>&2 53 | 54 | goto fail 55 | 56 | :findJavaFromJavaHome 57 | set JAVA_HOME=%JAVA_HOME:"=% 58 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 59 | 60 | if exist "%JAVA_EXE%" goto execute 61 | 62 | echo. 1>&2 63 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 64 | echo. 1>&2 65 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 66 | echo location of your Java installation. 1>&2 67 | 68 | goto fail 69 | 70 | :execute 71 | @rem Setup the command line 72 | 73 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 74 | 75 | 76 | @rem Execute Gradle 77 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 78 | 79 | :end 80 | @rem End local scope for the variables with windows NT shell 81 | if %ERRORLEVEL% equ 0 goto mainEnd 82 | 83 | :fail 84 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 85 | rem the _cmd.exe /c_ return code! 86 | set EXIT_CODE=%ERRORLEVEL% 87 | if %EXIT_CODE% equ 0 set EXIT_CODE=1 88 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 89 | exit /b %EXIT_CODE% 90 | 91 | :mainEnd 92 | if "%OS%"=="Windows_NT" endlocal 93 | 94 | :omega 95 | -------------------------------------------------------------------------------- /example-project-remote/settings.gradle.kts: -------------------------------------------------------------------------------- 1 | // Use `latest` for the latest version, or any other tag, branch, or commit SHA on this project. 2 | val elidePluginVersion: String by settings 3 | apply(from = "https://gradle.elide.dev/$elidePluginVersion/elide.gradle.kts") 4 | 5 | -------------------------------------------------------------------------------- /example-project-remote/src/main/java/com/example/HelloWorld.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | public class HelloWorld { 4 | public static void main(String[] args) { 5 | System.out.println("Hello, World!"); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /example-project/.dev/elide.lock.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elide-dev/gradle/c1f5b71dce2d217eedec5a60a3d41941d207af5d/example-project/.dev/elide.lock.bin -------------------------------------------------------------------------------- /example-project/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | .gradle/ 3 | *.dev/dependencies/* 4 | -------------------------------------------------------------------------------- /example-project/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("dev.elide") 3 | java 4 | application 5 | } 6 | 7 | application { 8 | mainClass = "com.example.HelloWorld" 9 | } 10 | 11 | elide { 12 | // Use Elide instead of Gradle to resolve and download dependencies. Note that Elide uses Maven's resolver semantics 13 | // by default, so this may produce a different dependency graph than Gradle. 14 | enableInstall = true 15 | 16 | // Use Elide to compile the project instead of stock `javac`. 17 | enableJavaCompiler = true 18 | 19 | // Use the project's `elide.pkl` manifest to resolve dependencies and create tasks. 20 | manifest = layout.projectDirectory.file("elide.pkl") 21 | } 22 | 23 | dependencies { 24 | // Versions are mapped here so that Gradle becomes aware of the classpath needed to build and run the project. Elide 25 | // is used to resolve and download these dependencies, even though they are declared here. 26 | // 27 | // That's because `elide install` creates an `m2`-compatible root (a "local Maven repository") at 28 | // `.dev/dependencies/m2`. Gradle picks up the dependencies from there. 29 | implementation("com.google.guava:guava:33.4.8-jre") 30 | } 31 | -------------------------------------------------------------------------------- /example-project/elide.pkl: -------------------------------------------------------------------------------- 1 | amends "elide:project.pkl" 2 | 3 | name = "elide-gradle-example" 4 | description = "Example project using Elide Gradle" 5 | 6 | dependencies { 7 | maven { 8 | packages { 9 | // Guava 10 | "com.google.guava:guava:33.4.8-jre" 11 | } 12 | } 13 | } 14 | 15 | -------------------------------------------------------------------------------- /example-project/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.configuration-cache=false 2 | -------------------------------------------------------------------------------- /example-project/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elide-dev/gradle/c1f5b71dce2d217eedec5a60a3d41941d207af5d/example-project/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /example-project/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /example-project/gradlew: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Copyright © 2015-2021 the original authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | # SPDX-License-Identifier: Apache-2.0 19 | # 20 | 21 | ############################################################################## 22 | # 23 | # Gradle start up script for POSIX generated by Gradle. 24 | # 25 | # Important for running: 26 | # 27 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is 28 | # noncompliant, but you have some other compliant shell such as ksh or 29 | # bash, then to run this script, type that shell name before the whole 30 | # command line, like: 31 | # 32 | # ksh Gradle 33 | # 34 | # Busybox and similar reduced shells will NOT work, because this script 35 | # requires all of these POSIX shell features: 36 | # * functions; 37 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}», 38 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»; 39 | # * compound commands having a testable exit status, especially «case»; 40 | # * various built-in commands including «command», «set», and «ulimit». 41 | # 42 | # Important for patching: 43 | # 44 | # (2) This script targets any POSIX shell, so it avoids extensions provided 45 | # by Bash, Ksh, etc; in particular arrays are avoided. 46 | # 47 | # The "traditional" practice of packing multiple parameters into a 48 | # space-separated string is a well documented source of bugs and security 49 | # problems, so this is (mostly) avoided, by progressively accumulating 50 | # options in "$@", and eventually passing that to Java. 51 | # 52 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, 53 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; 54 | # see the in-line comments for details. 55 | # 56 | # There are tweaks for specific operating systems such as AIX, CygWin, 57 | # Darwin, MinGW, and NonStop. 58 | # 59 | # (3) This script is generated from the Groovy template 60 | # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt 61 | # within the Gradle project. 62 | # 63 | # You can find Gradle at https://github.com/gradle/gradle/. 64 | # 65 | ############################################################################## 66 | 67 | # Attempt to set APP_HOME 68 | 69 | # Resolve links: $0 may be a link 70 | app_path=$0 71 | 72 | # Need this for daisy-chained symlinks. 73 | while 74 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path 75 | [ -h "$app_path" ] 76 | do 77 | ls=$( ls -ld "$app_path" ) 78 | link=${ls#*' -> '} 79 | case $link in #( 80 | /*) app_path=$link ;; #( 81 | *) app_path=$APP_HOME$link ;; 82 | esac 83 | done 84 | 85 | # This is normally unused 86 | # shellcheck disable=SC2034 87 | APP_BASE_NAME=${0##*/} 88 | # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) 89 | APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s 90 | ' "$PWD" ) || exit 91 | 92 | # Use the maximum available, or set MAX_FD != -1 to use that value. 93 | MAX_FD=maximum 94 | 95 | warn () { 96 | echo "$*" 97 | } >&2 98 | 99 | die () { 100 | echo 101 | echo "$*" 102 | echo 103 | exit 1 104 | } >&2 105 | 106 | # OS specific support (must be 'true' or 'false'). 107 | cygwin=false 108 | msys=false 109 | darwin=false 110 | nonstop=false 111 | case "$( uname )" in #( 112 | CYGWIN* ) cygwin=true ;; #( 113 | Darwin* ) darwin=true ;; #( 114 | MSYS* | MINGW* ) msys=true ;; #( 115 | NONSTOP* ) nonstop=true ;; 116 | esac 117 | 118 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 119 | 120 | 121 | # Determine the Java command to use to start the JVM. 122 | if [ -n "$JAVA_HOME" ] ; then 123 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 124 | # IBM's JDK on AIX uses strange locations for the executables 125 | JAVACMD=$JAVA_HOME/jre/sh/java 126 | else 127 | JAVACMD=$JAVA_HOME/bin/java 128 | fi 129 | if [ ! -x "$JAVACMD" ] ; then 130 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 131 | 132 | Please set the JAVA_HOME variable in your environment to match the 133 | location of your Java installation." 134 | fi 135 | else 136 | JAVACMD=java 137 | if ! command -v java >/dev/null 2>&1 138 | then 139 | die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 140 | 141 | Please set the JAVA_HOME variable in your environment to match the 142 | location of your Java installation." 143 | fi 144 | fi 145 | 146 | # Increase the maximum file descriptors if we can. 147 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then 148 | case $MAX_FD in #( 149 | max*) 150 | # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. 151 | # shellcheck disable=SC2039,SC3045 152 | MAX_FD=$( ulimit -H -n ) || 153 | warn "Could not query maximum file descriptor limit" 154 | esac 155 | case $MAX_FD in #( 156 | '' | soft) :;; #( 157 | *) 158 | # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. 159 | # shellcheck disable=SC2039,SC3045 160 | ulimit -n "$MAX_FD" || 161 | warn "Could not set maximum file descriptor limit to $MAX_FD" 162 | esac 163 | fi 164 | 165 | # Collect all arguments for the java command, stacking in reverse order: 166 | # * args from the command line 167 | # * the main class name 168 | # * -classpath 169 | # * -D...appname settings 170 | # * --module-path (only if needed) 171 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. 172 | 173 | # For Cygwin or MSYS, switch paths to Windows format before running java 174 | if "$cygwin" || "$msys" ; then 175 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) 176 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) 177 | 178 | JAVACMD=$( cygpath --unix "$JAVACMD" ) 179 | 180 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 181 | for arg do 182 | if 183 | case $arg in #( 184 | -*) false ;; # don't mess with options #( 185 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath 186 | [ -e "$t" ] ;; #( 187 | *) false ;; 188 | esac 189 | then 190 | arg=$( cygpath --path --ignore --mixed "$arg" ) 191 | fi 192 | # Roll the args list around exactly as many times as the number of 193 | # args, so each arg winds up back in the position where it started, but 194 | # possibly modified. 195 | # 196 | # NB: a `for` loop captures its iteration list before it begins, so 197 | # changing the positional parameters here affects neither the number of 198 | # iterations, nor the values presented in `arg`. 199 | shift # remove old arg 200 | set -- "$@" "$arg" # push replacement arg 201 | done 202 | fi 203 | 204 | 205 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 206 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 207 | 208 | # Collect all arguments for the java command: 209 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, 210 | # and any embedded shellness will be escaped. 211 | # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be 212 | # treated as '${Hostname}' itself on the command line. 213 | 214 | set -- \ 215 | "-Dorg.gradle.appname=$APP_BASE_NAME" \ 216 | -classpath "$CLASSPATH" \ 217 | org.gradle.wrapper.GradleWrapperMain \ 218 | "$@" 219 | 220 | # Stop when "xargs" is not available. 221 | if ! command -v xargs >/dev/null 2>&1 222 | then 223 | die "xargs is not available" 224 | fi 225 | 226 | # Use "xargs" to parse quoted args. 227 | # 228 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed. 229 | # 230 | # In Bash we could simply go: 231 | # 232 | # readarray ARGS < <( xargs -n1 <<<"$var" ) && 233 | # set -- "${ARGS[@]}" "$@" 234 | # 235 | # but POSIX shell has neither arrays nor command substitution, so instead we 236 | # post-process each arg (as a line of input to sed) to backslash-escape any 237 | # character that might be a shell metacharacter, then use eval to reverse 238 | # that process (while maintaining the separation between arguments), and wrap 239 | # the whole thing up as a single "set" statement. 240 | # 241 | # This will of course break if any of these variables contains a newline or 242 | # an unmatched quote. 243 | # 244 | 245 | eval "set -- $( 246 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | 247 | xargs -n1 | 248 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | 249 | tr '\n' ' ' 250 | )" '"$@"' 251 | 252 | exec "$JAVACMD" "$@" 253 | -------------------------------------------------------------------------------- /example-project/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | @rem SPDX-License-Identifier: Apache-2.0 17 | @rem 18 | 19 | @if "%DEBUG%"=="" @echo off 20 | @rem ########################################################################## 21 | @rem 22 | @rem Gradle startup script for Windows 23 | @rem 24 | @rem ########################################################################## 25 | 26 | @rem Set local scope for the variables with windows NT shell 27 | if "%OS%"=="Windows_NT" setlocal 28 | 29 | set DIRNAME=%~dp0 30 | if "%DIRNAME%"=="" set DIRNAME=. 31 | @rem This is normally unused 32 | set APP_BASE_NAME=%~n0 33 | set APP_HOME=%DIRNAME% 34 | 35 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 36 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 37 | 38 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 39 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 40 | 41 | @rem Find java.exe 42 | if defined JAVA_HOME goto findJavaFromJavaHome 43 | 44 | set JAVA_EXE=java.exe 45 | %JAVA_EXE% -version >NUL 2>&1 46 | if %ERRORLEVEL% equ 0 goto execute 47 | 48 | echo. 1>&2 49 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 50 | echo. 1>&2 51 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 52 | echo location of your Java installation. 1>&2 53 | 54 | goto fail 55 | 56 | :findJavaFromJavaHome 57 | set JAVA_HOME=%JAVA_HOME:"=% 58 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 59 | 60 | if exist "%JAVA_EXE%" goto execute 61 | 62 | echo. 1>&2 63 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 64 | echo. 1>&2 65 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 66 | echo location of your Java installation. 1>&2 67 | 68 | goto fail 69 | 70 | :execute 71 | @rem Setup the command line 72 | 73 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 74 | 75 | 76 | @rem Execute Gradle 77 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 78 | 79 | :end 80 | @rem End local scope for the variables with windows NT shell 81 | if %ERRORLEVEL% equ 0 goto mainEnd 82 | 83 | :fail 84 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 85 | rem the _cmd.exe /c_ return code! 86 | set EXIT_CODE=%ERRORLEVEL% 87 | if %EXIT_CODE% equ 0 set EXIT_CODE=1 88 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 89 | exit /b %EXIT_CODE% 90 | 91 | :mainEnd 92 | if "%OS%"=="Windows_NT" endlocal 93 | 94 | :omega 95 | -------------------------------------------------------------------------------- /example-project/settings.gradle.kts: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | includeBuild("..") 3 | } 4 | -------------------------------------------------------------------------------- /example-project/src/main/java/com/example/HelloWorld.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | public class HelloWorld { 4 | public static void main(String[] args) { 5 | System.out.println("Hello, World!"); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | version=1.0.0 2 | elide.version=1.0.0-beta5 3 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elide-dev/gradle/c1f5b71dce2d217eedec5a60a3d41941d207af5d/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Copyright © 2015-2021 the original authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | # SPDX-License-Identifier: Apache-2.0 19 | # 20 | 21 | ############################################################################## 22 | # 23 | # Gradle start up script for POSIX generated by Gradle. 24 | # 25 | # Important for running: 26 | # 27 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is 28 | # noncompliant, but you have some other compliant shell such as ksh or 29 | # bash, then to run this script, type that shell name before the whole 30 | # command line, like: 31 | # 32 | # ksh Gradle 33 | # 34 | # Busybox and similar reduced shells will NOT work, because this script 35 | # requires all of these POSIX shell features: 36 | # * functions; 37 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}», 38 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»; 39 | # * compound commands having a testable exit status, especially «case»; 40 | # * various built-in commands including «command», «set», and «ulimit». 41 | # 42 | # Important for patching: 43 | # 44 | # (2) This script targets any POSIX shell, so it avoids extensions provided 45 | # by Bash, Ksh, etc; in particular arrays are avoided. 46 | # 47 | # The "traditional" practice of packing multiple parameters into a 48 | # space-separated string is a well documented source of bugs and security 49 | # problems, so this is (mostly) avoided, by progressively accumulating 50 | # options in "$@", and eventually passing that to Java. 51 | # 52 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, 53 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; 54 | # see the in-line comments for details. 55 | # 56 | # There are tweaks for specific operating systems such as AIX, CygWin, 57 | # Darwin, MinGW, and NonStop. 58 | # 59 | # (3) This script is generated from the Groovy template 60 | # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt 61 | # within the Gradle project. 62 | # 63 | # You can find Gradle at https://github.com/gradle/gradle/. 64 | # 65 | ############################################################################## 66 | 67 | # Attempt to set APP_HOME 68 | 69 | # Resolve links: $0 may be a link 70 | app_path=$0 71 | 72 | # Need this for daisy-chained symlinks. 73 | while 74 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path 75 | [ -h "$app_path" ] 76 | do 77 | ls=$( ls -ld "$app_path" ) 78 | link=${ls#*' -> '} 79 | case $link in #( 80 | /*) app_path=$link ;; #( 81 | *) app_path=$APP_HOME$link ;; 82 | esac 83 | done 84 | 85 | # This is normally unused 86 | # shellcheck disable=SC2034 87 | APP_BASE_NAME=${0##*/} 88 | # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) 89 | APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit 90 | 91 | # Use the maximum available, or set MAX_FD != -1 to use that value. 92 | MAX_FD=maximum 93 | 94 | warn () { 95 | echo "$*" 96 | } >&2 97 | 98 | die () { 99 | echo 100 | echo "$*" 101 | echo 102 | exit 1 103 | } >&2 104 | 105 | # OS specific support (must be 'true' or 'false'). 106 | cygwin=false 107 | msys=false 108 | darwin=false 109 | nonstop=false 110 | case "$( uname )" in #( 111 | CYGWIN* ) cygwin=true ;; #( 112 | Darwin* ) darwin=true ;; #( 113 | MSYS* | MINGW* ) msys=true ;; #( 114 | NONSTOP* ) nonstop=true ;; 115 | esac 116 | 117 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 118 | 119 | 120 | # Determine the Java command to use to start the JVM. 121 | if [ -n "$JAVA_HOME" ] ; then 122 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 123 | # IBM's JDK on AIX uses strange locations for the executables 124 | JAVACMD=$JAVA_HOME/jre/sh/java 125 | else 126 | JAVACMD=$JAVA_HOME/bin/java 127 | fi 128 | if [ ! -x "$JAVACMD" ] ; then 129 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 130 | 131 | Please set the JAVA_HOME variable in your environment to match the 132 | location of your Java installation." 133 | fi 134 | else 135 | JAVACMD=java 136 | if ! command -v java >/dev/null 2>&1 137 | then 138 | die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 139 | 140 | Please set the JAVA_HOME variable in your environment to match the 141 | location of your Java installation." 142 | fi 143 | fi 144 | 145 | # Increase the maximum file descriptors if we can. 146 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then 147 | case $MAX_FD in #( 148 | max*) 149 | # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. 150 | # shellcheck disable=SC2039,SC3045 151 | MAX_FD=$( ulimit -H -n ) || 152 | warn "Could not query maximum file descriptor limit" 153 | esac 154 | case $MAX_FD in #( 155 | '' | soft) :;; #( 156 | *) 157 | # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. 158 | # shellcheck disable=SC2039,SC3045 159 | ulimit -n "$MAX_FD" || 160 | warn "Could not set maximum file descriptor limit to $MAX_FD" 161 | esac 162 | fi 163 | 164 | # Collect all arguments for the java command, stacking in reverse order: 165 | # * args from the command line 166 | # * the main class name 167 | # * -classpath 168 | # * -D...appname settings 169 | # * --module-path (only if needed) 170 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. 171 | 172 | # For Cygwin or MSYS, switch paths to Windows format before running java 173 | if "$cygwin" || "$msys" ; then 174 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) 175 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) 176 | 177 | JAVACMD=$( cygpath --unix "$JAVACMD" ) 178 | 179 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 180 | for arg do 181 | if 182 | case $arg in #( 183 | -*) false ;; # don't mess with options #( 184 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath 185 | [ -e "$t" ] ;; #( 186 | *) false ;; 187 | esac 188 | then 189 | arg=$( cygpath --path --ignore --mixed "$arg" ) 190 | fi 191 | # Roll the args list around exactly as many times as the number of 192 | # args, so each arg winds up back in the position where it started, but 193 | # possibly modified. 194 | # 195 | # NB: a `for` loop captures its iteration list before it begins, so 196 | # changing the positional parameters here affects neither the number of 197 | # iterations, nor the values presented in `arg`. 198 | shift # remove old arg 199 | set -- "$@" "$arg" # push replacement arg 200 | done 201 | fi 202 | 203 | 204 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 205 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 206 | 207 | # Collect all arguments for the java command: 208 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, 209 | # and any embedded shellness will be escaped. 210 | # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be 211 | # treated as '${Hostname}' itself on the command line. 212 | 213 | set -- \ 214 | "-Dorg.gradle.appname=$APP_BASE_NAME" \ 215 | -classpath "$CLASSPATH" \ 216 | org.gradle.wrapper.GradleWrapperMain \ 217 | "$@" 218 | 219 | # Stop when "xargs" is not available. 220 | if ! command -v xargs >/dev/null 2>&1 221 | then 222 | die "xargs is not available" 223 | fi 224 | 225 | # Use "xargs" to parse quoted args. 226 | # 227 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed. 228 | # 229 | # In Bash we could simply go: 230 | # 231 | # readarray ARGS < <( xargs -n1 <<<"$var" ) && 232 | # set -- "${ARGS[@]}" "$@" 233 | # 234 | # but POSIX shell has neither arrays nor command substitution, so instead we 235 | # post-process each arg (as a line of input to sed) to backslash-escape any 236 | # character that might be a shell metacharacter, then use eval to reverse 237 | # that process (while maintaining the separation between arguments), and wrap 238 | # the whole thing up as a single "set" statement. 239 | # 240 | # This will of course break if any of these variables contains a newline or 241 | # an unmatched quote. 242 | # 243 | 244 | eval "set -- $( 245 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | 246 | xargs -n1 | 247 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | 248 | tr '\n' ' ' 249 | )" '"$@"' 250 | 251 | exec "$JAVACMD" "$@" 252 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | @rem SPDX-License-Identifier: Apache-2.0 17 | @rem 18 | 19 | @if "%DEBUG%"=="" @echo off 20 | @rem ########################################################################## 21 | @rem 22 | @rem Gradle startup script for Windows 23 | @rem 24 | @rem ########################################################################## 25 | 26 | @rem Set local scope for the variables with windows NT shell 27 | if "%OS%"=="Windows_NT" setlocal 28 | 29 | set DIRNAME=%~dp0 30 | if "%DIRNAME%"=="" set DIRNAME=. 31 | @rem This is normally unused 32 | set APP_BASE_NAME=%~n0 33 | set APP_HOME=%DIRNAME% 34 | 35 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 36 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 37 | 38 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 39 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 40 | 41 | @rem Find java.exe 42 | if defined JAVA_HOME goto findJavaFromJavaHome 43 | 44 | set JAVA_EXE=java.exe 45 | %JAVA_EXE% -version >NUL 2>&1 46 | if %ERRORLEVEL% equ 0 goto execute 47 | 48 | echo. 1>&2 49 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 50 | echo. 1>&2 51 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 52 | echo location of your Java installation. 1>&2 53 | 54 | goto fail 55 | 56 | :findJavaFromJavaHome 57 | set JAVA_HOME=%JAVA_HOME:"=% 58 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 59 | 60 | if exist "%JAVA_EXE%" goto execute 61 | 62 | echo. 1>&2 63 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 64 | echo. 1>&2 65 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 66 | echo location of your Java installation. 1>&2 67 | 68 | goto fail 69 | 70 | :execute 71 | @rem Setup the command line 72 | 73 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 74 | 75 | 76 | @rem Execute Gradle 77 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 78 | 79 | :end 80 | @rem End local scope for the variables with windows NT shell 81 | if %ERRORLEVEL% equ 0 goto mainEnd 82 | 83 | :fail 84 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 85 | rem the _cmd.exe /c_ return code! 86 | set EXIT_CODE=%ERRORLEVEL% 87 | if %EXIT_CODE% equ 0 set EXIT_CODE=1 88 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 89 | exit /b %EXIT_CODE% 90 | 91 | :mainEnd 92 | if "%OS%"=="Windows_NT" endlocal 93 | 94 | :omega 95 | -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- 1 | rootProject.name = "elide-gradle" 2 | 3 | include("elide-gradle-plugin") 4 | include("elide-gradle-catalog") 5 | 6 | includeBuild("example-project") 7 | --------------------------------------------------------------------------------