tools/convert/maven ↔ gradle
// convertnew

maven ↔ gradle

convert dependencies between maven and gradle dsl

— paste dependencies to start // client-only
// result appears here

// about this tool

Maven and Gradle are the two dominant build tools in the Java ecosystem. Maven uses XML pom.xml files; Gradle uses a Kotlin or Groovy DSL. This tool converts dependency declarations between the two formats, mapping Maven scopes (compile, test, provided, runtime) to their Gradle counterparts (implementation, testImplementation, compileOnly, runtimeOnly).

// when to use

  • Migrate a Maven project to Gradle without manually rewriting dependencies
  • Copy a dependency from Maven Central docs and convert it for Gradle
  • Understand which Gradle configuration matches a Maven scope
  • Convert a Gradle build back to Maven for a legacy project

// faq

What is the difference between implementation and api in Gradle?
implementation hides the dependency from consumers of your library (compile classpath only). api exposes it (like Maven compile scope). Use implementation by default — it produces faster builds with better dependency isolation.
What happens to Maven <exclusions>?
Exclusions are not converted — they require manual handling. In Gradle, use exclude within the dependency block: implementation("group:artifact") { exclude group: "unwanted", module: "dep" }.
// history
Pro Cloud Sync — upgrade
no operations yet