A plugin for Gradle that adds tasks to download, extract and interact with GraalVM tooling.
Find a file
Excavator Bot a34825fc24 Excavator: Upgrades gradle wrapper to the latest version (#80)
###### _excavator_ is a bot for automating changes across repositories.

Changes produced by the roomba/latest-gradle-wrapper-oss check.

{runtimeCheckDesc}
To enable or disable this check, please contact the maintainers of Excavator.
2019-03-28 10:11:06 +00:00
.baseline Excavator: Upgrades Baseline to the latest version (#59) 2019-02-28 18:56:44 +00:00
.circleci Configure CircleCI to cache downloads for check task (#10) 2018-09-06 14:26:31 -07:00
gradle Excavator: Upgrades gradle wrapper to the latest version (#80) 2019-03-28 10:11:06 +00:00
src Always set output name parameter last (#65) 2019-03-04 16:16:17 +00:00
.bulldozer.yml Enable bulldozer (#46) 2019-01-11 15:51:33 -05:00
.excavator.yml Enable bulldozer (#46) 2019-01-11 15:51:33 -05:00
.gitignore Create a basic wrapper around Graal and support the native-image task 2018-08-29 18:12:56 -07:00
.policy.yml Add policy yml (#58) 2019-02-26 22:27:23 +00:00
build.gradle Excavator: Upgrade buildscript dependencies (#77) 2019-03-27 23:50:48 +00:00
gradle.properties Excavator: Enable org.gradle.parallel by default (#14) 2018-09-21 09:19:51 -04:00
gradlew Excavator: Upgrades gradle wrapper to the latest version (#76) 2019-03-20 13:03:21 +00:00
gradlew.bat Excavator: Upgrades gradle wrapper to the latest version (#76) 2019-03-20 13:03:21 +00:00
LICENSE Create a basic wrapper around Graal and support the native-image task 2018-08-29 18:12:56 -07:00
README.md Fixes #30. Add support for shared library (#60) 2019-03-02 09:47:27 +01:00
settings.gradle Create a basic wrapper around Graal and support the native-image task 2018-08-29 18:12:56 -07:00
versions.props Excavator: Upgrade dependencies (#79) 2019-03-28 02:31:48 +00:00

gradle-graal

A simple wrapper around GraalVM tooling that will download and locally cache a GraalVM installation and make available select parts of the GraalVM compiler for use in Gradle builds.

To use this plugin, apply com.palantir.graal. See a full example in the ETE tests.

Gradle Tasks

./gradlew nativeImage: create a native image using GraalVM's native-image tool with the configuration as specified by the graal Gradle extension. Outputs are produced to ${projectDir}/build/graal/.

./gradlew sharedLibary: create a shared library using GraalVM's native-image tool with the configuration as specified by the graal Gradle extension. Outputs are produced to ${projectDir}/build/graal/.

Configuration

Configure this plugin and its wrappers around GraalVM tools through the graal extension with the following options:

General GraalVM controls

  • graalVersion: the version string to use when downloading GraalVM (defaults to 1.0.0-rc12)
  • downloadBaseUrl: the base download URL to use (defaults to https://github.com/oracle/graal/releases/download/)

native-image controls

  • outputName: the name to use for the image output
  • mainClass: the main class entry-point for the image to run
  • option: additional native-image options https://github.com/oracle/graal/blob/master/substratevm/OPTIONS.md

Local GraalVM Tooling Cache

We maintain a number of different repositories, and rather than re-download tooling and cache it per repository, this plugin maintains a central cache in the user's home directory (~/.gradle/caches/com.palantir.graal). Tooling artifacts are cached by version, so multiple projects referring to different GraalVM versions will not corrupt the cache.

No locking is performed to check the atomicity of changes to the cache, so users should not expect this plugin to be well behaved when populating the cache from parallel processes.

Contributions

Contributions are welcome. For larger feature requests or contributions, we prefer discussing the proposed change on a GitHub issue prior to a PR.

License

This plugin is made available under the Apache 2.0 License.