Skip to content

Commit

Permalink
Import ImmutableMap from Guava rather than internal gradle-api
Browse files Browse the repository at this point in the history
  • Loading branch information
gluxon committed Jan 24, 2025
1 parent aa6c5e3 commit f2ddaa9
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package com.palantir.gradle.jdks

import groovy.xml.XmlNodePrinter
import groovy.xml.XmlParser
import org.gradle.internal.impldep.com.google.common.collect.ImmutableMap
import org.xml.sax.SAXException

import javax.xml.parsers.ParserConfigurationException
Expand All @@ -39,7 +38,9 @@ class ConfigureJdksIdeaPluginXml {
if (!createIfAbsent) {
return;
}
rootNode = new Node(null, "project", ImmutableMap.of("version", "4"));
// Using Map rather than ImmutableMap to avoid a Guava dependency.
Map<String, String> projectNodeAttributes = Map.of("version", "4");
rootNode = new Node(null, "project", projectNodeAttributes);
}

configureExternalDependencies(rootNode, minVersion)
Expand Down

0 comments on commit f2ddaa9

Please sign in to comment.