Skip to content

Instantly share code, notes, and snippets.

@bolerap
Last active January 7, 2020 04:53
Show Gist options
  • Save bolerap/e3eb369db7892836814751656915f138 to your computer and use it in GitHub Desktop.
Save bolerap/e3eb369db7892836814751656915f138 to your computer and use it in GitHub Desktop.

A. JDK

  1. install jenv by brew install jenv, install gradle by brew install gradle
  2. list installed java jenv versions
  3. install jdk by brew cask install java
  4. list all installed jdk /usr/libexec/java_home -V
  5. add JDK to jenv by jenv add <path> (paths get from step 4). eg jenv add /Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home
  6. set JDK used by jenv global <name> (name get from step 2)

B. GRADLE

  1. specify build errors by ./gradlew --scan. At this step we can know what errors occurred (usually is mismatch versions of lib or JDK)
  2. Modify gradle versions in distributionUrl in file gradle/gradle-wrapper.properties
  3. remove task wrapper(type: Wrapper) { gradleVersion = '3.3' } if gradle version > 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment