Questions tagged [maven-publish]

A Gradle plugin for publishing build artifacts to an Apache Maven Repository.

https://docs.gradle.org/current/userguide/publishing_maven.html

219 questions
2
votes
1 answer

Published sources in maven local repository not visible in Android Studio IDE if proguard (R8) minification turned on

I want to publish some sources so that consumers of our closed-source library can see the documentation in their IDEs. I have this working so far: def listOfPublicApiFiles = [ '/com/example/app/MyClass.java', …
2
votes
2 answers

Gradle: Invalid publication 'maven': artifact file does not exist

Java 11 and Gradle 7.2 here. I am trying to build a reusable library that I can (eventually) publish to a Maven repository and pull into other projects. But first I just want to get it publishing to my local m2 repo. The project directory structure…
hotmeatballsoup
  • 385
  • 6
  • 58
  • 136
2
votes
0 answers

Skip publishing of testJar from Gradle's maven-publish plugin

I was adapting a Gradle project from version 5.3 to version 7.3.3. Therefore the maven plugin had to be replaced with the maven-publish plugin. Before, it was possible to skip long running tasks when deploying to the local .m2 repository/folder. All…
J.M.
  • 31
  • 2
2
votes
1 answer

How to publish an android library to a local directory after upgrading to Gradle 7

Yesterday I upgraded Android Studio to Arctic Fox, which moves from Gradle 6 to 7. Gradle 7 removes the 'maven' plugin, which my team had been using to package an Android Library we had into an AAR file as part of an automated/CI build. Previously…
Orion Edwards
  • 121,657
  • 64
  • 239
  • 328
2
votes
2 answers

I cannot declare import for gradle dependency of my just published library

UPDATE2: I was not generating a aar file, now it's included in the package that you can check here: https://github.com/fabrizioiacobucci/range-bar-preference/packages/787218 I see javadoc, sources and aar are there, but when I add the package as…
2
votes
1 answer

gradle can't resolve dependency that is resolved by maven

I published a package to gcloud artifact registry (gradle/maven-publish). I use this as a dependency in two projects (maven and gradle). The dependency is resolved by maven but gradle shows. Could not resolve com.company.group:art:1.0-SNAPSHOT Also,…
Nane Petrosyan
  • 553
  • 1
  • 7
  • 19
2
votes
0 answers

401 Unauthorized when publish to maven by gradle maven-publish plugin

Could not PUT 'https://xxx.jar'. Received status code 401 from server: Unauthorized: maven { name = "${infos.publish.snapshotId}" url = infos.publish.urls.snapshot credentials { username =…
FredSuvn
  • 1,869
  • 2
  • 12
  • 19
2
votes
0 answers

How to use the "maven-publish" gradle plugin for a Bintray repository?

I want to publish my maven artifacts to standard maven repositories. For that the first example I chose is Bintray by JFrog. Unfortunately this didn’t go well; I had to add two hacks: Remove existing artifacts if pushing same version again Delete…
pPanda_beta
  • 618
  • 7
  • 10
2
votes
1 answer

Use maven-publish to publish Android apk and aar with build variant (Android Gradle plugin 4.0)

I'm trying to follow https://developer.android.com/studio/build/maven-publish-plugin to publish library (aar) module and application (apk) module to Maven repository (maven-publish plugin). I'm using Kotlin Gradle kts instead of Grovy. Sample…
Lê Khánh Vinh
  • 2,591
  • 5
  • 31
  • 77
2
votes
1 answer

Bintray : Maven-Publish with Gradle Bintray Plugin doesn't upload maven-metadata.xml checksum file

I'm trying to deploy my java project to Bintray. The version being built itself uploads fine but in the package main folder - there is no checksum file for maven-metadata.xml (maven-metadata.xml.md5, maven-metadata.xml.sh1 or any other). I cannot…
FunkSoulBrother
  • 2,057
  • 18
  • 27
2
votes
1 answer

Extension of type 'BintrayExtension' does not exist

My project build.gradle: ... plugins { id "maven-publish" id "com.jfrog.bintray" version "1.8.5" } My library module build.gradle: apply plugin: 'kotlin' apply plugin: 'java-library' apply plugin: 'com.android.lint' ... if…
GuilhE
  • 11,591
  • 16
  • 75
  • 116
2
votes
2 answers

Configure gradle "maven-publish" plugin directly from my custom plugin

i'm new in gradle and want to create custom gradle plugin that applies maven-publish plugin. Also my plugin should configure maven-publish plugin so that another plugin user should do nothing. And my plugin will automaticly configure maven-publish.…
Raccoon
  • 61
  • 8
2
votes
0 answers

Is there a way to include Dagger 2 generated code in AAR?

I need to integrate an internal library with two apps. The problem is that those apps use different versions of Dagger 2 which are incompatible and I can't remove Dagger from the library fast. Is there a way to include Dagger generated classes in…
Dawid Hyży
  • 3,581
  • 5
  • 26
  • 41
2
votes
1 answer

Gradle maven publish generates invalid POM with duplicated attributes

I have a gradle multimodule project using the maven publish plugin. The publish task fails as the maven publish plugin generates an invalid POM.
Marco Tizzoni
  • 532
  • 4
  • 13
2
votes
1 answer

Gradle maven-publish plugin fails on sub-projects

Following this guide: https://help.github.com/en/articles/configuring-gradle-for-use-with-github-package-registry But when I apply the gradle's maven-publish to the submodules, I get the following error: Could not find method publications() for…
Sinapse
  • 143
  • 1
  • 11