Update multidex dist task to build and zip maven repository instead of just aar.
Bug: 36122649
Test: ./gradlew clean dist
Change-Id: Ia7ace388ba72abff4a167552628b892cae024f7c
diff --git a/build.gradle b/build.gradle
index 3a5ed75..10fac34 100644
--- a/build.gradle
+++ b/build.gradle
@@ -66,9 +66,18 @@
// upload anchor for subprojects to upload their artifacts
// to the local repo.
-task(dist) {
+task dist(type: Zip) {
group = BasePlugin.BUILD_GROUP
description 'Builds distribution artifacts.'
+
+ from project.ext.supportRepoOut
+ into 'm2repository'
+ destinationDir project.ext.distDir
+ baseName = String.format("top-of-tree-m2repository-%s", project.multidexVersion)
+
+ doLast {
+ logger.warn "Compressed maven artifacts to ${archivePath}"
+ }
}
subprojects {
@@ -89,18 +98,7 @@
}
}
- task createArtifactZip(type: Zip, dependsOn: release) {
- from release.artifacts
- into archivesBaseName
- destinationDir project.parent.distDir
- baseName = archivesBaseName
-
- doLast {
- logger.warn "Compressed maven artifacts to ${archivePath}"
- }
- }
-
- dist.dependsOn createArtifactZip
+ dist.dependsOn release
project.plugins.whenPluginAdded { plugin ->
if ("com.android.build.gradle.LibraryPlugin".equals(plugin.class.name)) {