[GRADLE-649] dynamic dependencies Created: 23/Sep/09  Updated: 04/Jan/13  Resolved: 24/Nov/10

Status: Resolved
Project: Gradle
Affects Version/s: None
Fix Version/s: 0.9-rc-1

Type: Bug
Reporter: Andrei Sereda Assignee: Hans Dockter
Resolution: Fixed Votes: 0

Issue Links:
Related to GRADLE-910 Allow project objects to be assigned ... Resolved


Steps to reproduce:

  1. Create dirs shared and project1. mkdir shared project1
  2. Create build.gradle in project root
    subprojects {
       beforeEvaluate { p ->
          if (p.name != "shared")
             p.dependencies.add("compile", project(':shared'))

    Error message is:

    Failed to notify action.
    Cause: The dependency notation: project ':shared' is invalid!


However the other notation works fine:

 p.dependencies.add("compile", p.dependencies.project(':shared'))

Generated at Wed Jun 30 11:35:20 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.