Custom Gradle distribution for warlordofmars projects to apply some sane defaults in order to avoid duplication.
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'
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/"
}
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
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
- John Carter - warlordofmars
This project is licensed under the MIT License - see the LICENSE.md file for details
- Based off of gradle-custom-distribution from bmuschko
- Using the warlordofmars gradle plugin, gradle-release-helper, for automatic versioning, git tagging, and publishing of releases to GitHub