Skip to content

Commit

Permalink
common: Fix eager task realization
Browse files Browse the repository at this point in the history
  • Loading branch information
zml2008 committed Oct 15, 2022
1 parent 9487628 commit 02d4260
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions indra-common/src/main/java/net/kyori/indra/IndraPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public void apply(final @NotNull Project project, final @NotNull PluginContainer
});
this.applyIdeConfigurationOptions(project.getPluginManager(), extensions, tasks);

tasks.withType(JavaCompile.class, task -> {
tasks.withType(JavaCompile.class).configureEach(task -> {
final CompileOptions options = task.getOptions();
options.getCompilerArgs().addAll(Arrays.asList(
// Generate metadata for reflection on method parameters
Expand All @@ -118,7 +118,7 @@ public void apply(final @NotNull Project project, final @NotNull PluginContainer
task.getArgumentProviders().add(indra.previewFeatureArgumentProvider());
});

tasks.withType(Javadoc.class, task -> {
tasks.withType(Javadoc.class).configureEach(task -> {
// Apply preview feature flag
final MinimalJavadocOptions minimalOpts = task.getOptions();
if (minimalOpts instanceof StandardJavadocDocletOptions) {
Expand Down Expand Up @@ -151,7 +151,7 @@ public void execute(final @NotNull Task t) {
}
});

tasks.withType(ProcessResources.class, task -> {
tasks.withType(ProcessResources.class).configureEach(task -> {
task.setFilteringCharset(LanguageSupport.DEFAULT_ENCODING);
});

Expand All @@ -160,7 +160,7 @@ public void execute(final @NotNull Task t) {
extension.withSourcesJar();
});

tasks.withType(Test.class, Test::useJUnitPlatform);
tasks.withType(Test.class).configureEach(Test::useJUnitPlatform);

// If we are publishing, publish java
indra.configurePublications(publication -> {
Expand Down

0 comments on commit 02d4260

Please sign in to comment.