Skip to content

Commit

Permalink
Remove deprecated compileOnly resolution (#58857) (#59710)
Browse files Browse the repository at this point in the history
- Ideally this should not be required but current runtime classpath
seems to require this. We need to revisit the classpath declarations in detail
to be able to remove this type of (in theory) superflous compile only references

Related to #57920
  • Loading branch information
breskeby committed Jul 17, 2020
1 parent 7398714 commit eb25e3f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import org.elasticsearch.gradle.BuildPlugin
import org.elasticsearch.gradle.NoticeTask
import org.elasticsearch.gradle.Version
import org.elasticsearch.gradle.VersionProperties
import org.elasticsearch.gradle.dependencies.CompileOnlyResolvePlugin
import org.elasticsearch.gradle.info.BuildParams
import org.elasticsearch.gradle.test.RestIntegTestTask
import org.elasticsearch.gradle.testclusters.RunTask
Expand Down Expand Up @@ -55,6 +56,7 @@ class PluginBuildPlugin implements Plugin<Project> {
void apply(Project project) {
project.pluginManager.apply(BuildPlugin)
project.pluginManager.apply(TestClustersPlugin)
project.pluginManager.apply(CompileOnlyResolvePlugin.class);

PluginPropertiesExtension extension = project.extensions.create(PLUGIN_EXTENSION_NAME, PluginPropertiesExtension, project)
configureDependencies(project)
Expand Down Expand Up @@ -223,7 +225,9 @@ class PluginBuildPlugin implements Plugin<Project> {
* that shadow jar.
*/
from { project.plugins.hasPlugin(ShadowPlugin) ? project.shadowJar : project.jar }
from project.configurations.runtimeClasspath - project.configurations.compileOnly
from project.configurations.runtimeClasspath - project.configurations.getByName(
CompileOnlyResolvePlugin.RESOLVEABLE_COMPILE_ONLY_CONFIGURATION_NAME
)
// extra files for the plugin to go into the zip
from('src/main/packaging') // TODO: move all config/bin/_size/etc into packaging
from('src/main') {
Expand Down

0 comments on commit eb25e3f

Please sign in to comment.