Skip to content

Build tool integration

Use Elide's javac, kotlinc, dependency resolver and JDK from inside an existing Maven, Gradle or Bazel build, without migrating to elide.pkl.

Read offlineelide help build-tools

On this page

Keep your build tool and use Elide inside it as the Java and Kotlin compiler, the dependency resolver, or the JDK.

Build tool Integration Elide compiles Page
Maven dev.elide:elide-maven-plugin Java, Kotlin Maven plugin
Gradle dev.elide.settings + dev.elide plugins Java Gradle plugin
Bazel rules_elide module, persistent workers Java, Kotlin Bazel
Any elide project export --format=pom Java, Kotlin POM export
Any JAVA_HOME set to the Elide distribution Java Build the POM

Integrate or migrate

Integrate (this section) Migrate (elide adopt)
Build definition Stays pom.xml, build.gradle.kts or BUILD.bazel Becomes elide.pkl
Build commands mvn, ./gradlew, bazel elide build, elide test
What Elide replaces The compiler, resolver or JDK The whole build
Undo Remove the plugin or rule Keep the old build until the new one passes

Call the tools directly

Every Elide tool takes the wrapped tool’s arguments after --, so any build that can run a command can use it:

Terminal
bash
elide javac -- -d out -cp lib/guava.jar src/Hello.java
elide kotlinc -- -d out src/Greeter.kt
elide jar -- --create --file app.jar -C out .

Per-tool options: Java compiler, Kotlin compiler, JAR assembly.

OpenRewrite and dependency queries

Elide also provides experimental OpenRewrite and dependency code index commands. They read an elide.pkl project definition, including its source sets and Maven dependencies. Compiler integration alone does not connect a Maven, Gradle, or Bazel dependency graph to those commands.

To use them alongside an existing build, define matching sources, target version, repositories, and dependencies in elide.pkl, or adopt the project. Run recipe previews with elide rewrite ... --dry-run, then validate any applied changes with the build’s usual tests.

Publish for Maven and Gradle consumers

A library built with Elide publishes to the local Maven repository, a team repository or Maven Central with elide publish, so Maven and Gradle builds depend on it like any other artifact. See Maven publishing.

Was this page helpful?