Stop using deprecated compile/testCompile configurations.

Test: ./gradlew assembleDebug test
Change-Id: Ia100e8f319b9698a7dbbb0e4b253c092d1794656
diff --git a/arch/core-common/build.gradle b/arch/core-common/build.gradle
index 3c5f2fd..77324ae 100644
--- a/arch/core-common/build.gradle
+++ b/arch/core-common/build.gradle
@@ -26,10 +26,10 @@
 }
 
 dependencies {
-    compile("androidx.annotation:annotation:1.1.0")
+    api("androidx.annotation:annotation:1.1.0")
 
-    testCompile(JUNIT)
-    testCompile(MOCKITO_CORE)
+    testImplementation(JUNIT)
+    testImplementation(MOCKITO_CORE)
 }
 
 sourceCompatibility = JavaVersion.VERSION_1_7
diff --git a/collection/collection-ktx/build.gradle b/collection/collection-ktx/build.gradle
index c080584..72a1cd1 100644
--- a/collection/collection-ktx/build.gradle
+++ b/collection/collection-ktx/build.gradle
@@ -25,11 +25,11 @@
 }
 
 dependencies {
-    compile(project(":collection:collection"))
-    compile(KOTLIN_STDLIB)
-    testCompile(JUNIT)
-    testCompile(TRUTH)
-    testCompile(project(":internal-testutils-truth"))
+    api(project(":collection:collection"))
+    api(KOTLIN_STDLIB)
+    testImplementation(JUNIT)
+    testImplementation(TRUTH)
+    testImplementation(project(":internal-testutils-truth"))
 }
 
 androidx {
diff --git a/collection/collection/build.gradle b/collection/collection/build.gradle
index d6dc85b..376fc06 100644
--- a/collection/collection/build.gradle
+++ b/collection/collection/build.gradle
@@ -28,9 +28,9 @@
 sourceCompatibility = JavaVersion.VERSION_1_7
 
 dependencies {
-    compile("androidx.annotation:annotation:1.1.0")
+    api("androidx.annotation:annotation:1.1.0")
     annotationProcessor(NULLAWAY)
-    testCompile(JUNIT)
+    testImplementation(JUNIT)
 }
 
 androidx {
diff --git a/concurrent/futures/build.gradle b/concurrent/futures/build.gradle
index 0fecae1..b2027a5 100644
--- a/concurrent/futures/build.gradle
+++ b/concurrent/futures/build.gradle
@@ -26,10 +26,10 @@
 }
 
 dependencies {
-    compile("androidx.annotation:annotation:1.1.0")
-    compile(GUAVA_LISTENABLE_FUTURE)
-    testCompile(JUNIT)
-    testCompile(TRUTH)
+    api("androidx.annotation:annotation:1.1.0")
+    api(GUAVA_LISTENABLE_FUTURE)
+    testImplementation(JUNIT)
+    testImplementation(TRUTH)
 }
 
 sourceCompatibility = JavaVersion.VERSION_1_7
diff --git a/jetifier/jetifier/core/build.gradle b/jetifier/jetifier/core/build.gradle
index 0662cc0..9d8e1ef 100644
--- a/jetifier/jetifier/core/build.gradle
+++ b/jetifier/jetifier/core/build.gradle
@@ -29,10 +29,10 @@
 targetCompatibility = JavaVersion.VERSION_1_7
 
 dependencies {
-    compile("com.google.code.gson:gson:2.8.0")
-    compile(KOTLIN_STDLIB)
-    testCompile("junit:junit:4.12")
-    testCompile(TRUTH)
+    api("com.google.code.gson:gson:2.8.0")
+    api(KOTLIN_STDLIB)
+    testImplementation("junit:junit:4.12")
+    testImplementation(TRUTH)
 }
 
 androidx {
diff --git a/jetifier/jetifier/preprocessor/build.gradle b/jetifier/jetifier/preprocessor/build.gradle
index c38d52f..f478c95 100644
--- a/jetifier/jetifier/preprocessor/build.gradle
+++ b/jetifier/jetifier/preprocessor/build.gradle
@@ -26,6 +26,6 @@
 mainClassName = "com.android.tools.build.jetifier.preprocessor.MainKt"
 
 dependencies {
-    compile project(':jetifier-processor')
-    compile group: 'commons-cli', name: 'commons-cli', version: '1.3.1'
+    api(project(":jetifier-processor"))
+    api("commons-cli:commons-cli:1.3.1")
 }
diff --git a/jetifier/jetifier/processor/build.gradle b/jetifier/jetifier/processor/build.gradle
index fd7d9c6..0fe2cfd 100644
--- a/jetifier/jetifier/processor/build.gradle
+++ b/jetifier/jetifier/processor/build.gradle
@@ -28,14 +28,14 @@
 targetCompatibility = JavaVersion.VERSION_1_7
 
 dependencies {
-    compile project(':jetifier-core')
-    compile("org.ow2.asm:asm:6.0")
-    compile("org.ow2.asm:asm-util:6.0")
-    compile("org.ow2.asm:asm-commons:6.0")
-    compile("org.jdom:jdom2:2.0.6")
-    compile(KOTLIN_STDLIB)
-    testCompile("junit:junit:4.12")
-    testCompile(TRUTH)
+    api(project(":jetifier-core"))
+    api("org.ow2.asm:asm:6.0")
+    api("org.ow2.asm:asm-util:6.0")
+    api("org.ow2.asm:asm-commons:6.0")
+    api("org.jdom:jdom2:2.0.6")
+    api(KOTLIN_STDLIB)
+    testImplementation("junit:junit:4.12")
+    testImplementation(TRUTH)
 }
 
 androidx {
diff --git a/jetifier/jetifier/standalone/build.gradle b/jetifier/jetifier/standalone/build.gradle
index 126f449..73617fc 100644
--- a/jetifier/jetifier/standalone/build.gradle
+++ b/jetifier/jetifier/standalone/build.gradle
@@ -25,8 +25,8 @@
 mainClassName = "com.android.tools.build.jetifier.standalone.Main"
 
 dependencies {
-    compile project(':jetifier-processor')
-    compile group: 'commons-cli', name: 'commons-cli', version: '1.3.1'
+    api(project(":jetifier-processor"))
+    api("commons-cli:commons-cli:1.3.1")
 }
 
 task dist(type: Copy) {
diff --git a/lifecycle/lifecycle-common-java8/build.gradle b/lifecycle/lifecycle-common-java8/build.gradle
index 6c0e6e6..d0315593 100644
--- a/lifecycle/lifecycle-common-java8/build.gradle
+++ b/lifecycle/lifecycle-common-java8/build.gradle
@@ -26,11 +26,11 @@
 }
 
 dependencies {
-    compile(project(":lifecycle:lifecycle-common"))
-    compile("androidx.annotation:annotation:1.1.0")
+    api(project(":lifecycle:lifecycle-common"))
+    api("androidx.annotation:annotation:1.1.0")
 
-    testCompile(JUNIT)
-    testCompile(MOCKITO_CORE)
+    testImplementation(JUNIT)
+    testImplementation(MOCKITO_CORE)
 }
 
 androidx {
diff --git a/lifecycle/lifecycle-common/build.gradle b/lifecycle/lifecycle-common/build.gradle
index 2168cfa..bfae8ef 100644
--- a/lifecycle/lifecycle-common/build.gradle
+++ b/lifecycle/lifecycle-common/build.gradle
@@ -30,9 +30,10 @@
 targetCompatibility = JavaVersion.VERSION_1_7
 
 dependencies {
-    testCompile(JUNIT)
-    testCompile(MOCKITO_CORE)
-    compile("androidx.annotation:annotation:1.1.0")
+    api("androidx.annotation:annotation:1.1.0")
+
+    testImplementation(JUNIT)
+    testImplementation(MOCKITO_CORE)
 }
 
 androidx {
diff --git a/lifecycle/lifecycle-compiler/build.gradle b/lifecycle/lifecycle-compiler/build.gradle
index 22594250..4228710 100644
--- a/lifecycle/lifecycle-compiler/build.gradle
+++ b/lifecycle/lifecycle-compiler/build.gradle
@@ -22,13 +22,13 @@
 }
 
 dependencies {
-    compile(project(":lifecycle:lifecycle-common"))
-    compile(KOTLIN_STDLIB)
-    compile(AUTO_COMMON)
-    compile(JAVAPOET)
-    testCompile(GOOGLE_COMPILE_TESTING)
-    testCompile(JSR250)
-    testCompile files(org.gradle.internal.jvm.Jvm.current().getToolsJar())
+    implementation(project(":lifecycle:lifecycle-common"))
+    implementation(KOTLIN_STDLIB)
+    implementation(AUTO_COMMON)
+    implementation(JAVAPOET)
+    testImplementation(GOOGLE_COMPILE_TESTING)
+    testImplementation(JSR250)
+    testImplementation files(org.gradle.internal.jvm.Jvm.current().getToolsJar())
 }
 
 // we actually need to compile :lifecycle:lifecycle-common, but compileJava is easier
diff --git a/navigation/integration-tests/safeargs-testapp/build.gradle b/navigation/integration-tests/safeargs-testapp/build.gradle
index 395f8c0..19182c7 100644
--- a/navigation/integration-tests/safeargs-testapp/build.gradle
+++ b/navigation/integration-tests/safeargs-testapp/build.gradle
@@ -66,6 +66,6 @@
 
 dependencies {
     implementation "${LibraryGroups.NAVIGATION}:navigation-runtime:${LibraryVersions.NAVIGATION}"
-    testCompile(JUNIT)
-    testCompile(MOCKITO_CORE)
+    testImplementation(JUNIT)
+    testImplementation(MOCKITO_CORE)
 }
\ No newline at end of file
diff --git a/navigation/navigation-common/build.gradle b/navigation/navigation-common/build.gradle
index 8b6c8e7..47e140b 100644
--- a/navigation/navigation-common/build.gradle
+++ b/navigation/navigation-common/build.gradle
@@ -46,7 +46,7 @@
     androidTestImplementation(KOTLIN_STDLIB)
 }
 
-//used by testCompile safe-args-generator
+//used by testImplementation safe-args-generator
 android.libraryVariants.all { variant ->
     def name = variant.name
     def suffix = name.capitalize()
diff --git a/navigation/navigation-dynamic-features-activity/build.gradle b/navigation/navigation-dynamic-features-activity/build.gradle
index 0358704..971db09 100644
--- a/navigation/navigation-dynamic-features-activity/build.gradle
+++ b/navigation/navigation-dynamic-features-activity/build.gradle
@@ -47,7 +47,7 @@
     androidTestImplementation(TRUTH)
 }
 
-//used by testCompile safe-args-generator
+//used by testImplementation safe-args-generator
 android.libraryVariants.all { variant ->
     def name = variant.name
     def suffix = name.capitalize()
diff --git a/navigation/navigation-dynamic-features-core/build.gradle b/navigation/navigation-dynamic-features-core/build.gradle
index 4a03282..a994947 100644
--- a/navigation/navigation-dynamic-features-core/build.gradle
+++ b/navigation/navigation-dynamic-features-core/build.gradle
@@ -48,7 +48,7 @@
     androidTestImplementation(TRUTH)
 }
 
-//used by testCompile safe-args-generator
+//used by testImplementation safe-args-generator
 android.libraryVariants.all { variant ->
     def name = variant.name
     def suffix = name.capitalize()
diff --git a/navigation/navigation-dynamic-features-fragment/build.gradle b/navigation/navigation-dynamic-features-fragment/build.gradle
index 67faed3..b6c19b2 100644
--- a/navigation/navigation-dynamic-features-fragment/build.gradle
+++ b/navigation/navigation-dynamic-features-fragment/build.gradle
@@ -59,7 +59,7 @@
     }
 }
 
-//used by testCompile safe-args-generator
+//used by testImplementation safe-args-generator
 android.libraryVariants.all { variant ->
     def name = variant.name
     def suffix = name.capitalize()
diff --git a/navigation/navigation-safe-args-generator/build.gradle b/navigation/navigation-safe-args-generator/build.gradle
index 325d701..7f36bfe 100644
--- a/navigation/navigation-safe-args-generator/build.gradle
+++ b/navigation/navigation-safe-args-generator/build.gradle
@@ -36,20 +36,20 @@
 }
 
 dependencies {
-    compile(XPP3)
-    compile(XMLPULL)
-    compile(KOTLIN_STDLIB)
+    implementation(XPP3)
+    implementation(XMLPULL)
+    implementation(KOTLIN_STDLIB)
 
-    compile(JAVAPOET)
-    compile(KOTLINPOET)
+    implementation(JAVAPOET)
+    implementation(KOTLINPOET)
 
-    testCompile(JUNIT)
-    testCompile(GOOGLE_COMPILE_TESTING)
-    testCompile fileTree(dir: "${SdkHelperKt.getSdkPath(project.rootDir)}/platforms/$SupportConfig.COMPILE_SDK_VERSION/",
+    testImplementation(JUNIT)
+    testImplementation(GOOGLE_COMPILE_TESTING)
+    testImplementation fileTree(dir: "${SdkHelperKt.getSdkPath(project.rootDir)}/platforms/$SupportConfig.COMPILE_SDK_VERSION/",
             include : "android.jar")
-    testCompile fileTree(dir: "${new File(project(":navigation:navigation-common").buildDir, "libJar")}",
+    testImplementation fileTree(dir: "${new File(project(":navigation:navigation-common").buildDir, "libJar")}",
             include : "*.jar")
-    testCompile files(Jvm.current().getToolsJar())
+    testImplementation files(Jvm.current().getToolsJar())
 }
 
 tasks.findByName("test").doFirst {
diff --git a/navigation/navigation-safe-args-gradle-plugin/build.gradle b/navigation/navigation-safe-args-gradle-plugin/build.gradle
index 9c382fa..d43cd41 100644
--- a/navigation/navigation-safe-args-gradle-plugin/build.gradle
+++ b/navigation/navigation-safe-args-gradle-plugin/build.gradle
@@ -38,13 +38,13 @@
 }
 
 dependencies {
-    compile(AGP_STABLE)
-    compile(KOTLIN_GRADLE_PLUGIN)
+    implementation(AGP_STABLE)
+    implementation(KOTLIN_GRADLE_PLUGIN)
     compile project(":navigation:navigation-safe-args-generator")
     compile gradleApi()
-    compile(GSON)
-    testCompile gradleTestKit()
-    testCompile(JUNIT)
+    implementation(GSON)
+    testImplementation gradleTestKit()
+    testImplementation(JUNIT)
 }
 
 task generateSdkResource() {
diff --git a/paging/common/build.gradle b/paging/common/build.gradle
index 9fb3baf..7528976 100644
--- a/paging/common/build.gradle
+++ b/paging/common/build.gradle
@@ -28,13 +28,13 @@
 }
 
 dependencies {
-    compile("androidx.annotation:annotation:1.1.0")
-    compile("androidx.arch.core:core-common:2.0.1")
+    api("androidx.annotation:annotation:1.1.0")
+    api("androidx.arch.core:core-common:2.0.1")
     api(KOTLIN_STDLIB)
     api(KOTLIN_COROUTINES_CORE)
 
-    testCompile(JUNIT)
-    testCompile(MOCKITO_CORE)
+    testImplementation(JUNIT)
+    testImplementation(MOCKITO_CORE)
     testImplementation MOCKITO_KOTLIN, {
         exclude group: 'org.mockito' // to keep control on the mockito version
     }
diff --git a/room/common/build.gradle b/room/common/build.gradle
index 3ee72ae..e10ee75 100644
--- a/room/common/build.gradle
+++ b/room/common/build.gradle
@@ -26,11 +26,11 @@
 }
 
 dependencies {
-    compile("androidx.annotation:annotation:1.1.0")
-    testCompile(KOTLIN_STDLIB)
-    testCompile(JUNIT)
-    testCompile(MOCKITO_CORE)
-    testCompile(GUAVA)
+    api("androidx.annotation:annotation:1.1.0")
+    testImplementation(KOTLIN_STDLIB)
+    testImplementation(JUNIT)
+    testImplementation(MOCKITO_CORE)
+    testImplementation(GUAVA)
 }
 
 androidx {
diff --git a/room/compiler/build.gradle b/room/compiler/build.gradle
index e4adab3..a661005 100644
--- a/room/compiler/build.gradle
+++ b/room/compiler/build.gradle
@@ -46,36 +46,36 @@
 }
 
 dependencies {
-    compile(project(":room:room-common"))
-    compile(project(":room:room-migration"))
-    compile(KOTLIN_STDLIB)
-    compile(AUTO_COMMON)
-    compile(AUTO_VALUE_ANNOTATIONS)
-    compile(JAVAPOET)
-    compile(ANTLR)
-    compile(XERIAL)
-    compile(KOTLIN_METADATA_JVM)
-    compile(APACHE_COMMONS_CODEC)
-    compile(INTELLIJ_ANNOTATIONS)
-    testCompile(GOOGLE_COMPILE_TESTING)
-    testCompile project(":paging:paging-common")
-    testCompile(JUNIT)
-    testCompile(JSR250)
-    testCompile(MOCKITO_CORE)
-    testCompile fileTree(dir: "${SdkHelperKt.getSdkPath(project.rootDir)}/platforms/$SupportConfig.COMPILE_SDK_VERSION/",
+    implementation(project(":room:room-common"))
+    implementation(project(":room:room-migration"))
+    implementation(KOTLIN_STDLIB)
+    implementation(AUTO_COMMON)
+    implementation(AUTO_VALUE_ANNOTATIONS)
+    implementation(JAVAPOET)
+    implementation(ANTLR)
+    implementation(XERIAL)
+    implementation(KOTLIN_METADATA_JVM)
+    implementation(APACHE_COMMONS_CODEC)
+    implementation(INTELLIJ_ANNOTATIONS)
+    testImplementation(GOOGLE_COMPILE_TESTING)
+    testImplementation project(":paging:paging-common")
+    testImplementation(JUNIT)
+    testImplementation(JSR250)
+    testImplementation(MOCKITO_CORE)
+    testImplementation fileTree(dir: "${SdkHelperKt.getSdkPath(project.rootDir)}/platforms/$SupportConfig.COMPILE_SDK_VERSION/",
             include : "android.jar")
-    testCompile fileTree(dir: "${new File(project(":room:room-runtime").buildDir, "libJar")}",
+    testImplementation fileTree(dir: "${new File(project(":room:room-runtime").buildDir, "libJar")}",
             include : "*.jar")
-    testCompile fileTree(dir: "${new File(project(":sqlite:sqlite").buildDir, "libJar")}",
+    testImplementation fileTree(dir: "${new File(project(":sqlite:sqlite").buildDir, "libJar")}",
             include : "*.jar")
-    testCompile files(Jvm.current().getToolsJar())
+    testImplementation files(Jvm.current().getToolsJar())
 }
 
 def generateAntlrTask = task('generateAntlrGrammar', type: JavaExec) {
     def outFolder = file(antlrOut)
     outputs.dir(outFolder)
     inputs.file("$projectDir/SQLite.g4")
-    classpath configurations.runtime
+    classpath configurations.compileClasspath
     main "org.antlr.v4.Tool"
     args "SQLite.g4", "-visitor", "-o", new File(outFolder, "androidx/room/parser").path,
             "-package", "androidx.room.parser"
diff --git a/room/integration-tests/incremental-annotation-processing/build.gradle b/room/integration-tests/incremental-annotation-processing/build.gradle
index 21fe960..aeb543f 100644
--- a/room/integration-tests/incremental-annotation-processing/build.gradle
+++ b/room/integration-tests/incremental-annotation-processing/build.gradle
@@ -35,7 +35,7 @@
 
 
 dependencies {
-    compile(KOTLIN_STDLIB)
+    implementation(KOTLIN_STDLIB)
     testImplementation(JUNIT)
     testImplementation(TRUTH)
     testImplementation gradleTestKit()
diff --git a/room/migration/build.gradle b/room/migration/build.gradle
index ecd8634..07b5b1b 100644
--- a/room/migration/build.gradle
+++ b/room/migration/build.gradle
@@ -26,12 +26,12 @@
 }
 
 dependencies {
-    compile(project(":room:room-common"))
-    compile(KOTLIN_STDLIB)
-    compile(GSON)
-    testCompile(JUNIT)
-    testCompile(INTELLIJ_ANNOTATIONS)
-    testCompile(MOCKITO_CORE)
+    implementation(project(":room:room-common"))
+    implementation(KOTLIN_STDLIB)
+    implementation(GSON)
+    testImplementation(JUNIT)
+    testImplementation(INTELLIJ_ANNOTATIONS)
+    testImplementation(MOCKITO_CORE)
 }
 
 androidx {
diff --git a/room/runtime/build.gradle b/room/runtime/build.gradle
index 0f271d7..123977a 100644
--- a/room/runtime/build.gradle
+++ b/room/runtime/build.gradle
@@ -60,7 +60,7 @@
     def name = variant.name
     def suffix = name.capitalize()
 
-    // Create jar<variant> task for testCompile in room-compiler.
+    // Create jar<variant> task for testImplementation in room-compiler.
     project.tasks.create(name: "jar${suffix}", type: Jar){
         dependsOn variant.javaCompileProvider.get()
         from variant.javaCompileProvider.get().destinationDir
diff --git a/sqlite/sqlite/build.gradle b/sqlite/sqlite/build.gradle
index 648b276..1ef1d1c 100644
--- a/sqlite/sqlite/build.gradle
+++ b/sqlite/sqlite/build.gradle
@@ -31,7 +31,7 @@
     testImplementation(MOCKITO_CORE)
 }
 
-// Used by testCompile in room-compiler
+// Used by testImplementation in room-compiler
 android.libraryVariants.all { variant ->
     def name = variant.name
     def suffix = name.capitalize()
diff --git a/test/screenshot/proto/build.gradle b/test/screenshot/proto/build.gradle
index 728f34c..80b5a2a 100644
--- a/test/screenshot/proto/build.gradle
+++ b/test/screenshot/proto/build.gradle
@@ -30,7 +30,7 @@
 apply(plugin: "com.google.protobuf")
 
 dependencies {
-    compile(PROTOBUF)
+    implementation(PROTOBUF)
 }
 
 tasks.withType(Jar) {
diff --git a/versionedparcelable/annotation/build.gradle b/versionedparcelable/annotation/build.gradle
index 1d9c857..ce1c3e1 100644
--- a/versionedparcelable/annotation/build.gradle
+++ b/versionedparcelable/annotation/build.gradle
@@ -19,7 +19,7 @@
 apply plugin: 'java'
 
 dependencies {
-    compile(JAVAPOET)
+    implementation(JAVAPOET)
 }
 
 // The "javadoc" task is unused so we don't want it to appear in the output of `./gradlew tasks`