-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lock plugin silently failing #95
Comments
Without seeing the build, I'd guess that the limiting of the configurations to |
Thanks for getting back to me @DanielThomas. When I ran this without limiting the configurations, runtime was not one of the options. We have compile, testcompile, and a handful of others (ie pmd, jacoco, etc) that werent related to building the actual app. |
Oh and I should add, even when removing the config limitations, it still does not lock the dependencies |
Odd. I assume the project isn't OSS, so we'd need a reduced test case that reproduces the issue to help. Are you able to reproduce the issue with a bare bones project? |
Hi Daniel, yeah its not OSS. I did create a test project here: https://github.com/rjbrock/DependencyLocktest I generated the build.gradle file by running commons-io is locked at 2.4 but when I sync it pulls in 2.5 |
Looks right to me. You have a dynamic dependency on
Here's with the lock:
And without the lock:
So it stands to reason, that generating the lock is going to get you the latest 2.x version; that's what you asked for. This is exactly the pattern what dependency lock was intended for: use dynamic and |
Sorry, let me clarify. Generating the lock works perfectly. The problem is that when the dependencies.lock file has version 2.4 locked, doing something like assembleDebug will still bring in version 2.5. |
Ah, the Android plugin must be making copies of the configurations in a way that doesn't copy the forces, or before the forces are applied:
The plugin doesn't lock these configurations. I'll see what's preventing them from being seen. |
@DanielThomas ah ok, thanks! Edit: sorry, didnt meant to close the issue |
If the
We should be able to move that logic to within the convention mappings so it's deferred until the task is ready to run. In the meantime, workaround the issue by adding all of the configurations to the @rspieldenner can you pass an eye over |
@DanielThomas Awesome thanks! Do you happen to know when you will be doing another release? |
@rjbrock today! Look for the release in the next few minutes. |
@DanielThomas Wow, thats a great turnaround time. Thanks again for the help! |
No worries! Appreciate the report - this use case allowed us to make the plugin immensely more reliable and predictable than would have been possible if we were only optimizing for |
I am not sure why this is happening, and it very well could be something we have in our config, but it appears that the dependency lock plugin isnt actually locking dependencies.
Build Info:
Building for android, using gradle 2.1 & dependency lock 4.2.0
I dont see any errors, and the dependency lock file was generated via ./gradlew generateLock saveLock. This created a lock file with 2 configurations, "compile" and "testCompile" (we limited it to just these 2).
When running ./gradlew assembleDebug it does not obey the lock file. But if I change "compile" to "global" it obeys the lock file. Is there something I am missing here?
Thanks!
The text was updated successfully, but these errors were encountered: