Android builds failing - AndroidX issue?

I could do with some help with our Android builds, as every build this week has failed despite no code changes.
Our Github Actions CI workflow builds every commit . Screenshot shows a successful build of a branch last week, followed by an unsuccessful manually triggered build of the same commit just now.

Relevant log output below.
I can see that https://repo.maven.apache.org/maven2/androidx/core/core/maven-metadata.xml isn’t available, but I’d have expected uproar if many projects were relying on it.
Does anybody have any thoughts on this?

> Task :downloadDependencies FAILED
Caching disabled for task ':downloadDependencies' because:
  Build cache is disabled
Task ':downloadDependencies' is not up-to-date because:
  Task has not declared any outputs despite executing actions.
Cached resource https://dl.google.com/dl/android/maven2/androidx/core/core/maven-metadata.xml is up-to-date (lastModified: .
Resource missing. [HTTP GET: https://repo.maven.apache.org/maven2/androidx/core/core/maven-metadata.xml]
Resource missing. [HTTP GET: https://repo.maven.apache.org/maven2/androidx/core/core/maven-metadata.xml]
Resource missing. [HTTP GET: https://repo.maven.apache.org/maven2/androidx/core/core/maven-metadata.xml]

FAILURE: Build failed with an exception.

* Where:
Build file '/tmp/job9107201203857547277/build.gradle' line: 49

* What went wrong:
Execution failed for task ':downloadDependencies'.
> Could not resolve all dependencies for configuration ':releaseRuntimeClasspath'.
   > Could not resolve androidx.core:core:1.6.+.
     Required by:
         project :
      > Failed to list versions for androidx.core:core.
         > Unable to load Maven meta-data from https://dl.google.com/dl/android/maven2/androidx/core/core/maven-metadata.xml.
            > org.xml.sax.SAXNotRecognizedException: Property 'http://javax.xml.XMLConstants/property/accessExternalSchema' 
      > Failed to list versions for androidx.core:core.
         > Unable to load Maven meta-data from https://dl.google.com/dl/android/maven2/androidx/core/core/maven-metadata.xml.
            > org.xml.sax.SAXNotRecognizedException: Property 'http://javax.xml.XMLConstants/property/accessExternalSchema'
3 Likes

The culprit appears to be defold-sharing
@AGulev pushed a Gradle fix to master a few weeks ago but there wasn’t a new release, perhaps one could be created please?

I still don’t understand why this has only become a problem now, unless something was cached on the build server for a while? Perhaps related to changes to reduce disk usage.

2 Likes

Let’s ping @britzl to make release of a new version

3 Likes

Do you have Maven Central added as a repository in your build.gradle?

repositories {
    mavenCentral()
}

I’m fairly certain the problem is with the defold-sharing extension (see my later reply)
Edited to clarify: using the master branch of Defold-sharing resolves the issue.