Closed blundell closed 8 months ago
Thank you for the report @blundell
Is this something you can also reproduce in the sample app?
We use the configPath
there too, and it does not seem to show the same behavior: https://github.com/mikepenz/AboutLibraries/blob/develop/app/build.gradle#L92
Hmm thanks let me see if I can!
Finally got round to this @mikepenz (Happy New Year!), sorry for the delay! :-)
Here is the error message being reproduced in your sample app: https://scans.gradle.com/s/5t6xzwhjzmxwo
Reason:
Task ':app:prepareLibraryDefinitionsDebug' uses this output of task ':aboutlibraries:packageDebugResources' without declaring an explicit or implicit dependency.
This can lead to incorrect results being produced, depending on what order the tasks are executed.
These are the only changes I made:
I made the :app
module use the :aboutlibraries
module (folder) as the source for the json files.
Happy new year to you too! I'll try to come back to this as soon as possible. Thank you!
I had a chance to look into this. So it seems the problem is because the aboutlibraries
folder itself gets modified by tasks prior to the generation of the libs. (given it includes the build folder)
If you modify the location to something like aboutlibraries/configs
then the problem will also go away.
I am not sure if this is something the plugin needs to handle 🤔
Can you perhaps explain more, if you need to have the libraries
and licenses
in the root of the module instead of in a folder within your module?
Thanks for finding the time.
Can you perhaps explain more ... [why they are] in the root of the module instead of in a folder within your module?
It's an inherited legacy project, so I don't have an answer sorry :-)
However there is nothing blocking me from creating a new configs
subfolder so that's a good workaround fix 👍
Thanks for the help! At least you know now if someone else raises it, perhaps a really small footnote in the documentation, but it now seems a very small edge case!
(Confirmed, making a subfolder under the project folder in the original project that had this issue, fixed the problem / stopped gradle raising a warning 👍 )
aboutLibraries {
configPath = "my-module/configs"
}
You are welcome!
Thank you very much for confirming!
About this issue
I have an app that uses config path:
Gradle doesn't seem to like that, (if I delete the above config, the error goes away)
This is a warning when AGP < 8, but build fails > 8.
One change I attempted was moving the configPath configuration to the
my-module
but the same error occurs with the error changing to be just that modules tasks.Details
Checklist