Skip to content

Commit 076a49a

Browse files
author
elasticsearchmachine
committed
[CI] Auto commit changes from spotless
1 parent 73af578 commit 076a49a

File tree

1 file changed

+13
-19
lines changed

1 file changed

+13
-19
lines changed

build-tools/src/main/java/org/elasticsearch/gradle/plugin/PluginBuildPlugin.java

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,9 @@
1919
import org.gradle.api.provider.ProviderFactory;
2020
import org.gradle.api.tasks.SourceSet;
2121
import org.gradle.api.tasks.SourceSetContainer;
22-
import org.gradle.jvm.tasks.Jar;
2322

2423
import javax.inject.Inject;
2524

26-
import static java.util.stream.Collectors.toList;
27-
2825
/**
2926
* Encapsulates build configuration for an Elasticsearch plugin.
3027
*/
@@ -69,29 +66,26 @@ public void apply(final Project project) {
6966
if (policy.getAsFile().exists()) {
7067
task.getPolicyFile().set(policy);
7168
}
72-
task.getCodeLocations().set(
73-
project.getConfigurations()
74-
.getByName("runtimeClasspath")
75-
.minus(project.getConfigurations().getByName(CompileOnlyResolvePlugin.RESOLVEABLE_COMPILE_ONLY_CONFIGURATION_NAME))
76-
.plus(sourceSets.getByName(SourceSet.MAIN_SOURCE_SET_NAME).getOutput().getClassesDirs())
77-
.plus(sourceSets.getByName(SourceSet.TEST_SOURCE_SET_NAME).getOutput().getClassesDirs())
78-
);
79-
80-
Provider<Directory> directory = project.getLayout()
81-
.getBuildDirectory()
82-
.dir("generated-build-info/test");
69+
task.getCodeLocations()
70+
.set(
71+
project.getConfigurations()
72+
.getByName("runtimeClasspath")
73+
.minus(project.getConfigurations().getByName(CompileOnlyResolvePlugin.RESOLVEABLE_COMPILE_ONLY_CONFIGURATION_NAME))
74+
.plus(sourceSets.getByName(SourceSet.MAIN_SOURCE_SET_NAME).getOutput().getClassesDirs())
75+
.plus(sourceSets.getByName(SourceSet.TEST_SOURCE_SET_NAME).getOutput().getClassesDirs())
76+
);
77+
78+
Provider<Directory> directory = project.getLayout().getBuildDirectory().dir("generated-build-info/test");
8379
task.getOutputDirectory().set(directory);
8480
});
8581

86-
sourceSets.named(SourceSet.TEST_SOURCE_SET_NAME).configure(sourceSet -> {
87-
sourceSet.getResources().srcDir(testBuildInfoTask);
88-
});
82+
sourceSets.named(SourceSet.TEST_SOURCE_SET_NAME).configure(sourceSet -> { sourceSet.getResources().srcDir(testBuildInfoTask); });
8983

9084
// TODO: get the jar task
9185
// TODO: configure on this task
9286
// TODO: task.from()
93-
//project.getLogger().lifecycle(
94-
// "HELLO: " + project.getTasks().withType(Jar.class).getByName("jar").getArchiveFile().get().getAsFile().getAbsolutePath());
87+
// project.getLogger().lifecycle(
88+
// "HELLO: " + project.getTasks().withType(Jar.class).getByName("jar").getArchiveFile().get().getAsFile().getAbsolutePath());
9589
}
9690

9791
}

0 commit comments

Comments
 (0)