Last active
December 7, 2016 18:24
-
-
Save shrikant0013/c843664915096c0033ea217c961ad756 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to setup java gradle project | |
-- With idea | |
-- Groovy | |
-- Spock testing framework | |
Prereqs: | |
gradle | |
Use sdkman to get gradle | |
http://sdkman.io/index.html | |
-- curl -s "https://get.sdkman.io" | bash | |
sdk install gradle | |
java | |
- To install java on macOS download dmg from here and install | |
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html | |
Steps: | |
1) In idea select 'empty project' | |
2) Select project sdk '1.8' | |
In intellij go to File -> Project Structure -> Project Settings -> Project -> Project SDK -> 1.8 | |
3) Close | |
4) from terminal run: | |
gradle init --type java-library --test-framework spock | |
5) Edit build.gradle file and add -> apply plugin: 'idea' | |
6) from terminal run: | |
./gradlew idea | |
7) git add . ; | |
8) git add --force gradle/wrapper/gradle-wrapper.jar | |
git commit -m "initial commit" ; | |
Note-- | |
To include groovy/spoc in existing project | |
-- in build.gradle -> apply plugin 'groovy' (** Note single quotes) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment