-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from rspieldenner/runtimeScopeInGradle4
Update to try runtimeClasspath since runtime scope auto move to compi…
- Loading branch information
Showing
3 changed files
with
70 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
55 changes: 55 additions & 0 deletions
55
...oovy/nebula/plugin/publishing/ivy/interaction/IvyPublishRecommenderInteractionSpec.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,55 @@ | ||
package nebula.plugin.publishing.ivy.interaction | ||
|
||
import nebula.test.IntegrationTestKitSpec | ||
import nebula.test.dependencies.DependencyGraphBuilder | ||
import nebula.test.dependencies.GradleDependencyGenerator | ||
|
||
class IvyPublishRecommenderInteractionSpec extends IntegrationTestKitSpec { | ||
def 'dependencies in runtime provided by recommender are not put in ivy file'() { | ||
keepFiles = true | ||
def graph = new DependencyGraphBuilder().addModule('test:foo:1.0.0').build() | ||
def generator = new GradleDependencyGenerator(graph, "$projectDir/repo") | ||
generator.generateTestMavenRepo() | ||
|
||
settingsFile.text = 'rootProject.name=\'mytest\'' | ||
|
||
buildFile << """\ | ||
plugins { | ||
id 'java' | ||
id 'nebula.ivy-publish' | ||
id 'nebula.dependency-recommender' version '5.0.0' | ||
} | ||
group = 'test.nebula' | ||
version = '0.1.0' | ||
repositories { | ||
${generator.mavenRepositoryBlock} | ||
} | ||
dependencyRecommendations { | ||
map recommendations: ['test:foo': '1.0.0'] | ||
} | ||
dependencies { | ||
runtime 'test:foo' | ||
} | ||
publishing { | ||
repositories { | ||
ivy { | ||
name 'testlocal' | ||
url 'build/testlocal' | ||
} | ||
} | ||
} | ||
""".stripIndent() | ||
|
||
when: | ||
def results = runTasks('publishNebulaIvyPublicationToTestlocalRepository') | ||
|
||
then: | ||
def ivy = new XmlSlurper().parse(new File(projectDir, 'build/testlocal/test.nebula/mytest/0.1.0/ivy-0.1.0.xml')) | ||
ivy.dependencies.dependency[0].@rev == '1.0.0' | ||
} | ||
} |
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