Introducing a game-changer for Gradle users and plugin authors! The Nokee team is maintaining this project that redistributes Gradle API and TestKit JARs to Maven Central, making them more accessible and enjoyable than ever before! Experience the amazing benefits:
-
🌈 Browse Gradle API and TestKit sources directly in your IDE, just like any other dependencies!
-
🚀 No more need for the heavy "all" Gradle distribution!
-
📈 Supports JARs for Gradle versions 2.14 and up, offering extensive compatibility!
-
🎯 Gradle plugin authors can target specific Gradle API versions while building their plugin with any Gradle version, providing unmatched flexibility!
-
🎩 Detach your product from the build system! Maven build can use these JARs as well!
To integrate the dependencies in your Gradle or Maven build, follow the super easy instructions below.
Add the following dependency to your build.gradle file:
dependencies {
compileOnly "dev.gradleplugins:gradle-api:<version>"
testImplementation "dev.gradleplugins:gradle-test-kit:<version>"
}
Replace <version>
with the desired Gradle version.
Remember, always use compileOnly
for the Gradle API dependency, as the Gradle build tool already provides the Gradle API as part of its execution.
Using the Toolbox plugin is preferred, as it abstracts away the artifact coordinates, which may change in the future if we need to patch them.
Apply the plugin in your settings.gradle[.kts]
:
plugins {
id("dev.gradleplugins.gradle-plugin-development") version("<toolbox-plugin-version>")
}
Use the convenient APIs in any of your build.gradle[.kts]
:
dependencies {
compileOnly(gradleApi("<version>"))
testImplementation(gradleTestKit("<version>"))
}
Replace <version>
with the desired Gradle version.
The compileOnly
configuration is used for the Gradle API dependency because the Gradle build tool already provides the Gradle API as part of its execution. Therefore, the final artifact should not include it.
Add the following dependency to your pom.xml
file:
<dependencies>
<dependency>
<groupId>dev.gradleplugins</groupId>
<artifactId>gradle-api</artifactId>
<version>${gradle.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>dev.gradleplugins</groupId>
<artifactId>gradle-test-kit</artifactId>
<version>${gradle.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
Replace ${gradle.version}
with the desired Gradle version.
The scope for Gradle API is provided
because the Gradle build tool already provides the Gradle API as part of its execution. Therefore, the final artifact should not include it.
-
Gradle API - The treasure you seek 🏆
-
Gradle TestKit - Another gem for your collection 💎
Worry not; the redistributed API JARs share the same license as Gradle itself, which means Apache License 2.0 has got you covered! ✅