Hi @st_oehme - though it doesn’t answer this question I too am curious to see apiElements and runtimeElements used “in the wild”. Can please you post a real-world example?
Yes, the official doc is too vague to understand the meanings of apiElements, runtimeElements, compileClasspath, etc. Wish there would be some concrete examples!
I am attempting to build a zip file that contains all the runtime jars required to execute a module. I used to use the runtime configuration, prior to moving to java lib plugin. Now it looks like I need to use runtimeElements but it says I cannot access this directly. Can you provide a method to resolve the artifacts from this configuration?
What went wrong:
Could not determine the dependencies of task ‘:moda:distZip’.
Resolving configuration ‘runtimeElements’ directly is not allowed
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
WHERE the code has something like this
task modAZip(type: Zip) {
baseName += ‘-dist’
into(‘moda/lib’) {
//from configurations.runtime //this used to work
from configurations.runtimeElements //thought I was allowed to use this but no
from jar
}
}