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
0
votes
1 answer

How to debug custom MavenPublication in Gradle?

I'm working on a Gradle project (with plugin maven-publish) that has a lot of convoluted logic for custom MavenPublications. I would like to look under the hood of the task publish. In particular, I would like to check the metadata of any/all…
andrybak
  • 2,129
  • 2
  • 20
  • 40
0
votes
0 answers

Gradle not resolving mavenLocal() dependency

I have a problem with resolving local dependency. I have a lib that I want to provide across my projects. So I've published it locally. The build.gradle looks like this: ... plugins { ... id("maven-publish") ... } publishing { …
WinterMute
  • 145
  • 2
  • 11
0
votes
0 answers

Publishing is not able to resolve a dependency on a project with multiple publications that have different coordi nates

I intend to publish my modules in a nexus repository with the following steps. first step: Create a android-publications.gradle file and add the following contents to it android-publications.gradle : apply plugin: 'maven-publish' ext.moduleVersion…
Vahid Garousi
  • 546
  • 4
  • 17
0
votes
1 answer

Android Library publishing fails after recommended AGP update to 7.1.1/Gradle 7.2

My build is failing after performing the upgrade to AGP 7.1.1 and performing the automated upgrade steps from Android Studio in a library project. I am following the following guide:…
Matt Wolfe
  • 8,924
  • 8
  • 60
  • 77
0
votes
0 answers

Use Mavan-Pulish upload artifact to Nexus in env Gradle7+ failed

Use Mavan-Pulish upload artifact to Nexus3 in env Gradle7+ failed. the env: id : 'maven-publish' gradle-7.3-rc-3-bin com.android.tools.build:gradle:7.0.3 Nexus:nexus-3.35.0-02 part gradle code: publishing{ publications{ …
0
votes
0 answers

Is it possible to include some maven url to an AAR?

Example Suppose that some library module depends on Foo maven url (ex jitpack etc not mavencentral or google). Then it publish It’s library module, when the user use the library, I want to avoid having to add to users use it Foo maven url to…
kwmt
  • 134
  • 1
  • 2
  • 9
0
votes
2 answers

How to solve the problem of invalid POM file when gradle uploads jar to maven repository of nexus?

When I use the gradle plug-in maven pbulish to upload jars to the Maven repository, how can I exclude some dependencies in the gradle project? My gradle. Build file is as follows: dependencies { compile project(":frame:f_frame"); compile…
0
votes
2 answers

How to make aar the default artifact in your library

I need to publish a library on Sonatype, on our own server at the company. I've used maven-publish plugin with the following implementation. apply plugin: 'maven-publish' task androidSourcesJar(type: Jar) { archiveClassifier.set('sources') …
0
votes
1 answer

Android maven-publish generated pom file has incorrect dependency information for local project dependencies

I've got a library (Lib1) that depends on several other libraries (Lib2 and Lib3) that I build from source alongside Lib1. All three are published as artifacts, with artifact ids my-artifact-lib1, my-artifact-lib2, and my-artifact-lib3…
CCJ
  • 1,619
  • 26
  • 41
0
votes
2 answers

Exclude dependency from pom using Maven Publish Plugin?

I use the following plugins: id 'maven-publish' id "com.github.johnrengelman.shadow" version "7.0.0" my dependencies: dependencies { shadow gradleApi() shadow localGroovy() implementation 'com.example:lib:0.1.0' my publishing…
pixel
  • 24,905
  • 36
  • 149
  • 251
0
votes
0 answers

How can I override variables in the maven-publish publishing/publications closure?

My project structure is root |-- build.gradle |-- gradle.properties |-- settings.gradle |-- module1 |-- build.gradle.kts |-- src |-- main |-- java |-- kotlin |-- resources |-- test …
Eric Kolotyluk
  • 1,958
  • 2
  • 21
  • 30
0
votes
1 answer

How to rename jar file that's being published using Gradle with maven-publish and shadow plugins?

Basically what I'm trying to do is publish a jar file to GitHub Packages with a certain name. What I have now is: shadowJar { archiveFileName = "Some-Name-${parent.version}.${extension}" } publishing { ... publications { …
Lynx
  • 105
  • 9
0
votes
1 answer

Failing to upload a local aar file to artifactory using gradle

I have a simple problem which I have not been able to solve. I have downloaded an external .aar file that I want to upload to our in house Artifactory. But I havent been able to solve the problem at all. Here is my build.gradle file buildscript { …
0
votes
1 answer

How to access extra properties from project build.gradle in modules

So I'm trying to setup Maven Publish in my library which has several modules in it. I am following this tutorial since the whole process is imo not that well documented on the Android Documentation. However, I am stuck at the point Customizing POM…
hullunist
  • 1,117
  • 2
  • 11
  • 31
0
votes
1 answer

How can I add docstrings to android maven-publish .aar files in build.gradle.kts?

I have a project with the standard java library and this creates several .jar files, one being a docset and another the source set. Now I have successfully created an android-library using the maven-publish plugin, but when I add the .aar files to…