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.

On this page

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

Build toolIntegrationElide compilesPage
Mavendev.elide:elide-maven-pluginJava, KotlinMaven plugin
Gradledev.elide.settings + dev.elide pluginsJavaGradle plugin
Bazelrules_elide module, persistent workersJava, KotlinBazel
Anyelide project export --format=pom, elide mvnJava, KotlinPOM export and native Maven
AnyJAVA_HOME set to the Elide distributionJavaBuild the POM

Integrate or migrate

Integrate (this section)Migrate (elide adopt)
Build definitionStays pom.xml, build.gradle.kts or BUILD.bazelBecomes elide.pkl
Build commandsmvn, ./gradlew, bazelelide build, elide test
What Elide replacesThe compiler, resolver or JDKThe whole build
UndoRemove the plugin or ruleKeep 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:

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?