This project simplifies the set up of Java projects built with Gradle in IntelliJ IDEA.
Clone the project
Rename the local project directory
Change the rootProject.name
property in settings.gradle
to match the new directory naming
For users that only have access to a local repository i.e. no external internet connection:
Create file ~/.gradle/init.gradle
:
def initGradlePath = buildscript.sourceFile.getParent() allprojects {
apply from: "${initGradlePath}/repos.gradle", to: buildscript
apply from: "${initGradlePath}/repos.gradle"
}
Create file ~/.gradle/repos.gradle
:
repositories {
mavenLocal()
mavenCentral()
// other repositories e.g. internal company repos
}
Comment out the following in the build.gradle
file
repositories {
mavenCentral()
}
This allows you to seperate what the project dependencies are from where the dependencies are found.
Filters out the files / directories contained in the local project that should not be stored in GitHub.
Gradle executable allowing users to build the project without a local installation of Gradle. Uses the settings.gradle
file for configuration parameters.
To execute:
./gradlew <command>
Same as gradlew for Windows users.
Sets global properties for dependencies in the root build.gradle
file and any sub-module build.gradle
files.
Avoids having to edit dependencies and versions in multiple files.