Skip to content

Commit

Permalink
IvyCompileOnlyPlugin: xml configuration should happen when JavaPlugin…
Browse files Browse the repository at this point in the history
… is applied so compileOnly is available
  • Loading branch information
rpalcolea committed Mar 20, 2023
1 parent 2098059 commit 54e8f35
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.XmlProvider
import org.gradle.api.plugins.JavaBasePlugin
import org.gradle.api.plugins.JavaPlugin
import org.gradle.api.publish.PublicationContainer
import org.gradle.api.publish.PublishingExtension
import org.gradle.api.publish.ivy.IvyModuleDescriptorSpec
Expand All @@ -39,7 +40,7 @@ class IvyCompileOnlyPlugin implements Plugin<Project> {
project.plugins.apply IvyBasePublishPlugin

PublishingExtension publishing = project.extensions.getByType(PublishingExtension)
project.plugins.withType(JavaBasePlugin) { JavaBasePlugin javaBasePlugin ->
project.plugins.withType(JavaPlugin) { JavaPlugin javaBasePlugin ->

publishing.publications(new Action<PublicationContainer>() {
@Override
Expand Down

0 comments on commit 54e8f35

Please sign in to comment.