Note: as of 06/20 the bazel intellij plugin doesn't work for Windows and does not work on 2020 versions of IntelliJ. Please view the plugin's page for most recent releases and the supported IntelliJ versions.
- Download bazel intellij plugin (build plugin for intellij)
Note:
- the plugin can be installed via IntelliJ instead of downloading the jar at the link
- as of 6/20, the plugin does not support Windows per this page
- Make sure your JAVA version in your computer is 11 or higher. You can know by doing
java --version
in the terminal - Make sure you set your Kotlin JVM to 11 in IntelliJ and Kotlin version to Stable
- Import your project as a Bazel project and use Bazel Sync get imports working
Prereqs: Installation step above
-
Import Bazel Project
-
Select root API folder
-
On Select project view (.bazelproject) page, select 'create from scratch'
-
Under
Project View
->Additional Languages
, uncommentkotlin
, and finish -
Once the IDE gets setup you should be able to see a green bazel heart icon in the top right, hit that and the project should start syncing.
! If Bazel does not sync, you can copy the path from executing which bazel
in the terminal in IntelliJ or on your machines terminal, then go to Preferences/Settings -> Bazel Settings -> and paste the returned path from which bazel
into the Bazel binary location and save
To locally run a service by starting its API server
bazel run //service/app/public/api:app-api-deployable
To simply build the service
bazel build //service/app/public/api:app-api
If you have any issues, feel free to contact me andrewaquino118@gmail.com
.