diff --git a/Parse/build.gradle b/Parse/build.gradle index 9112a5466..9c9a12ac3 100644 --- a/Parse/build.gradle +++ b/Parse/build.gradle @@ -217,7 +217,7 @@ bintray { user = System.getenv('BINTRAY_USER') key = System.getenv('BINTRAY_API_KEY') - publications = ["MyPublication"] + publications = ["mavenAar"] publish = true pkg { @@ -244,35 +244,20 @@ bintray { } // Create the publication with the pom configuration: -apply plugin: 'maven-publish' +apply plugin: 'digital.wup.android-maven-publish' + publishing { publications { - MyPublication(MavenPublication) { + mavenAar(MavenPublication) { + from components.android groupId group // We have to specify it here because otherwise Bintray's plugin will assume the artifact's name is Parse artifactId artifact artifacts = [androidSourcesJar, javadocJarRelease, bundleRelease] version version - pom.withXml { - def root = asNode() - root.appendNode('description', projDescription) - root.appendNode('name', projName) - root.appendNode('url', gitLink) - root.children().last() + pomConfig - - // maven-publish workaround to include dependencies - def dependenciesNode = asNode().appendNode('dependencies') - - //Iterate over the compile dependencies (we don't want the test ones), adding a node for each - configurations.implementation.allDependencies.each { - def dependencyNode = dependenciesNode.appendNode('dependency') - dependencyNode.appendNode('groupId', it.group) - dependencyNode.appendNode('artifactId', it.name) - dependencyNode.appendNode('version', it.version) - } - - } + } + } } @@ -292,7 +277,7 @@ artifactory { } defaults { publishArtifacts = true - publications('MyPublication') + publications('mavenAar') } } } diff --git a/build.gradle b/build.gradle index b4a5e0000..c0333ade0 100644 --- a/build.gradle +++ b/build.gradle @@ -12,6 +12,7 @@ plugins { id "com.jfrog.artifactory" version "4.4.18" id "com.jfrog.bintray" version "1.7.3" id 'com.github.ben-manes.versions' version '0.17.0' + id 'digital.wup.android-maven-publish' version '3.2.0' // tweak depending on Gradle version } allprojects { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a2b98f6c6..7a0c91296 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists +# Make sure to update the version of android-maven-publish if you bump the Gradle version +# See: https://github.com/wupdigital/android-maven-publish distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip