-
Notifications
You must be signed in to change notification settings - Fork 501
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
Dependencies not downloaded until ktlint task is run with Gradle #49
Comments
Hi @Drarok. Any chance you can share your build.gradle? The only case I can think of where ktlint would download anything is when using external 3rd party ruleset (-R flag). But even then caching ~/.m2 should work just fine. FYI: You can use ktlint as a standalone binary (see https://ktlint.github.io/#getting-started) without the need for Maven or Gradle. |
I may have put things into the wrong gradle file, so here's both! Thanks for looking into this. Project build.gradle:
App build.gradle:
|
@Drarok Just to clarify: you are caching both ~/.gradle and ~/.m2? |
@Drarok what gradle target do you currently run in the |
I've just double checked, both are cached, yes. Run: ./gradlew dependencies Cache: Creating dependency cache from the following paths: Run: ./gradlew ktlint Output (note the downloads from
|
It looks like it only triggers the download when the |
Well on 2nd take it looks like having |
Hmm, so am I stuck having it download its transitive dependencies, or can I force Gradle to download those somehow? |
Sorry @Drarok, got distracted at work. I'll try to provide an answer within 24h. |
Honestly, don't rush! I'm not back in work where this is is only a minor inconvenience until Tuesday anyway. Have a good weekend! 😄 |
Alright, I was able to reproduce aforementioned behavior on gradle@3.5 (worked fine on gradle 2.4.1).
Tested on 🎈 |
@Drarok have a great weekend too ;) |
@jeremymailen thank you for trying to help, I appreciate it 🙇♂️ |
Finally got around to implementing this change, and my latest build didn't download anything extra, so everything's being cached as expected! 🎉 Thanks to everyone that helped. |
I'm using KTLint for an Android app, on CircleCI, and I don't want to download the binary files every time. I'm successfully downloading and caching deps that are required for building the app, but when the
ktlint
task runs, Gradle downloads more dependencies.Is there a way I can force Gradle to download them up-front, and therefore get cached by the CI configuration?
The text was updated successfully, but these errors were encountered: