/warlordofmars-gradle

Custom Gradle distribution for warlordofmars projects to apply some sane defaults in order to avoid duplication.

Primary LanguageGroovyMIT LicenseMIT

warlordofmars-gradle

current release

Overview

Custom Gradle distribution for warlordofmars projects to apply some sane defaults in order to avoid duplication.

Features

Default Group

This gradle distribution will set the default group for all projects that use it. This is so that the group does not have to always be defined in every project's build.gradle:

group = 'com.github.warlordofmars'

Default Repositories

Similiarly, to keep from having to define multiple maven repositories in each project, a number of default repositories (as well as buildscript repositories):

buildscript {
    repositories {
        mavenLocal()
        mavenCentral()
        jcenter()
        maven {
            url "https://jitpack.io"
        }
        maven {
            url "https://plugins.gradle.org/m2/"
        }
    }
}

repositories {
    mavenLocal()
    mavenCentral()
    jcenter()
    maven {
        url "https://jitpack.io"
    }
    maven {
        url "https://plugins.gradle.org/m2/"
}

How to Use

Existing Gradle Project

In order to update an existing project to use this custom gradle distribution, run the following command from within the project directory:

./gradlew wrapper --gradle-distribution-url=https://github.com/warlordofmars/warlordofmars-gradle/releases/download/release-0.1.1/warlordofmars-gradle-5.2.1-0.1.1-bin.zip

New Gradle Project

For a new Gradle project, first init the project:

gradle init

Then update the wrapper in the same way as described above:

./gradlew wrapper --gradle-distribution-url=https://github.com/warlordofmars/warlordofmars-gradle/releases/download/release-0.1.1/warlordofmars-gradle-5.2.1-0.1.1-bin.zip

Author

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowlegements