Just for debugging the `runtimeClasspath`, I'm doi...
# community-support
s
Just for debugging the
runtimeClasspath
, I'm doing
Copy code
afterEvaluate {
    println(configurations.named("runtimeClasspath").get().files.joinToString("\n"))
}
in a sub-project of my multi-project. But when I run some "dummy" task like
properties
now to trigger the
println
during configuration phase, I suddenly get an error from another subproject
Copy code
$ ./gradlew --no-configuration-cache :cli:properties --rerun
Type-safe project accessors is an incubating feature.

> Configure project :
Building ORT version 55.2.1-002.sha.38b0c3e.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':cli'.
> Could not resolve all files for configuration ':cli:runtimeClasspath'.
   > Could not create task ':plugins:package-managers:gradle-inspector:processResources'.
      > Task with name 'fatJar' not found in project ':plugins:package-managers:gradle-plugin'.
And that's although the
farJar
task is there, I can execute it directly. The task is defined via
tasks.register<Jar>("fatJar")
, so can it be it's being registered too late, also I'm using
afterEvaluate
around
println
?
v
Hard to guess from just that, but why don't you simply register an ad-hoc task instead of using
afterEvaluate
and calling "some" task? Or add it as
doLast
action to "some" task.
👍 1