-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make evaluation of dependencies for BOM genration lazy, and occur onl…
…y when withXml is called
- Loading branch information
1 parent
0ac87bc
commit 11b9cbe
Showing
2 changed files
with
35 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
...st/groovy/netflix/nebula/dependency/recommender/publisher/MavenBomXmlGeneratorSpec.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package netflix.nebula.dependency.recommender.publisher | ||
|
||
import nebula.test.ProjectSpec | ||
import netflix.nebula.dependency.recommender.DependencyRecommendationsPlugin | ||
import org.gradle.api.publish.maven.MavenPublication | ||
import org.gradle.api.publish.maven.plugins.MavenPublishPlugin | ||
|
||
class MavenBomXmlGeneratorSpec extends ProjectSpec { | ||
def 'configure a publication with BOM generation'() { | ||
given: | ||
project.plugins.apply(MavenPublishPlugin) | ||
project.plugins.apply(DependencyRecommendationsPlugin) | ||
project.configurations.create('recommendation') | ||
|
||
project.publishing { | ||
publications { | ||
recommender(MavenPublication) { | ||
project.nebulaDependencyManagement.fromConfigurations { | ||
project.configurations.recommendation | ||
} | ||
} | ||
} | ||
} | ||
|
||
when: | ||
project.publishing | ||
|
||
then: | ||
noExceptionThrown() | ||
} | ||
} |