Merge "Force annotation project evaluation before everything else." into oc-mr1-jetpack-dev
diff --git a/buildSrc/src/main/kotlin/android/support/SupportAndroidLibraryPlugin.kt b/buildSrc/src/main/kotlin/android/support/SupportAndroidLibraryPlugin.kt
index b18b5e3..8b94cd7 100644
--- a/buildSrc/src/main/kotlin/android/support/SupportAndroidLibraryPlugin.kt
+++ b/buildSrc/src/main/kotlin/android/support/SupportAndroidLibraryPlugin.kt
@@ -80,7 +80,12 @@
project.apply(mapOf("plugin" to ErrorProneBasePlugin::class.java))
project.configurations.all { configuration ->
- if (isCoreSupportLibrary) {
+ if (isCoreSupportLibrary && project.name != "support-annotations") {
+ // While this usually happens naturally due to normal project dependencies, force
+ // evaluation on the annotations project in case the below substitution is the only
+ // dependency to this project. See b/70650240 on what happens when this is missing.
+ project.evaluationDependsOn(":support-annotations")
+
// In projects which compile as part of the "core" support libraries (which include
// the annotations), replace any transitive pointer to the deployed Maven
// coordinate version of annotations with a reference to the local project. These