Author: Markus Koschany <apo@debian.org>
        Kai-Chung Yan <seamlikok@gmail.com>
Last-Update: 2016-07-19
Forwarded: not-needed
Description: Patch upstream's build system for Debian.
 This patch does the following:
 .
 * Remove tests projects
 * Remove the usage of unavailable custom plugins
 * Let Gradle build it using local artifacts in Debian
 * Build com.android.tools.build.profile.jar as a JAR instead of sourcesOnly JAR
 * Make the build scripts compatible with the latest Gradle
--- a/annotations/build.gradle
+++ b/annotations/build.gradle
@@ -1,5 +1,4 @@
 apply plugin: 'java'
-apply plugin: 'sdk-java-lib'
 
 sourceCompatibility = JavaVersion.VERSION_1_6
 targetCompatibility = JavaVersion.VERSION_1_6
@@ -10,7 +9,3 @@
 
 project.ext.pomName = 'Android Tools Annotations library'
 project.ext.pomDesc = 'annotations used throughout the Android tools libraries.'
-
-apply from: "$rootDir/buildSrc/base/publish.gradle"
-apply from: "$rootDir/buildSrc/base/bintray.gradle"
-apply from: "$rootDir/buildSrc/base/javadoc.gradle"
--- a/asset-studio/build.gradle
+++ b/asset-studio/build.gradle
@@ -1,6 +1,5 @@
 apply plugin: 'java'
-apply plugin: 'jacoco'
-apply plugin: 'sdk-java-lib'
+
 
 group = 'com.android.tools'
 archivesBaseName = 'asset-studio'
--- a/build-system/builder-model/build.gradle
+++ b/build-system/builder-model/build.gradle
@@ -1,6 +1,5 @@
 apply plugin: 'java'
-apply plugin: 'clone-artifacts'
-apply plugin: 'sdk-java-lib'
+
 
 dependencies {
     compile project(':base:annotations')
@@ -22,13 +21,9 @@
 sourceCompatibility = JavaVersion.VERSION_1_6
 targetCompatibility = JavaVersion.VERSION_1_6
 
-apply from: "$rootDir/buildSrc/base/publish.gradle"
-apply from: "$rootDir/buildSrc/base/bintray.gradle"
-apply from: "$rootDir/buildSrc/base/javadoc.gradle"
 
 ["Model-Version": version, "Model-Api-Version": apiVersion].each { key, value ->
     jar.manifest.attributes((key): value)
-    sdkJar.manifest.attributes((key): value)
 }
 
 def generated = new File("${project.buildDir}/generated/java")
@@ -60,4 +55,4 @@
 """
 }
 
-tasks.compileJava.dependsOn generateVersionConstantsJava
\ No newline at end of file
+tasks.compileJava.dependsOn generateVersionConstantsJava
--- a/build-system/builder-test-api/build.gradle
+++ b/build-system/builder-test-api/build.gradle
@@ -1,6 +1,4 @@
 apply plugin: 'java'
-apply plugin: 'jacoco'
-apply plugin: 'clone-artifacts'
 
 dependencies {
     compile project(':base:ddmlib')
@@ -15,7 +13,3 @@
 project.ext.pomName = 'Android Builder Test API library'
 project.ext.pomDesc = 'API for the Test extension point in the Builder library.'
 
-apply from: "$rootDir/buildSrc/base/publish.gradle"
-apply from: "$rootDir/buildSrc/base/bintray.gradle"
-apply from: "$rootDir/buildSrc/base/javadoc.gradle"
-
--- a/build-system/builder/build.gradle
+++ b/build-system/builder/build.gradle
@@ -1,5 +1,4 @@
 apply plugin: 'java'
-apply plugin: 'clone-artifacts'
 apply plugin: 'jacoco'
 
 evaluationDependsOn(':base:builder-model')
@@ -8,6 +7,7 @@
 dependencies {
     compile project(':base:builder-model')
     compile project(':base:builder-test-api')
+    compile project(':base:profile')
 
     compile project(':base:sdklib')
     compile project(':base:sdk-common')
@@ -32,7 +32,7 @@
     testCompile 'org.mockito:mockito-all:1.9.5'
     testCompile 'com.google.truth:truth:0.28'
     testCompile project(':base:testutils')
-    testCompile project(':base:sdklib').sourceSets.test.output
+    testCompile project(':base:sdklib')
 }
 
 test {
@@ -46,9 +46,6 @@
 project.ext.pomName = 'Android Builder library'
 project.ext.pomDesc = 'Library to build Android applications.'
 
-apply from: "$rootDir/buildSrc/base/publish.gradle"
-apply from: "$rootDir/buildSrc/base/bintray.gradle"
-apply from: "$rootDir/buildSrc/base/javadoc.gradle"
 
 jar.manifest.attributes("Builder-Version": version)
 
@@ -58,6 +55,7 @@
     main {
         java {
             srcDir generated
+            srcDir '../profile/src/main/java'
         }
     }
 }
@@ -101,26 +99,3 @@
     sourcesProvided
 }
 
-dependencies {
-    provided(project(':base:profile')) {
-        transitive = false
-    }
-    sourcesProvided(project(path:':base:profile', configuration:'sourcesOnly')) {
-        transitive = false
-    }
-}
-
-sourceSets.main.compileClasspath += [configurations.provided]
-sourceSets.test.runtimeClasspath += [configurations.provided]
-tasks.compileJava.dependsOn(configurations.provided)
-tasks.sourcesJar.dependsOn(configurations.sourcesProvided)
-
-tasks.jar {
-    from({zipTree(configurations.provided.singleFile)})
-}
-tasks.sourcesJar {
-    from({zipTree(configurations.sourcesProvided.singleFile)})
-}
-javadoc {
-    classpath += configurations.provided
-}
\ No newline at end of file
--- a/build-system/google-services/build.gradle
+++ b/build-system/google-services/build.gradle
@@ -1,5 +1,4 @@
 apply plugin: 'groovy'
-apply plugin: 'clone-artifacts'
 apply plugin: 'idea'
 apply plugin: 'jacoco'
 
@@ -28,18 +27,9 @@
     docTitle "Gradle Plugin for Google Services"
     header ""
     footer "Copyright (C) 2015 The Android Open Source Project"
-    overview ""
 }
 
 task javadocJar(type: Jar, dependsOn:groovydoc) {
     classifier  'javadoc'
     from        groovydoc.destinationDir
 }
-
-// Only package JavaDoc if using --init-script=buildSrc/base/release.gradle
-if (project.has("release")) {
-  artifacts {
-    archives javadocJar
-  }
-}
-
--- a/build-system/gradle-core/build.gradle
+++ b/build-system/gradle-core/build.gradle
@@ -1,6 +1,5 @@
 apply plugin: 'groovy'
 apply plugin: 'jacoco'
-apply plugin: 'clone-artifacts'
 apply plugin: 'antlr'
 
 configurations {
@@ -35,7 +34,7 @@
     // TODO: Switch to remote dependency once the empty deprecated transform-api is published
     compile project(':base:transform-api')
     compile project(':base:gradle-api')
-    compile project(':dataBinding:compilerCommon')
+    compile 'com.android.databinding:compilerCommon:debian'
     compile 'org.ow2.asm:asm:5.0.4'
     compile 'org.ow2.asm:asm-commons:5.0.4'
     compile "net.sf.proguard:proguard-gradle:${project.ext.proguardVersion}"
@@ -50,6 +49,7 @@
     // Add gradleApi to classpath for compilation, but use provided configuration so that groovy is
     // not exposed as a runtime dependency.
     provided gradleApi()
+    compile localGroovy()
 
     // Exclude plugins/core-* to avoiding adding Gradle's ecj implementation to the classpath
     testCompile fileTree(
@@ -82,8 +82,6 @@
 project.ext.pomName = 'Core Library for Android Gradle Plug-in'
 project.ext.pomDesc = 'Core library to build Android Gradle plugin.'
 
-apply from: "$rootDir/buildSrc/base/publish.gradle"
-apply from: "$rootDir/buildSrc/base/bintray.gradle"
 
 test {
     environment("CUSTOM_REPO", rootProject.file("../out/repo"))
@@ -102,7 +100,6 @@
     docTitle "Gradle Plugin for Android"
     header ""
     footer "Copyright (C) 2012 The Android Open Source Project"
-    overview ""
 
     groovyClasspath = configurations.provided
 }
@@ -117,12 +114,6 @@
     classpath += configurations.provided
 }
 
-// Only package JavaDoc if using --init-script=buildSrc/base/release.gradle
-if (project.has("release")) {
-    artifacts {
-        archives javadocJar
-    }
-}
 
 // Incremental update test support
 File androidJar = file('../../../../prebuilts/sdk/23/android.jar');
--- a/build-system/gradle-experimental/build.gradle
+++ b/build-system/gradle-experimental/build.gradle
@@ -1,7 +1,4 @@
 apply plugin: 'groovy'
-apply plugin: 'clone-artifacts'
-apply plugin: 'idea'
-apply plugin: 'jacoco'
 
 // Extract gradle libraries to ensure gradle-core is compatible with older version.
 String gradleVersion = "2.14.1"
@@ -32,8 +29,6 @@
 project.ext.pomName = 'Gradle Plug-in for Android Using Component Model'
 project.ext.pomDesc = 'Gradle plug-in to build Android applications.'
 
-apply from: "$rootDir/buildSrc/base/publish.gradle"
-apply from: "$rootDir/buildSrc/base/bintray.gradle"
 
 jar.manifest.attributes("Plugin-Version": version)
 jar.manifest.attributes("Inception-Date":"${Calendar.getInstance().get(Calendar.YEAR)}:" +
@@ -87,7 +82,6 @@
     docTitle "Gradle Plugin for Android"
     header ""
     footer "Copyright (C) 2012 The Android Open Source Project"
-    overview ""
 }
 
 task javadocJar(type: Jar, dependsOn:groovydoc) {
@@ -99,11 +93,4 @@
     classpath += fileTree(dir:gradleLib)
 }
 
-// Only package JavaDoc if using --init-script=buildSrc/base/release.gradle
-if (project.has("release")) {
-  artifacts {
-    archives javadocJar
-  }
-}
-
 check.dependsOn javadocJar, javadoc
--- a/build-system/gradle/build.gradle
+++ b/build-system/gradle/build.gradle
@@ -1,8 +1,4 @@
 apply plugin: 'groovy'
-apply plugin: 'clone-artifacts'
-apply plugin: 'idea'
-apply plugin: 'jacoco'
-apply plugin: 'license-report'
 
 dependencies {
     compile project(':base:gradle-core')
@@ -20,9 +16,6 @@
 project.ext.pomName = 'Gradle Plug-in for Android'
 project.ext.pomDesc = 'Gradle plug-in to build Android applications.'
 
-apply from: "$rootDir/buildSrc/base/publish.gradle"
-apply from: "$rootDir/buildSrc/base/bintray.gradle"
-
 jar.manifest.attributes("Plugin-Version": version)
 jar.manifest.attributes("Inception-Date":"${Calendar.getInstance().get(Calendar.YEAR)}:" +
         "${Calendar.getInstance().get(Calendar.MONTH)}:${Calendar.getInstance().get(Calendar.DATE)}")
@@ -76,17 +69,9 @@
     docTitle "Gradle Plugin for Android"
     header ""
     footer "Copyright (C) 2012 The Android Open Source Project"
-    overview ""
 }
 
 task javadocJar(type: Jar, dependsOn:groovydoc) {
     classifier  'javadoc'
     from        groovydoc.destinationDir
 }
-
-// Only package JavaDoc if using --init-script=buildSrc/base/release.gradle
-if (project.has("release")) {
-  artifacts {
-    archives javadocJar
-  }
-}
--- a/build-system/manifest-merger/build.gradle
+++ b/build-system/manifest-merger/build.gradle
@@ -1,6 +1,6 @@
 apply plugin: 'java'
 apply plugin: 'jacoco'
-apply plugin: 'sdk-java-lib'
+
 
 evaluationDependsOn(':base:sdklib')
 
@@ -32,7 +32,4 @@
 project.ext.pomName = 'Android Tools Manifest Merger library'
 project.ext.pomDesc = 'A Library to merge Android manifests.'
 
-apply from: "$rootDir/buildSrc/base/publish.gradle"
-apply from: "$rootDir/buildSrc/base/bintray.gradle"
-apply from: "$rootDir/buildSrc/base/javadoc.gradle"
 
--- a/ddmlib/build.gradle
+++ b/ddmlib/build.gradle
@@ -1,6 +1,6 @@
 apply plugin: 'java'
 apply plugin: 'jacoco'
-apply plugin: 'sdk-java-lib'
+
 
 group = 'com.android.tools.ddms'
 archivesBaseName = 'ddmlib'
@@ -23,6 +23,3 @@
 project.ext.pomName = 'Android Tools ddmlib'
 project.ext.pomDesc = 'Library providing APIs to talk to Android devices'
 
-apply from: "$rootDir/buildSrc/base/publish.gradle"
-apply from: "$rootDir/buildSrc/base/bintray.gradle"
-apply from: "$rootDir/buildSrc/base/javadoc.gradle"
--- a/device_validator/dvlib/build.gradle
+++ b/device_validator/dvlib/build.gradle
@@ -1,6 +1,6 @@
 apply plugin: 'java'
 apply plugin: 'jacoco'
-apply plugin: 'sdk-java-lib'
+
 
 dependencies {
     compile project(':base:common')
@@ -12,11 +12,7 @@
 version = rootProject.ext.baseVersion
 
 // configure the manifest of the sdkJar task
-sdkJar.manifest.attributes("Main-Class": "com.android.validator.DeviceValidator")
 
 project.ext.pomName = 'Android Tools dvlib'
 project.ext.pomDesc = 'A Library to manage the Android device database XML files.'
 
-apply from: "$rootDir/buildSrc/base/publish.gradle"
-apply from: "$rootDir/buildSrc/base/bintray.gradle"
-apply from: "$rootDir/buildSrc/base/javadoc.gradle"
--- a/draw9patch/build.gradle
+++ b/draw9patch/build.gradle
@@ -1,6 +1,6 @@
 apply plugin: 'java'
 apply plugin: 'jacoco'
-apply plugin: 'sdk-java-lib'
+
 
 group = 'com.android.tools'
 archivesBaseName = 'draw9patch'
@@ -15,16 +15,4 @@
     test.resources.srcDir 'src/test/java'
 }
 
-sdk {
-    linux {
-        item('etc/draw9patch') { executable true}
-    }
-    mac {
-        item('etc/draw9patch') { executable true}
-    }
-    windows {
-        item 'etc/draw9patch.bat'
-    }
-}
-
-sdkJar.manifest.attributes("Main-Class": "com.android.draw9patch.Application")
+jar.manifest.attributes("Main-Class": "com.android.draw9patch.Application")
--- a/jack/jack-api/build.gradle
+++ b/jack/jack-api/build.gradle
@@ -18,9 +18,6 @@
 project.ext.pomName = 'Android Jack API'
 project.ext.pomDesc = 'API to dynamically load Jack'
 
-apply from: "$rootDir/buildSrc/base/publish.gradle"
-apply from: "$rootDir/buildSrc/base/bintray.gradle"
-apply from: "$rootDir/buildSrc/base/javadoc.gradle"
 
 javadoc {
     classpath += configurations.provided
--- a/jack/jill-api/build.gradle
+++ b/jack/jill-api/build.gradle
@@ -17,9 +17,6 @@
 project.ext.pomName = 'Android Jill API'
 project.ext.pomDesc = 'API to dynamically load Jill'
 
-apply from: "$rootDir/buildSrc/base/publish.gradle"
-apply from: "$rootDir/buildSrc/base/bintray.gradle"
-apply from: "$rootDir/buildSrc/base/javadoc.gradle"
 
 javadoc {
     classpath += configurations.provided
--- a/jobb/build.gradle
+++ b/jobb/build.gradle
@@ -1,5 +1,5 @@
 apply plugin: 'java'
-apply plugin: 'sdk-java-lib'
+
 
 dependencies {
     compile project(':external:fat32lib')
@@ -10,21 +10,9 @@
 version = rootProject.ext.baseVersion
 
 // configure the manifest of the sdkJar task
-sdkJar.manifest.attributes("Main-Class": "com.android.jobb.Main")
-
-sdk {
-    linux {
-        item('etc/jobb') { executable true }
-    }
-    mac {
-        item('etc/jobb') { executable true }
-    }
-    windows {
-        item 'etc/jobb.bat'
-    }
-}
+jar.manifest.attributes("Main-Class": "com.android.jobb.Main")
 
 // turn off strict javadoc
 tasks.withType(Javadoc) {
     options.addStringOption('Xdoclint:none', '-quiet')
-}
\ No newline at end of file
+}
--- a/layoutlib-api/build.gradle
+++ b/layoutlib-api/build.gradle
@@ -1,6 +1,6 @@
 apply plugin: 'java'
 apply plugin: 'jacoco'
-apply plugin: 'sdk-java-lib'
+
 
 group = 'com.android.tools.layoutlib'
 archivesBaseName = 'layoutlib-api'
@@ -18,7 +18,4 @@
 project.ext.pomName = 'Android Tools layoutlib-api'
 project.ext.pomDesc = 'Library to use the rendering library for Android layouts: layoutlib'
 
-apply from: "$rootDir/buildSrc/base/publish.gradle"
-apply from: "$rootDir/buildSrc/base/bintray.gradle"
-apply from: "$rootDir/buildSrc/base/javadoc.gradle"
 
--- a/legacy/archquery/build.gradle
+++ b/legacy/archquery/build.gradle
@@ -1,9 +1,8 @@
 apply plugin: 'java'
-apply plugin: 'sdk-java-lib'
+
 
 group = 'com.android.tools'
 archivesBaseName = 'archquery'
 version = rootProject.ext.baseVersion
 
 // configure the manifest of the sdkJar task.
-sdkJar.manifest.attributes("Main-Class": "com.android.archquery.Main")
--- a/lint/cli/build.gradle
+++ b/lint/cli/build.gradle
@@ -1,6 +1,6 @@
 apply plugin: 'java'
 apply plugin: 'jacoco'
-apply plugin: 'sdk-java-lib'
+
 
 group = 'com.android.tools.lint'
 archivesBaseName = 'lint'
@@ -20,24 +20,11 @@
     maxParallelForks = Runtime.runtime.availableProcessors() / 2
 }
 
-sdk {
-    linux {
-        item('etc/lint') { executable true }
-    }
-    mac {
-        item('etc/lint') { executable true }
-    }
-    windows {
-        item 'etc/lint.bat'
-    }
-}
+
 
 // configure the manifest of the sdkJar task.
-sdkJar.manifest.attributes("Main-Class": "com.android.tools.lint.Main")
+jar.manifest.attributes("Main-Class": "com.android.tools.lint.Main")
 
 project.ext.pomName = 'Android Lint Tool'
 project.ext.pomDesc = 'Lint tools. Both a Command line tool and a library to add lint features to other tools'
 
-apply from: "$rootDir/buildSrc/base/publish.gradle"
-apply from: "$rootDir/buildSrc/base/bintray.gradle"
-apply from: "$rootDir/buildSrc/base/javadoc.gradle"
--- a/lint/libs/lint-api/build.gradle
+++ b/lint/libs/lint-api/build.gradle
@@ -1,6 +1,6 @@
 apply plugin: 'java'
 apply plugin: 'jacoco'
-apply plugin: 'sdk-java-lib'
+
 
 group = 'com.android.tools.lint'
 archivesBaseName = 'lint-api'
@@ -24,7 +24,4 @@
 project.ext.pomName = 'Android Tools Lint API'
 project.ext.pomDesc = 'API to build lint checks'
 
-apply from: "$rootDir/buildSrc/base/publish.gradle"
-apply from: "$rootDir/buildSrc/base/bintray.gradle"
-apply from: "$rootDir/buildSrc/base/javadoc.gradle"
 
--- a/lint/libs/lint-checks/build.gradle
+++ b/lint/libs/lint-checks/build.gradle
@@ -1,6 +1,6 @@
 apply plugin: 'java'
 apply plugin: 'jacoco'
-apply plugin: 'sdk-java-lib'
+
 
 group = 'com.android.tools.lint'
 archivesBaseName = 'lint-checks'
@@ -19,7 +19,4 @@
 project.ext.pomName = 'Android Lint Checks'
 project.ext.pomDesc = 'Checks for Android Lint'
 
-apply from: "$rootDir/buildSrc/base/publish.gradle"
-apply from: "$rootDir/buildSrc/base/bintray.gradle"
-apply from: "$rootDir/buildSrc/base/javadoc.gradle"
 
--- a/misc/screenshot2/build.gradle
+++ b/misc/screenshot2/build.gradle
@@ -1,5 +1,5 @@
 apply plugin: 'java'
-apply plugin: 'sdk-java-lib'
+
 
 group = 'com.android.tools'
 archivesBaseName = 'screenshot2'
@@ -9,14 +9,4 @@
     compile project(':base:ddmlib')
 }
 
-sdk {
-    linux {
-        item('etc/screenshot2') { executable true }
-    }
-    mac {
-        item('etc/screenshot2') { executable true }
-    }
-}
-
-// configure the manifest of the sdkJar task.
-sdkJar.manifest.attributes("Main-Class": "com.android.screenshot.Screenshot")
+jar.manifest.attributes("Main-Class": "com.android.screenshot.Screenshot")
--- a/sdk-common/build.gradle
+++ b/sdk-common/build.gradle
@@ -1,6 +1,5 @@
 apply plugin: 'java'
 apply plugin: 'jacoco'
-apply plugin: 'sdk-java-lib'
 
 group = 'com.android.tools'
 archivesBaseName = 'sdk-common'
@@ -24,7 +23,4 @@
 project.ext.pomName = 'Android Tools sdk-common library'
 project.ext.pomDesc = 'sdk-common library used by other Android tools libraries.'
 
-apply from: "$rootDir/buildSrc/base/publish.gradle"
-apply from: "$rootDir/buildSrc/base/bintray.gradle"
-apply from: "$rootDir/buildSrc/base/javadoc.gradle"
 
--- a/sdklib/build.gradle
+++ b/sdklib/build.gradle
@@ -1,8 +1,15 @@
+
+buildscript {
+  dependencies {
+    classpath 'com.google.guava:guava:debian'
+  }
+}
+
 import com.google.common.collect.ImmutableMap
 
 apply plugin: 'java'
 apply plugin: 'jacoco'
-apply plugin: 'sdk-java-lib'
+
 
 evaluationDependsOn(':base:dvlib')
 
@@ -118,7 +125,3 @@
 
 project.ext.pomName = 'Android Tools sdklib'
 project.ext.pomDesc = 'A library to parse and download the Android SDK.'
-
-apply from: "$rootDir/buildSrc/base/publish.gradle"
-apply from: "$rootDir/buildSrc/base/bintray.gradle"
-apply from: "$rootDir/buildSrc/base/javadoc.gradle"
--- a/testutils/build.gradle
+++ b/testutils/build.gradle
@@ -22,6 +22,3 @@
 project.ext.pomName = 'Android Tools Test Utilities'
 project.ext.pomDesc = 'API used by lint testing infrastructure'
 
-apply from: "$rootDir/buildSrc/base/publish.gradle"
-apply from: "$rootDir/buildSrc/base/bintray.gradle"
-apply from: "$rootDir/buildSrc/base/javadoc.gradle"
--- a/build.gradle
+++ b/build.gradle
@@ -1,3 +1,5 @@
+apply from: 'debian/version.gradle'
+
 subprojects { Project project ->
     // only configure leaf projects.
     if (!project.getSubprojects().isEmpty()) return
@@ -5,6 +7,13 @@
     // exclude aar projects.
     if ("fdr".equals(project.name)) return
 
-    apply from: "$rootDir/buildSrc/base/baseJava.gradle"
+    apply plugin: 'java'
+    apply from: "${rootDir}/debian/generateClasspath.gradle"
+
+    compileJava.options.encoding = 'UTF-8'
+
+    afterEvaluate {
+        jar.baseName = "${group}.${archivesBaseName}"
+    }
 }
 
--- a/build-system/gradle-api/build.gradle
+++ b/build-system/gradle-api/build.gradle
@@ -1,6 +1,4 @@
 apply plugin: 'java'
-apply plugin: 'jacoco'
-apply plugin: 'clone-artifacts'
 
 configurations {
     provided
@@ -39,8 +37,3 @@
 
 project.ext.pomName = 'Android Gradle API'
 project.ext.pomDesc = 'APIs to customize Android Gradle Builds'
-
-apply from: "$rootDir/buildSrc/base/publish.gradle"
-apply from: "$rootDir/buildSrc/base/bintray.gradle"
-apply from: "$rootDir/buildSrc/base/javadoc.gradle"
-
--- a/repository/build.gradle
+++ b/repository/build.gradle
@@ -1,6 +1,5 @@
 apply plugin: 'java'
 apply plugin: 'jacoco'
-apply plugin: 'sdk-java-lib'
 
 group = 'com.android.tools'
 archivesBaseName = 'repository'
@@ -30,10 +29,6 @@
 project.ext.pomName = 'Android Tools repository'
 project.ext.pomDesc = 'A library for downloading and managing package repositories'
 
-apply from: "$rootDir/buildSrc/base/publish.gradle"
-apply from: "$rootDir/buildSrc/base/bintray.gradle"
-apply from: "$rootDir/buildSrc/base/javadoc.gradle"
-
 tasks.withType(Javadoc) {
     options.addStringOption('Xdoclint:none', '-quiet')
 }
--- a/build-system/transform-api/build.gradle
+++ b/build-system/transform-api/build.gradle
@@ -22,8 +22,3 @@
 
 project.ext.pomName = 'Android Transform API'
 project.ext.pomDesc = 'Deprecated, use gradle-api'
-
-apply from: "$rootDir/buildSrc/base/publish.gradle"
-apply from: "$rootDir/buildSrc/base/bintray.gradle"
-apply from: "$rootDir/buildSrc/base/javadoc.gradle"
-
--- a/common/build.gradle
+++ b/common/build.gradle
@@ -1,6 +1,5 @@
 apply plugin: 'java'
 apply plugin: 'jacoco'
-apply plugin: 'sdk-java-lib'
 
 dependencies {
     compile project(':base:annotations')
@@ -16,7 +15,3 @@
 
 project.ext.pomName = 'Android Tools common library'
 project.ext.pomDesc = 'common library used by other Android tools libraries.'
-
-apply from: "$rootDir/buildSrc/base/publish.gradle"
-apply from: "$rootDir/buildSrc/base/bintray.gradle"
-apply from: "$rootDir/buildSrc/base/javadoc.gradle"
--- a/build-system/profile/build.gradle
+++ b/build-system/profile/build.gradle
@@ -6,6 +6,7 @@
     compile project(':base:common')
     compile 'com.google.guava:guava:17.0'
     compile 'com.google.code.gson:gson:2.2.4'
+    compile 'com.android.tools.analytics-library:protos:debian'
     compile 'com.android.tools.analytics-library:tracker:debian'
 
     testCompile 'junit:junit:4.12'
@@ -23,4 +24,6 @@
 
 artifacts {
     sourcesOnly sourcesJar
-}
\ No newline at end of file
+}
+
+group = 'com.android.tools.build'
