maven-publish

Gradle Artifactory Plugin - How to publish artifacts from multiple modules in a project?

☆樱花仙子☆ 提交于 2019-11-28 21:53:41
I have a project which has a SharedCode (Java) module and secondly an Android (Android library) module which depends on the SharedCode module. I want to publish a jar artifact from the SharedCode module and an aar artifact from the Android module. I can't figure out how to compose my build.gradle files so that both modules publish to Artifactory when the artifactoryPublish task is run. At the moment only the SharedCode module publishes its artifact to Artifactory. My build.gradle files are as below. Note that the maven-publish aspect of my build.gradle files appears to be correct because when

Gradle Artifactory Plugin - How to publish artifacts from multiple modules in a project?

喜夏-厌秋 提交于 2019-11-27 14:06:57
问题 I have a project which has a SharedCode (Java) module and secondly an Android (Android library) module which depends on the SharedCode module. I want to publish a jar artifact from the SharedCode module and an aar artifact from the Android module. I can't figure out how to compose my build.gradle files so that both modules publish to Artifactory when the artifactoryPublish task is run. At the moment only the SharedCode module publishes its artifact to Artifactory. My build.gradle files are as

Publish an Android library to Maven with aar and source jar

老子叫甜甜 提交于 2019-11-27 11:06:50
Can somebody give me a hint on how to use the maven-publish gradle plugin to publish a com.android.library project/module with aar and source jar? I am able to do this with the old maven plugin - but I would like to use the new maven-publish plugin. Here's a sample using the new maven-publish plugin. apply plugin: 'maven-publish' task sourceJar(type: Jar) { from android.sourceSets.main.java.srcDirs classifier "sources" } publishing { publications { bar(MavenPublication) { groupId 'com.foo' artifactId 'bar' version '0.1' artifact(sourceJar) artifact("$buildDir/outputs/aar/bar-release.aar") } }

Publish an Android library to Maven with aar and source jar

▼魔方 西西 提交于 2019-11-26 11:59:21
问题 Can somebody give me a hint on how to use the maven-publish gradle plugin to publish a com.android.library project/module with aar and source jar? I am able to do this with the old maven plugin - but I would like to use the new maven-publish plugin. 回答1: Here's a sample using the new maven-publish plugin. apply plugin: 'maven-publish' task sourceJar(type: Jar) { from android.sourceSets.main.java.srcDirs classifier "sources" } publishing { publications { bar(MavenPublication) { groupId 'com