This project contains my "personal" Kotlin/Gradle build scripts, built as re-usable plugins. Since it took me a bit of dorking to figure out how to use them properly, keeping notes seems a good option.
If there's a problem and you feel like contributing, please file an issue or fix it and submit a PR.
See the list of plugins currently available.
NOTE Artifacts are currently not published (on my "todo" list): to use these, this project must be downloaded and built locally.
THIS was the hard part that's not covered much of anywhere.
The location for custom plugins must be specified for the project via pluginManagement
:
pluginManagement {
repositories {
// if you want ANYTHING to work
gradlePluginPortal()
// don't know if this is necessary, but probably doesn't hurt
mavenCentral()
// especially when building this project locally
mavenLocal()
// add custom repos here
}
}
These examples are given for Kotlin scripts: they should work (modified) for Groovy-based scripts as well. The project will need to explicitly include the dependency and the plugin:
buildscript {
dependencies {
classpath("crackers.buildstuff:crackers-gradle-plugins:1.0.1")
}
}
plugins {
id("library-publish") version "1.0.1"
}
In the main build.gradle.kts
script, add this dependency:
dependencies {
implementation("crackers.buildstuff:crackers-gradle-plugins:1.0.1")
}
and declare the plugin as needed:
plugins {
id("library-publish")
}
Only requires a Java 8 JDK, since Gradle is "self-booting".
Thanks to JFrog, it's easy to setup a local repository (excluded from Git).
The jfrog-test
script will start (kind of setup) the Docker image locally, with a lame attempt to
properly configure the server for remote access.