Skip to content

Commit

Permalink
IvyNebulaPublishPlugin: manage component information properly
Browse files Browse the repository at this point in the history
  • Loading branch information
rpalcolea committed Nov 15, 2023
1 parent 9f298df commit 0c0edb1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,26 @@ class IvyNebulaPublishPlugin implements Plugin<Project> {
}

project.afterEvaluate { p ->
def component = p.ext.get(IVY_WAR) ? p.components.web : p.components.java
def component = getComponent(p)
project.publishing {
publications {
nebulaIvy(IvyPublication) { publication ->
publication.from component
if(component) {
publication.from component
}
}
}
}
}
}

private getComponent(Project p) {
if(p.ext.get(IVY_WAR)) {
return p.components.web
} else if(p.ext.get(IVY_JAR)) {
return p.components.java
} else {
return null
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import nebula.test.dependencies.GradleDependencyGenerator
import nebula.test.dependencies.ModuleBuilder
import nebula.test.functional.ExecutionResult
import netflix.nebula.dependency.recommender.DependencyRecommendationsPlugin
import org.jfrog.gradle.plugin.artifactory.ArtifactoryPlugin
import spock.lang.IgnoreIf

class PublishVerificationPluginIntegrationSpec extends IntegrationSpec {
Expand Down

0 comments on commit 0c0edb1

Please sign in to comment.