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/v7/appcompat/build.gradle b/v7/appcompat/build.gradle
index 4935085..34095da 100644
--- a/v7/appcompat/build.gradle
+++ b/v7/appcompat/build.gradle
@@ -1,4 +1,4 @@
-apply plugin: 'com.android.library'
+apply plugin: android.support.SupportLibraryPlugin
archivesBaseName = 'appcompat-v7'
dependencies {
@@ -24,27 +24,15 @@
defaultConfig {
minSdkVersion 9
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// This disables the builds tools automatic vector -> PNG generation
generatedDensities = []
}
sourceSets {
- main.manifest.srcFile 'AndroidManifest.xml'
main.java.srcDir 'src'
main.res.srcDirs 'res', 'res-public'
main.assets.srcDir 'assets'
main.resources.srcDir 'src'
-
- 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
}
aaptOptions {