Merge "Disable unused features in AGP" into androidx-master-dev
diff --git a/ads/ads-identifier-common/build.gradle b/ads/ads-identifier-common/build.gradle
index 5a9cdc9..264dff2 100644
--- a/ads/ads-identifier-common/build.gradle
+++ b/ads/ads-identifier-common/build.gradle
@@ -36,10 +36,9 @@
}
android {
- defaultConfig {
- minSdkVersion 14
+ buildFeatures {
+ aidl = true
}
-
testOptions.unitTests.includeAndroidResources = true
}
diff --git a/ads/ads-identifier-provider/build.gradle b/ads/ads-identifier-provider/build.gradle
index 78adc18..d412cd9 100644
--- a/ads/ads-identifier-provider/build.gradle
+++ b/ads/ads-identifier-provider/build.gradle
@@ -42,12 +42,6 @@
androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
}
-android {
- defaultConfig {
- minSdkVersion 14
- }
-}
-
androidx {
name = "AndroidX Ads Identifier Provider"
publish = Publish.SNAPSHOT_AND_RELEASE
diff --git a/ads/ads-identifier/build.gradle b/ads/ads-identifier/build.gradle
index 6148a57..c28cbdf 100644
--- a/ads/ads-identifier/build.gradle
+++ b/ads/ads-identifier/build.gradle
@@ -45,10 +45,6 @@
}
android {
- defaultConfig {
- minSdkVersion 14
- }
-
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
diff --git a/browser/browser/build.gradle b/browser/browser/build.gradle
index 67232b5..5359fed 100644
--- a/browser/browser/build.gradle
+++ b/browser/browser/build.gradle
@@ -12,7 +12,9 @@
defaultConfig {
minSdkVersion 16
}
-
+ buildFeatures {
+ aidl = true
+ }
testOptions.unitTests.includeAndroidResources = true
}
diff --git a/buildSrc/src/main/kotlin/androidx/build/AndroidXPlugin.kt b/buildSrc/src/main/kotlin/androidx/build/AndroidXPlugin.kt
index eea06c2..325760c 100644
--- a/buildSrc/src/main/kotlin/androidx/build/AndroidXPlugin.kt
+++ b/buildSrc/src/main/kotlin/androidx/build/AndroidXPlugin.kt
@@ -356,14 +356,6 @@
buildType.signingConfig = debugSigningConfig
}
- // Disable generating BuildConfig.java
- // TODO remove after https://issuetracker.google.com/72050365
- variants.all { variant ->
- variant.generateBuildConfigProvider.configure {
- it.enabled = false
- }
- }
-
project.configureErrorProneForAndroid(variants)
// Set the officially published version to be the debug version with minimum dependency
diff --git a/camera/camera-extensions/build.gradle b/camera/camera-extensions/build.gradle
index ebc2149..b0401cc 100644
--- a/camera/camera-extensions/build.gradle
+++ b/camera/camera-extensions/build.gradle
@@ -61,19 +61,15 @@
buildConfigField "String", "CAMERA_VERSION", "\"1.1.0\""
}
+ buildFeatures {
+ // Enable generating BuildConfig.java since support library default disable it.
+ buildConfig = true
+ }
// Use Robolectric 4.+
testOptions.unitTests.includeAndroidResources = true
}
-// Enable generating BuildConfig.java since support library default disable it.
-// Need to track on https://issuetracker.google.com/issues/72050365
-android.libraryVariants.all { variant ->
- variant.generateBuildConfigProvider.configure {
- it.enabled = true
- }
-}
-
androidx {
name = "Jetpack Camera Library OEM Extensions"
publish = Publish.SNAPSHOT_AND_RELEASE
diff --git a/core/core/build.gradle b/core/core/build.gradle
index c2cf1da..7790a23 100644
--- a/core/core/build.gradle
+++ b/core/core/build.gradle
@@ -41,6 +41,9 @@
}
android {
+ buildFeatures {
+ aidl = true
+ }
testOptions.unitTests.includeAndroidResources = true
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_7
diff --git a/gradle.properties b/gradle.properties
index 80ef0f4..b57fa1b 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -13,3 +13,10 @@
# Workaround for b/141364941
android.forceJacocoOutOfProcess=true
androidx.writeVersionedApiFiles=true
+
+# Disable features we do not use
+android.defaults.buildfeatures.aidl=false
+android.defaults.buildfeatures.buildconfig=false
+android.defaults.buildfeatures.renderscript=false
+android.defaults.buildfeatures.resvalues=false
+android.defaults.buildfeatures.shaders=false
\ No newline at end of file
diff --git a/media/media/build.gradle b/media/media/build.gradle
index 7ebfb90..984f335 100644
--- a/media/media/build.gradle
+++ b/media/media/build.gradle
@@ -21,6 +21,9 @@
}
android {
+ buildFeatures {
+ aidl = true
+ }
sourceSets {
main.java.srcDirs += [
]
diff --git a/media2/common/build.gradle b/media2/common/build.gradle
index ab02530..c1e16c4 100644
--- a/media2/common/build.gradle
+++ b/media2/common/build.gradle
@@ -27,7 +27,9 @@
defaultConfig {
minSdkVersion 16
}
-
+ buildFeatures {
+ aidl = true
+ }
buildTypes.all {
consumerProguardFiles 'proguard-rules.pro'
}
diff --git a/media2/session/build.gradle b/media2/session/build.gradle
index ce7f481..20bada8 100644
--- a/media2/session/build.gradle
+++ b/media2/session/build.gradle
@@ -29,6 +29,9 @@
defaultConfig {
minSdkVersion 16
}
+ buildFeatures {
+ aidl = true
+ }
}
androidx {
diff --git a/media2/session/version-compat-tests/common/build.gradle b/media2/session/version-compat-tests/common/build.gradle
index e831c2a..240bc5c 100644
--- a/media2/session/version-compat-tests/common/build.gradle
+++ b/media2/session/version-compat-tests/common/build.gradle
@@ -21,6 +21,12 @@
id("com.android.library")
}
+android {
+ buildFeatures {
+ aidl = true
+ }
+}
+
dependencies {
api(project(":annotation:annotation"))
api(project(":versionedparcelable:versionedparcelable"))
diff --git a/room/integration-tests/testapp/build.gradle b/room/integration-tests/testapp/build.gradle
index cfe99c8..711cc66 100644
--- a/room/integration-tests/testapp/build.gradle
+++ b/room/integration-tests/testapp/build.gradle
@@ -39,6 +39,9 @@
}
}
}
+ buildFeatures {
+ aidl = true
+ }
sourceSets {
androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
androidTest.assets.srcDirs += files("$projectDir/databases".toString())
diff --git a/room/runtime/build.gradle b/room/runtime/build.gradle
index 8322906..6541fcc 100644
--- a/room/runtime/build.gradle
+++ b/room/runtime/build.gradle
@@ -27,6 +27,9 @@
}
android {
+ buildFeatures {
+ aidl = true
+ }
buildTypes.all {
consumerProguardFiles 'proguard-rules.pro'
}
diff --git a/ui/gradle.properties b/ui/gradle.properties
index 86d6499..afc396f 100644
--- a/ui/gradle.properties
+++ b/ui/gradle.properties
@@ -14,3 +14,10 @@
androidx.writeVersionedApiFiles=true
androidx.studio.type=compose
+
+# Disable features we do not use
+android.defaults.buildfeatures.aidl=false
+android.defaults.buildfeatures.buildconfig=false
+android.defaults.buildfeatures.renderscript=false
+android.defaults.buildfeatures.resvalues=false
+android.defaults.buildfeatures.shaders=false
\ No newline at end of file
diff --git a/versionedparcelable/versionedparcelable/build.gradle b/versionedparcelable/versionedparcelable/build.gradle
index 2dcfbdc..f4fd9d2 100644
--- a/versionedparcelable/versionedparcelable/build.gradle
+++ b/versionedparcelable/versionedparcelable/build.gradle
@@ -43,6 +43,9 @@
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
+ buildFeatures {
+ aidl = true
+ }
buildTypes.all {
consumerProguardFiles("proguard-rules.pro")
}
diff --git a/window/window/build.gradle b/window/window/build.gradle
index 281aa97..33a41d2 100644
--- a/window/window/build.gradle
+++ b/window/window/build.gradle
@@ -33,8 +33,6 @@
android {
defaultConfig {
minSdkVersion 16
-
- buildConfigField "String", "WINDOW_LIB_VERSION", "\"${LibraryVersions.WINDOW}\""
}
buildTypes.all {
consumerProguardFiles 'proguard-rules.pro'