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
10
votes
2 answers

why android gradle maven publish artifact bundleRelease not found

When i sync project, android studio warn could not get unknown property 'bundleRelease' for object of type org.gradle.api.publish.maven.internal.publication.DefaultMavenPublication. I add project.afterEvaluate{//block},but it doesn't work. What…
neuyuandaima
  • 403
  • 1
  • 5
  • 13
10
votes
1 answer

Unresolved reference from gradle maven dependency via s3

I try to publish a library to a private S3 maven repository. The upload is guarded by a password, but for download the library is open for public. The aar file uploads without issues (along with pom/md5/sha1) and I can see it in my S3 bucket,…
Michał Klimczak
  • 12,674
  • 8
  • 66
  • 99
10
votes
1 answer

Gradle maven-publish plugin produces pom with no dependencies

I have a project which has a SharedCode (Java) module and secondly an Android (Android library) module which depends on the SharedCode module. I've previously been using the maven plugin in my build.gradle files and I've been using the…
Adil Hussain
  • 30,049
  • 21
  • 112
  • 147
9
votes
3 answers

IDEA can't download sources for my library

I have a library (my own) in a private maven repo. I ship it there with javadoc and sources: In my app I've declared this repo: dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { …
artem
  • 16,382
  • 34
  • 113
  • 189
9
votes
1 answer

Gradle Maven publish to nexus delombok source code

I'm using following setup: gradle 5.2.1 nexus publish lombok 1.18.6 lombok gradle plugin io.freefair.lombok 3.1.4 I would like to upload sourceJar to nexus after delombok is done. For maven publishing I use the following: task javadocJar(type:…
8
votes
0 answers

Publish Android library with another module as dependency

I have project structure with 3 modules: :library, :shared and :internal. Dependencies between them are following: :library --depends on--> :internal via implementation :library --depends on--> :shared via api :internal --depends on--> :shared via…
serpenheir
  • 81
  • 5
8
votes
1 answer

Could not transfer artifact pom in gradle maven-publish plugin

I use the gradle (2.9) maven-publish plugin to publish a file to a private nexus maven repo. The build.gradle file is apply plugin: 'maven-publish' publishing { repositories { maven { name "example-maven" url…
matteo rulli
  • 1,443
  • 2
  • 18
  • 30
8
votes
1 answer

How to include .aar dependency into Android library .aar file

I write some library, which has a portion of UI. Also, this library uses another libraries. I want to provide release .aar to use this portion of UI in any App. My library has next dependecies: compile 'com.android.support:appcompat-v7:23.1.1' …
Aleksandr
  • 4,906
  • 4
  • 32
  • 47
7
votes
1 answer

Remove "-all" suffix in name of JAR, when it is published by maven-publish gradle plugin

maven-publish plugin posts JAR with name in format of "project-1.0-all.jar" I used Maven, everything was OK. Now I've migrated to Gradle with maven-publish plugin. Here is my publishing Gradle build-script section publishing { …
Commander Tvis
  • 2,244
  • 2
  • 15
  • 41
6
votes
1 answer

Publish SNAPSHOT to GitHub Packages with Gradle

I'm having a hard time publishing a Java library in its 0.0.1-SNAPSHOT version to GitHub Packages. The library is a Gradle project. It would appear that, when the version is not on GitHub (yet), it gets created successfully, however after that, it…
6
votes
0 answers

Publishing projects with subproject dependencies to maven by using Gradle maven-publish plugin

I have a gradle multiproject with the following structure: root │ ├── core-library │ └── build.gradle │ ├── additional-feature-library │ │ │ ├── entities │ │ └── build.gradle │ │ │ └── build.gradle │ ├── sample-android-app │ └──…
Sartre
  • 143
  • 1
  • 2
  • 13
6
votes
0 answers

I want to publish multiple artifacts with different names with gradle and maven-publish

I have a library containing usual classes and those especially for unit tests. So I want to publish two separate artifacts from the same project. My working solution with the maven plugin looks like this: task jarTest (type: Jar, dependsOn:…
Patrick
  • 264
  • 2
  • 8
6
votes
2 answers

Missing checksum files when using Gradle maven-publish and signing plugins

I have a Java project that makes use of Gradle to build and package. My purpose is to create artifacts that are published to Maven Central. As a first step, I configured my Gradle project as shown in the following example from the…
Laurent
  • 14,122
  • 13
  • 57
  • 89
6
votes
5 answers

Excluding one or two sub-projects from publication in gradle

I have a multi-project gradle build and I have applied the maven-publish plugin to all subprojects in my master build file. I have also defined a default publication there called mavenJava. This is all fine and now when I run ./gradlew…
StFS
  • 1,639
  • 2
  • 15
  • 31
6
votes
6 answers

Get uri of published artifact using maven-publish gradle plugin

After a publish, I want to know what the url of the published artifact is (to use it in other gradle tasks for automated deployment). Is there any way to capture this generated url?
Anthony De Smet
  • 2,265
  • 3
  • 17
  • 24
1
2
3
14 15