bintray / gradle-bintray-plugin

Apache License 2.0
1.28k stars 197 forks source link

Importing from MavenLocal works but not from remote (lintPublish dependency) #331

Closed GuilhE closed 3 years ago

GuilhE commented 4 years ago

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...

What am I missing?
Thanks.

GuilhE commented 4 years ago

Anyone can help me?

GuilhE commented 3 years ago

Importing from Jitpack works, from Maven or Jcenter it doesn't, any reason why?

GuilhE commented 3 years ago

Released a new version of the lib with a few updates and it started working 🤷‍♂️