The general process of setting up and using a development machine is described in Set Up a Development Machine. This topic provides additional guidance to use when setting up an OSX machine for LabKey development.

Software Installation

1. Install the Apple command line developer tools, which include git:

xcode-select --install

2. GitHub for OSX

You can use GitHub Desktop or another Git client.

Install GitHub Desktop: Install a command-line git option for your platform:

3. Java for OSX

Download the appropriate version and variant (x64 or aarch64 depending on your CPU type) of the recommended version of Java:

4. PostgreSQL Database 5. Set up environment variables: We use <LK_ENLISTMENT> to refer to the location where you placed your enlistment. Substitute it where shown.
  • Add this location to your PATH: <LK_ENLISTMENT>/build/deploy/bin
    • This directory won't exist yet, but add it to the PATH anyway. The Gradle build downloads binaries used by the server, such as graphvis, dot, and proteomics tools, to this directory.
To add the environment variables using ~/.zshrc or ~/.bash_profile (depending on your default shell), edit the file and add the lines, customizing for your own local paths to your enlistment and java. Replace ## with the version number of the JDK you installed:

export JAVA_HOME=`/usr/libexec/java_home -v ##`
export LK_ENLISTMENT=/labkeydev/labkeyEnlistment
export PATH=$LK_ENLISTMENT/build/deploy/bin:$PATH

You may also want to set the variable GIT_ACCESS_TOKEN in order to be able to use commands like "./gradlew gitCheckout".

Gradle

mkdir -p ~/.gradle
cp <LK_ENLISTMENT>/gradle/global_gradle.properties_template ~/.gradle/gradle.properties
    • Note that Folders beginning with a period are hidden in Finder. To show them, press Command+Shift+Period (.).

IntelliJ IDEA

The setup for IntelliJ is described in the common documentation. There may be differences for OSX, and version differences, including but not limited to:

  • The menu path for setting path variables is IntelliJ IDEA > Settings > Appearance & Behavior > Path Variables.
  • For the NODE_PATH path variable, use forward slashes, for example, <LK_ENLISTMENT>/build/.node/node-v#.#.##/bin/node
  • When you configure the target JDK, browse to the JDK's home directory, for example, /Library/Java/JavaVirtualMachines/jdk-##/Contents/Home
  • The shortcut for "Update Project" is Command+T.

Related Topics

Was this content helpful?

Log in or register an account to provide feedback


previousnext
 
expand allcollapse all