Last active
May 4, 2020 15:05
-
-
Save chenzhang2006/b73690ca4bb6c6550d4520aff06d91c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
publications { | |
droidlib2(MavenPublication) { | |
groupId LIB_GROUP_ID | |
artifactId LIB_ARTIFACT_ID | |
version LIB_VERSION | |
artifact("$buildDir/outputs/aar/droidlibrary2-release.aar") | |
artifact(sourceJar) | |
pom.withXml { | |
def dependenciesNode = asNode().appendNode('dependencies') | |
//Iterate over the compile dependencies (we don't want the test ones), adding a <dependency> node for each | |
configurations.api.allDependencies.each { | |
def dependencyNode = dependenciesNode.appendNode('dependency') | |
dependencyNode.appendNode('groupId', it.group) | |
dependencyNode.appendNode('artifactId', it.name) | |
dependencyNode.appendNode('version', it.version) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment