Skip to content

Instantly share code, notes, and snippets.

@chen206
Last active July 4, 2018 03:14
Show Gist options
  • Save chen206/d7a4243f6ff4f7b906d4 to your computer and use it in GitHub Desktop.
Save chen206/d7a4243f6ff4f7b906d4 to your computer and use it in GitHub Desktop.
gradle project
brew install gradle

echo 'export JAVA_HOME=$(/usr/libexec/java_home)' >> ~/.bash_profile

echo 'export GRADLE_HOME=/usr/local/opt/gradle/libexec' >> ~/.bash_profile

echo 'export PATH=$PATH:$JAVA_HOME/bin' >> ~/.bash_profile

source ~/.bash_profile

gradle init --type java-library

gradle build
gradle test
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'application'

mainClassName = "com.lbadvisor.interview.javaje.App"

repositories {
    jcenter()
}

dependencies {
    compile 'org.slf4j:slf4j-api:1.7.25'
    testCompile 'junit:junit:4.12'
}
View | Tool Windows | Gradle

refresh

Click this button to refresh all registered Gradle projects after changes have been made to a Gradle script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment