Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,46 @@ class DependencyLockLauncherSpec extends IntegrationSpec {
new File(projectDir, 'build/global.lock').text == globalLockText
}

def 'create global lock in multiproject with subproject depending on top-level'() {
addSubproject('sub1', """\
dependencies {
compile project(':')
}
""".stripIndent())
addSubproject('sub2', """\
dependencies {
compile project(':sub1')
}
""".stripIndent())

buildFile << """\
allprojects {
${applyPlugin(DependencyLockPlugin)}
group = 'test'
}
allprojects {
apply plugin: 'java'
repositories { maven { url '${Fixture.repo}' } }
}
dependencyLock {
includeTransitives = true
}
""".stripIndent()

when:
runTasksSuccessfully('generateGlobalLock')

then:
String globalLockText = """\
{
"test:${moduleName}": { "project": true, "transitive": [ "test:sub1" ] },
"test:sub1": { "project": true, "transitive": [ "test:sub2" ] },
"test:sub2": { "project": true }
}
""".stripIndent()
new File(projectDir, 'build/global.lock').text == globalLockText
}

def 'save global lock in multiproject'() {
setupCommonMultiproject()

Expand Down