I understand my use case may be overcomplicated, so here is a small reproductible example.
I’m joining a sample project to this message.
gradle.projectsEvaluated {
configure(webProjects()) { Project project ->
configurations {
hotswapagent
}
dependencies {
hotswapagent group: 'org.hotswapagent', name: 'hotswap-agent-core', version: '1.+'
}
task myTask() {
logger.info(configurations.hotswapagent.asPath)
}
}
}
The error i get is
The configuration :sub_project:hotswapagent was resolved without accessing the project in a safe manner. This may happen when a configuration is resolved from a different project. This behaviour has been deprecated and is scheduled to be removed in Gradle 7.0.
main_project.zip (57.3 KB)
While running this
./gradlew.bat sub_project:mytask -i --warning-mode all