io.freefair.gradle.plugins.maven.javadoc.AggregateJavadocJarPlugin Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of maven-plugin Show documentation
Show all versions of maven-plugin Show documentation
Collection of Maven related Gradle plugins
package io.freefair.gradle.plugins.maven.javadoc;
import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.artifacts.Dependency;
import org.gradle.api.plugins.BasePlugin;
import org.gradle.api.plugins.JavaPlugin;
import org.gradle.api.plugins.JavaPluginExtension;
import org.gradle.api.tasks.TaskProvider;
import org.gradle.api.tasks.bundling.Jar;
@Deprecated
public class AggregateJavadocJarPlugin implements Plugin {
private TaskProvider aggregateJavadocJar;
@Override
public void apply(Project project) {
project.getPlugins().apply(LegacyAggregateJavadocPlugin.class);
project.getPlugins().withType(LegacyAggregateJavadocPlugin.class, aggregateJavadocPlugin -> {
aggregateJavadocJar = project.getTasks().register("aggregateJavadocJar", Jar.class, aggregateJavadocJar -> {
aggregateJavadocJar.from(aggregateJavadocPlugin.getAggregateJavadoc());
aggregateJavadocJar.getArchiveClassifier().set("javadoc");
aggregateJavadocJar.setGroup(BasePlugin.BUILD_GROUP);
});
project.getPlugins().apply(BasePlugin.class);
project.getArtifacts().add(Dependency.ARCHIVES_CONFIGURATION, aggregateJavadocJar);
project.getPlugins().withType(JavaPlugin.class, javaPlugin -> {
aggregateJavadocJar.configure(aggregateJavadocJar -> {
aggregateJavadocJar.getArchiveClassifier().convention("aggregateJavadoc");
});
});
});
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy