> Could not resolve all files for configuration ':classpath'.
> Could not find com.jakewharton.hugo:hugo-plugin:1.2.1.
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/jakewharton/hugo/hugo-plugin/1.2.1/hugo-plugin-1.2.1.pom
https://dl.google.com/dl/android/maven2/com/jakewharton/hugo/hugo-plugin/1.2.1/hugo-plugin-1.2.1.jar
Required by:
project :
I’m not sure what you mean “doesn’t even re-download all deps” – --refresh-dependencies
only forces Gradle to check for changes to the dependencies in the project. If it doesn’t find a change in the dependency, it doesn’t need to download anything. What kind of problem are you seeing/trying to solve?
In this case, even if you’ve removed the repository, Gradle will still have the dependency in its cache and will be able to satisfy the dependency request without looking externally.
I was playing around with different repository {} configurations and trying to tease out how things work, was surprised to see the behavior mentioned in my original post. Now I’m just looking for a way to replicate the error you mentioned but don’t know how. I’ve tried deleting the .gradle directory, cleanBuildCache, uninstalling Android Studio and even deleting and re-cloning the project.
Are you removing your Gradle user home (~/.gradle
) or the project’s .gradle
?
You can just try using a temporary Gradle user home to see the same behavior:
gradle -g gradle-user-home buildEnvironment
This creates a directory called gradle-user-home
in the current directory and uses that as your Gradle user home, which is where Gradle caches downloaded dependencies.
Actually now that I’m building in a new gradle home, I’m still able to resolve dependencies like hugo, and they resolve from https://plugins.gradle.org/m2
Example input:
buildscript {
repositories {
google()
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1'
classpath 'com.romandanylyk:pageindicatorview:0.2.0@aar'
allprojects {
repositories {
maven { url "https://jitpack.io" }
google()
Example output:
Download https://plugins.gradle.org/m2/com/jakewharton/hugo/hugo-plugin/1.2.1/hugo-plugin-1.2.1.pom
Download https://plugins.gradle.org/m2/com/jakewharton/hugo/hugo-plugin/1.2.1/hugo-plugin-1.2.1.jar
Download https://plugins.gradle.org/m2/com/romandanylyk/pageindicatorview/0.2.0/pageindicatorview-0.2.0.pom
Download https://plugins.gradle.org/m2/com/romandanylyk/pageindicatorview/0.2.0/pageindicatorview-0.2.0.aar