Merge "Enabling room variants now that they should work" into androidx-main
diff --git a/buildSrc/src/main/kotlin/androidx/build/AndroidXPlugin.kt b/buildSrc/src/main/kotlin/androidx/build/AndroidXPlugin.kt
index d72986e..4338afe 100644
--- a/buildSrc/src/main/kotlin/androidx/build/AndroidXPlugin.kt
+++ b/buildSrc/src/main/kotlin/androidx/build/AndroidXPlugin.kt
@@ -45,6 +45,7 @@
import com.android.build.gradle.TestExtension
import com.android.build.gradle.TestPlugin
import com.android.build.gradle.TestedExtension
+import com.android.build.gradle.internal.tasks.AnalyticsRecordingTask
import org.gradle.api.GradleException
import org.gradle.api.JavaVersion.VERSION_1_8
import org.gradle.api.Plugin
@@ -512,6 +513,12 @@
// lives alongside the project's buildDir.
externalNativeBuild.cmake.buildStagingDirectory =
File(project.buildDir, "../nativeBuildStaging")
+
+ // disable analytics recording
+ // It's always out-of-date, and we don't release any apps in this repo
+ project.tasks.withType(AnalyticsRecordingTask::class.java).configureEach { task ->
+ task.enabled = false
+ }
}
/**
diff --git a/buildSrc/src/main/kotlin/androidx/build/uptodatedness/TaskUpToDateValidator.kt b/buildSrc/src/main/kotlin/androidx/build/uptodatedness/TaskUpToDateValidator.kt
index d166949..b039c25 100644
--- a/buildSrc/src/main/kotlin/androidx/build/uptodatedness/TaskUpToDateValidator.kt
+++ b/buildSrc/src/main/kotlin/androidx/build/uptodatedness/TaskUpToDateValidator.kt
@@ -46,7 +46,6 @@
// Entries in this set do still get rerun because they might produce files that are needed by
// subsequent tasks
val ALLOW_RERUNNING_TASKS = setOf(
- "analyticsRecordingRelease",
"buildOnServer",
"checkExternalLicenses",
"createArchive",
@@ -182,6 +181,8 @@
"lintAnalyzeDebug",
"lintDebug",
"lintVitalRelease",
+ "lintWithExpandProjectionDebug",
+ "lintWithoutExpandProjectionDebug",
)
abstract class TaskUpToDateValidator :
diff --git a/room/integration-tests/kotlintestapp/build.gradle b/room/integration-tests/kotlintestapp/build.gradle
index 18bd746..6ef3c81 100644
--- a/room/integration-tests/kotlintestapp/build.gradle
+++ b/room/integration-tests/kotlintestapp/build.gradle
@@ -57,32 +57,31 @@
androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
}
-// TODO re-enable flavors when b/153917176 is fixed
-// flavorDimensions "processorConfiguration"
-// productFlavors {
-// withExpandProjection {
-// dimension "processorConfiguration"
-// javaCompileOptions {
-// annotationProcessorOptions {
-// arguments = [
-// "room.schemaLocation" : "$projectDir/schemas".toString(),
-// "room.expandProjection" : "true"
-// ]
-// }
-// }
-// }
-// withoutExpandProjection {
-// dimension "processorConfiguration"
-// javaCompileOptions {
-// annotationProcessorOptions {
-// arguments = [
-// "room.schemaLocation" : "$projectDir/schemas".toString(),
-// "room.expandProjection" : "false"
-// ]
-// }
-// }
-// }
-// }
+ flavorDimensions "processorConfiguration"
+ productFlavors {
+ withExpandProjection {
+ dimension "processorConfiguration"
+ javaCompileOptions {
+ annotationProcessorOptions {
+ arguments = [
+ "room.schemaLocation" : "$projectDir/schemas".toString(),
+ "room.expandProjection" : "true"
+ ]
+ }
+ }
+ }
+ withoutExpandProjection {
+ dimension "processorConfiguration"
+ javaCompileOptions {
+ annotationProcessorOptions {
+ arguments = [
+ "room.schemaLocation" : "$projectDir/schemas".toString(),
+ "room.expandProjection" : "false"
+ ]
+ }
+ }
+ }
+ }
}
dependencies {
diff --git a/room/integration-tests/testapp/build.gradle b/room/integration-tests/testapp/build.gradle
index 0733b6d..b68217d 100644
--- a/room/integration-tests/testapp/build.gradle
+++ b/room/integration-tests/testapp/build.gradle
@@ -44,32 +44,31 @@
androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
androidTest.assets.srcDirs += files("$projectDir/databases".toString())
}
-// TODO re-enable flavors when b/153917176 is fixed
-// flavorDimensions "processorConfiguration"
-// productFlavors {
-// withExpandProjection {
-// dimension "processorConfiguration"
-// javaCompileOptions {
-// annotationProcessorOptions {
-// arguments = [
-// "room.schemaLocation" : "$projectDir/schemas".toString(),
-// "room.expandProjection" : "true"
-// ]
-// }
-// }
-// }
-// withoutExpandProjection {
-// dimension "processorConfiguration"
-// javaCompileOptions {
-// annotationProcessorOptions {
-// arguments = [
-// "room.schemaLocation" : "$projectDir/schemas".toString(),
-// "room.expandProjection" : "false"
-// ]
-// }
-// }
-// }
-// }
+ flavorDimensions "processorConfiguration"
+ productFlavors {
+ withExpandProjection {
+ dimension "processorConfiguration"
+ javaCompileOptions {
+ annotationProcessorOptions {
+ arguments = [
+ "room.schemaLocation" : "$projectDir/schemas".toString(),
+ "room.expandProjection" : "true"
+ ]
+ }
+ }
+ }
+ withoutExpandProjection {
+ dimension "processorConfiguration"
+ javaCompileOptions {
+ annotationProcessorOptions {
+ arguments = [
+ "room.schemaLocation" : "$projectDir/schemas".toString(),
+ "room.expandProjection" : "false"
+ ]
+ }
+ }
+ }
+ }
}
dependencies {