5

I am trying to use the immutables library with vscode (and Gradle).

Steps I've taken:

  1. Confirmed that the jar exists
  2. Ensured that the GRADLE_USER_HOME variable exists (it didn't initially)
  3. Set the "java.import.gradle.home" vscode setting (GRADLE_HOME)
  4. Ensured project builds using gradle build

I keep getting hung up on the environment variable. GRADLE_USER_HOME vs GRADLE_HOME.

I'm on MacOS and I did not install vscode using brew, but actually downloaded the app from the vscode website.

Unable to load annotation processor factory 'GRADLE_USER_HOME/caches/modules-2/files-2.1/org.immutables/value/2.7.3/91d271437be1e14438a2da6c5c3e9f8db061a7b9/value-2.7.3.jar' for project

Chris
  • 1,206
  • 2
  • 15
  • 35
William
  • 166
  • 4
  • 15

1 Answers1

0

GRADLE_USER_HOME doesn't point to an $Environment variable that can be evaluated -- it looks like you have an issue in how you are retrieving and hydrating the value that GRADLE_USER_HOME points to --

You said that you "Set the "java.import.gradle.home" vscode setting (GRADLE_HOME)"

Your error message reads:

Unable to load annotation processor factory 'GRADLE_USER_HOME/caches/modules-2/files-2.1/org.immutables/value/2.7.3/91d271437be1e14438a2da6c5c3e9f8db061a7b9/value-2.7.3.jar' for project

Looking at your error string: -- it seems that you probably did this:

java.import.gradle.home: GRADLE_USER_HOME

In order to collect an $Environment variable into your Java code, the setting in your properties file (or Yaml) should look like this:

java.import.gradle.home: ${{GRADLE_USER_HOME}}
  • This was a good guess, but no. I set it as such: "java.import.gradle.home": "/Users/william/.gradle", I appreciate your help! – William Nov 13 '19 at 20:28