Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing test showing issue with globalLock root project dependency #57

Open
wants to merge 1 commit into
base: gradle-2.2
Choose a base branch
from
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