androidmavenbintrayjcenterjitpack

Importing from Maven or Jcenter fails (Jitpack works)


I've a lint lib that fails to import throwing:

> Failed to resolve: AndroidStyling-LintRules:checks:unspecified
> Affected Modules: app

So I tested running ./gradlew publishToMavenLocal and this was thrown:

* What went wrong:
Execution failed for task ':styling-lint:publishAndroidPublicationToMavenLocal'.
> Failed to publish publication 'android' to repository 'mavenLocal'
   > Invalid publication 'android': artifact file does not exist: '.../styling-lint/build/outputs/aar/styling-lint-release.aar'

I found what was missing so after fixing it by adding builtBy:

artifact("$buildDir/outputs/aar/${artifactId}-release.aar") {
    builtBy(tasks.getByName("assemble"))
}

publishToMavenLocal builds successfully and I can use mavenLocal() to import and it works. Unfortunately, importing from remote still fails with the same output...

Jitpack import works:

What's happening?
Thanks.


Solution

  • For no apparent reason it started to work ¯\_(ツ)_/¯