To get started:
-
Install JDK 8. (Newer versions will not work.)
On OS X with Homebrew, run these commands:
$ brew tap AdoptOpenJDK/openjdk $ brew cask install adoptopenjdk8
-
Create .envrc as follows:
export ONEBUSAWAY_ENDPOINT=http://api.pugetsound.onebusaway.org export ONEBUSAWAY_KEY=your_OBA_key # Can use "test" for testing purposes export JAVA_HOME=<path to JDK 8, possibly /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home> export PATH=$JAVA_HOME/bin:$PATH
-
Try to build and run
$ ./gradlew assemble
java -jar build/libs/weatherbus-bus-0.0.1-SNAPSHOT.jar
IntelliJ setup:
(Note: this does not currently work unless you're running IntelliJ itself on an old version of Java. Gradle needs to be upgraded before newer versions will work.)
- Launch IntelliJ from within the repo root:
idea .
- Import the gradle file:
- Import Project from the intellij splash screen
- Select build.gradle from the repo root
- Accept the defaults
- Set the project SDK:
- Select File -> Project Structure
- Select Project Settings/Project
- Set Project SDK to JDK 8 (probably in /Library/Java/JavaVirtualMachines).
- Tell compiler that lombok is a thing
- Preferences -> Plugins -> Install
- Install lombok plugin
- Enable annotation processing
- IntelliJ Idea -> Preferences
- Build, Execution, Deployment -> Compiler -> Annotation Processors
- Check "Enable annotation processing"