This message was deleted.
# community-support
s
This message was deleted.
v
The
project
method you call in there is not the same you call in the top level
dependencies
block. Use
project.dependencies.project(...)
and it should work
There's also an issue to hopefully improve on that
t
That doesn’t seem to work… the build script parses, but it doesn’t resolve my classes. I declared it like this:
Copy code
testing {
  suites {
    test {
      dependencies {
        project.dependencies.project(path: ':test-common', configuration: "testJar")
      }
    }
  }
}
I’m not quite sure what that’s doing… how does that know to add the dependency to the
testImplementation
configuration? It looks to me like the equivalent of declaring it in the top-level
dependencies
block without a configuration.
v
You forgot the leading
implementation
, now you just create the project dependency but do not add it to the configuration you want to have it in.
t
Excellent, that’s the info I needed, thanks. For posterity, here’s the syntax that worked:
Copy code
testing {
  suites {
    test {
      dependencies {
        implementation project.dependencies.project(path: ":test-common", configuration: "testJar")
      }
    }
  }
}
Now that I see the syntax, I understand your original comment and the scoping of the
project
method. Thanks again for taking the time to respond.
👌 1