Create AndroidLibraryPlugin to share common module configuration.
First step in cleaning up duplicate code in build.gradle config files.
This CL relands ag/1746409 that had to be reverted due to not listing all the maven
repositories in buildSrc/build.gradle.
Bug: 33845666
Test: ./gradlew clean assemble assembleAndroidTest continues to work
Change-Id: I335c4366a015efa7eab880cd8d01659c41f1abb2
diff --git a/wearable/build.gradle b/wearable/build.gradle
index 3741584..f247d8c 100644
--- a/wearable/build.gradle
+++ b/wearable/build.gradle
@@ -1,4 +1,4 @@
-apply plugin: 'com.android.library'
+apply plugin: android.support.SupportLibraryPlugin
archivesBaseName = 'wearable'
dependencies {
@@ -25,23 +25,11 @@
defaultConfig {
minSdkVersion 20
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
sourceSets {
- main.manifest.srcFile 'AndroidManifest.xml'
main.java.srcDir 'src'
main.res.srcDirs 'res', 'res-public'
-
- androidTest.setRoot('tests')
- androidTest.java.srcDir 'tests/src'
- androidTest.res.srcDir 'tests/res'
- androidTest.manifest.srcFile 'tests/AndroidManifest.xml'
- }
-
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_7
- targetCompatibility JavaVersion.VERSION_1_7
}
buildTypes.all {