My gradle syncs in Android Studio (4.1.2) used to ...
# gradle
e
My gradle syncs in Android Studio (4.1.2) used to take a few seconds, rarely tens of seconds. The past few days they started taking 2+ minutes. The only thing I changed was that I moved
jCenter
below all of my other repositories. The only thing that gets logged is:
Copy code
> Task :prepareKotlinBuildScriptModel UP-TO-DATE

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See <https://docs.gradle.org/6.8.3/userguide/command_line_interface.html#sec:command_line_warnings>

BUILD SUCCESSFUL in 2m 33s
I'm using Groovy gradle, and don't have a buildSrc directory. My project uses Kotlin 1.4.31. Anyone know what's up with that?
n
When you change it back, does it fix the issue?
v
Can you share a build scan? It should be able to help identifying what needs that much time.
e
I will try reverting the change and see what happens, as well as run with a build scan. Not sure if I can share or not, but if anything pops out as weird I can summarize it.
Looks like the issue was that JCenter was moved below jitpack, and that's much slower
v
Definitely
j
you have mavenCentral in your repositories?
v
You could use content filters to define exactly what is served from which repository
j
@Vampire knowing that jcenter is setting down, this can be the correct order (until jcenter is completely down)? • mavenCentral • jcenter • jitpack (personally here I should filter by specific repo)
v
"correct" depends on the specific case.
You could also use content filter for JitPack as it is slow and bad and for JCenter to see exactly what is still served from JCenter and to not accidentally introduce new ones.
👍 1
e
I put mavenCentral first I thought about using a content filter for JCenter but there are still too many artifacts that I depend on from them to make it ergonomic. I probably should use one for JitPack, that's a good idea, thanks.