- Create an empty project on git
- clone the project to local
git clone projecturl
- Set the git username and email address on the command line
git config user.name "yourusername"
git config user.email "youremail"
- Initialize the gradle project
gradle init
- Create a Java folder
a. Add the following configuration in build.gradle
apply plugin: 'java'
apply plugin: 'eclipse'
task initFolder << {
sourceSets*.java.srcDirs*.each { it.mkdirs() }
sourceSets*.resources.srcDirs*.each { it.mkdirs()}
}
b. Then execute the gradle task
gradle initFolder
- Convert to eclipse project with gradle task
gradle eclipse
- set gitignore
/bin/
/build/
/.*
!.gitignore
- Set as gradle project in eclipse