diff --git a/build.gradle b/build.gradle index 7448761e7..410cd2688 100644 --- a/build.gradle +++ b/build.gradle @@ -1,3 +1,6 @@ +import org.gradle.api.attributes.plugin.GradlePluginApiVersion +import org.gradle.util.GradleVersion + plugins { id 'eclipse' id 'maven-publish' @@ -65,6 +68,17 @@ subprojects.forEach { Project subProject -> configuration.exclude group: 'org.ow2.asm' } + ['apiElements', 'runtimeElements'].each { + subProject.configurations.named(it).configure { + attributes { + attribute( + GradlePluginApiVersion.GRADLE_PLUGIN_API_VERSION_ATTRIBUTE, + objects.named(GradlePluginApiVersion, GradleVersion.current().getVersion()) + ) + } + } + } + //Wire up our custom repositories. subProject.repositories.mavenLocal() subProject.repositories.maven { MavenArtifactRepository repository ->