Skip to content

Commit

Permalink
Correct class loading and use maybe create for configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
raphw committed Jan 3, 2023
1 parent a070a5d commit 5ffe97c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ protected void doApply(Plugin.Engine.Source source, Plugin.Engine.Target target)
if (undiscoverable.add(name)) {
try {
@SuppressWarnings("unchecked")
Class<? extends Plugin> plugin = (Class<? extends Plugin>) Class.forName(name);
Class<? extends Plugin> plugin = (Class<? extends Plugin>) Class.forName(name, false, classLoader);
Transformation transformation = new Transformation();
transformation.setPlugin(plugin);
transformations.add(transformation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public void execute(JavaPlugin plugin) {
extension = DISPATCHER.toExtension(project);
}
extension.resolve(configuration.getTargetCompatibility());
extension.discoverySet(project.getConfigurations().create(name));
extension.discoverySet(project.getConfigurations().maybeCreate(name));
project.getExtensions().add(name, extension);
project.afterEvaluate(DISPATCHER.toAction(name, sourceSet));
}
Expand Down

0 comments on commit 5ffe97c

Please sign in to comment.