rogersei / gradle-scripts

Kotlin/Gradle build scripts as re-usable plugins

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gradle-scripts

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.

‼️ There is ZERO guarantee on anything here! Caveat emptor.

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.

Just Build

Usage

THIS was the hard part that's not covered much of anywhere.

settings.gradle.kts

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
    }
}

build.gradle.kts

A "non-buildSrc" project will need to explicitly enable it in scripts:

buildscript {
    dependencies {
        classpath("crackers.buildstuff:crackers-gradle-plugins:1.0.0")
    }
}

Building

Only requires a Java 8 JDK, since Gradle is "self-booting".

Local Artifactory

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.

About

Kotlin/Gradle build scripts as re-usable plugins

License:MIT License


Languages

Language:Kotlin 90.7%Language:Shell 9.3%