Extracting buildSrc tests into separate projects

so the main build can start before the tests finish

Before this change, when I run `time ./cleanBuild.sh -y projects` on my computer, it says:

real    1m19.058s
user    0m3.917s
sys     0m1.494s

After  this change, when I run `time ./cleanBuild.sh -y projects` on my computer, it says:

real    1m10.884s
user    0m4.412s
sys     0m1.241s

Bug: 138456696

Test: ./gradlew projects
Test: ./cleanBuild.sh -y projects
Test: cd ui && ./gradlew projects
Test: ./gradlew test --dry-run 2>&1 | grep :buildSrc-tests:test
Test: ./gradlew test --dry-run 2>&1 | grep :buildSrc-tests:lint-checks:test

Test: sed 's/hasUiFile = false/hasUiFile = true/' -i ./buildSrc/src/main/kotlin/androidx/build/dependencyTracker/AffectedModuleDetector.kt && ./gradlew :buildSrc-tests:lint-checks:test :buildSrc-tests:test # and notice that a test fails

Test: sed 's/SAMPLED_ANNOTATION = "Sampled"/SAMPLED_ANNOTATION = "Sampled2"/' -i ./buildSrc/lint-checks/src/main/java/androidx/build/lint/SampledAnnotationEnforcer.kt && ./gradlew :buildSrc-tests:lint-checks:test :buildSrc-tests:test # and notice that a test fails

Change-Id: I24d04a6de1d29834e26df7044fd63133f3253ed7
diff --git a/buildSrc-tests/build.gradle b/buildSrc-tests/build.gradle
new file mode 100644
index 0000000..f2a49f8
--- /dev/null
+++ b/buildSrc-tests/build.gradle
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// This project contains tests for code contained in buildSrc
+// This project is stored outside of buildSrc/ so that waiting for these tests to complete doesn't delay the rest of the build
+
+import static androidx.build.dependencies.DependenciesKt.*
+import androidx.build.BuildServerConfigurationKt
+
+plugins {
+    id("AndroidXPlugin")
+    id("kotlin")
+}
+
+dependencies {
+    implementation gradleApi()
+    testImplementation JUNIT
+    implementation(project.files(new File(BuildServerConfigurationKt.getRootOutDirectory(project), "buildSrc/build/libs/buildSrc.jar")))
+}
+
+androidx {
+    toolingProject = true
+}