Revert "Map optional dependencies to Maven"

This reverts commit 7dc34ccef7.
This commit is contained in:
Rob Winch 2021-05-17 22:17:52 -05:00
parent d8e4f6c866
commit b0f661f432
1 changed files with 0 additions and 12 deletions

View File

@ -1,11 +1,8 @@
package org.springframework.gradle.maven;
import io.spring.gradle.propdeps.PropDepsPlugin;
import org.gradle.api.Action;
import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.component.AdhocComponentWithVariants;
import org.gradle.api.plugins.JavaBasePlugin;
import org.gradle.api.plugins.JavaPlugin;
import org.gradle.api.plugins.JavaPluginExtension;
import org.gradle.api.publish.PublishingExtension;
@ -18,8 +15,6 @@ import org.gradle.api.publish.maven.MavenPomScm;
import org.gradle.api.publish.maven.MavenPublication;
import org.gradle.api.publish.maven.plugins.MavenPublishPlugin;
import java.util.function.Consumer;
public class MavenPublishingConventionsPlugin implements Plugin<Project> {
@Override
public void apply(Project project) {
@ -32,13 +27,6 @@ public class MavenPublishingConventionsPlugin implements Plugin<Project> {
MavenPublishingConventionsPlugin.this.customizeJavaPlugin(project);
}
});
project.getPlugins().withType(PropDepsPlugin.class).forEach(new Consumer<PropDepsPlugin>() {
@Override
public void accept(PropDepsPlugin plugin) {
AdhocComponentWithVariants component = (AdhocComponentWithVariants) project.getComponents().findByName("java");
component.addVariantsFromConfiguration(project.getConfigurations().getByName("optional"), (details) -> details.mapToOptional());
}
});
}
private void customizePom(MavenPom pom, Project project) {