Giuseppe Barbieri
01/29/2025, 4:07 PMGiuseppe Barbieri
01/29/2025, 4:13 PMproject.childProjects["asgard-client"]!!.afterEvaluate {
configurations["apiElements"].allDependencies.configureEach { println(this) }
}
but I don't get the versions
the module depends on a platform, so maybe they will get resolved later on?Vampire
01/29/2025, 4:21 PMapiElements
is what you consume from outside, if that is what you want to have, just declare a dependency on that project in a configuration in your project and then get the dependency information from there, no need to touch the other project's model.Giuseppe Barbieri
01/29/2025, 4:26 PMval webstartCfg = project.configurations.maybeCreate("webstart")
project.dependencies {
webstartCfg(project.childProjects["asgard-client"]!!)
}
Vampire
01/29/2025, 4:29 PMchildProjects
but simply a normal project(...)
dependency.
And you should probably not use legacy configuration setup which is used by default, but properly separate dependency scope configurations from resolvable configurations.
Either by using the incubating helper methods like configurations.dependencyScope(...)
/ configurations.resolvable(...)
or by setting the isCanBe...
properties accordingly.Giuseppe Barbieri
01/29/2025, 4:43 PMDependencyScopeConfiguration
to resolve it, a ResolvableConfiguration
now, how can I wire the two? Like this?
val webstartDep by project.configurations.dependencyScope("webstartDep")
val webstartRes by project.configurations.resolvable("webstartRes") {
extendsFrom(webstartDep)
}
Vampire
01/29/2025, 4:53 PM=
not by
, but otherwise, yes.
by
with those is like using .register
and immediately calling get()
, so basically like using .create
=
with those is like using .register
Giuseppe Barbieri
01/29/2025, 4:55 PMextendsFrom
expects a Configuration
, so I do have to call a `get()`:
extendsFrom(webstartDep.get())
Vampire
01/29/2025, 4:56 PMGiuseppe Barbieri
01/29/2025, 5:04 PMGiuseppe Barbieri
01/29/2025, 5:05 PMVampire
01/29/2025, 5:13 PM