Skip to content

Commit

Permalink
Make addClasspathEntry() public
Browse files Browse the repository at this point in the history
  • Loading branch information
knutwannheden committed Mar 5, 2024
1 parent abe7efb commit 7748c42
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/main/java/org/openrewrite/kotlin/KotlinParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,10 @@ public Builder classpathFromResources(ExecutionContext ctx, String... classpath)
return this;
}

Builder addClasspath(Path classpath) {
/**
* This is an internal API which is subject to removal or change.
*/
public Builder addClasspathEntry(Path classpath) {
if (this.classpath.isEmpty()) {
this.classpath = Collections.singletonList(classpath);
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/openrewrite/kotlin/KotlinTemplate.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ private KotlinTemplate(boolean contextSensitive, KotlinParser.Builder parser, St
}

private static KotlinParser.Builder augmentClasspath(KotlinParser.Builder parserBuilder) {
return parserBuilder.addClasspath(getTemplateClasspathDir());
return parserBuilder.addClasspathEntry(getTemplateClasspathDir());
}

@Override
Expand Down

0 comments on commit 7748c42

Please sign in to comment.