This was one of the first plugins that we (well Chris really) wrote. It addresses the following deficiencies within the gradle ecosystem.
Later on, we added support for
In your root build.gradle
allprojects {
project.group = ( project.hasProperty('pom.groupId')
? project.property('pom.groupId') : "" )
project.version =
( project.hasProperty('pom.version') ? project.property('pom.version') : "1.0" )
apply from: 'https://raw.githubusercontent.com/gradle-fury/gradle-fury/master/gradle/maven-support.gradle'
}
Sorry for the boiler plate, copy and paste code. Maybe one day we'll find a way to clean it up.
gradle.properties
, fill out all the pom details if publishing (both to maven local via the install
task and to nexus via the publishArtifacts
task.
optional
install
Publishes to maven local for all artifacts with variants/flavors and distZip artifacts
publishArtifacts
Publishes to a remove nexus repo
Generates javadocs for all projects, android and java, with optionally uml graphics and with support for doc-html folders.
Generates source jars for all projects, android and java.
application
or distribution
pluginsThere's few special cases that we handle in order to generate valid pom files to be able to publish to both local maven and a remove maven repo. Long story short, if you used to run distZip
, it's probably no longer necessary. Just run gradlew install