Skip to content

Commit

Permalink
Configure JDK for use with gradle
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Manuel Leflet Estrada <[email protected]>
  • Loading branch information
jmle committed Apr 12, 2024
1 parent ef5b9ec commit 5b8182d
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ func (p *javaServiceClient) initialization(ctx context.Context) {
params.ExtendedClientCapilities = map[string]interface{}{
"classFileContentsSupport": true,
}
// See https://github.com/eclipse-jdtls/eclipse.jdt.ls/blob/1a3dd9323756113bf39cfab82746d57a2fd19474/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/preferences/Preferences.java
// TODO: what if no wrapper?
params.InitializationOptions = map[string]interface{}{
"bundles": absBundles,
"workspaceFolders": []string{fmt.Sprintf("file://%v", absLocation)},
Expand All @@ -215,6 +217,13 @@ func (p *javaServiceClient) initialization(ctx context.Context) {
"maven": map[string]interface{}{
"downloadSources": downloadSources,
},
"import": map[string]interface{}{
"gradle": map[string]interface{}{
"java": map[string]interface{}{
"home": "/usr/lib/jvm/java-1.8.0-openjdk",
},
},
},
},
},
}
Expand Down

0 comments on commit 5b8182d

Please sign in to comment.