Migrate away from tasks.replace

This method has been deprecated in 5.0 and now removed in Gradle 6.0.
We can achieve the same functionality by making these tasks have no
actions and depend on nothing.

Test: ./gradlew tasks
Change-Id: Ie2501216f608c53d7ec68c51618e4adc88257027
diff --git a/docs-fake/build.gradle b/docs-fake/build.gradle
index d8899df..0122ec0 100644
--- a/docs-fake/build.gradle
+++ b/docs-fake/build.gradle
@@ -41,14 +41,20 @@
             || task.name == "checkPublicDebugDuplicateClasses") {
         if (!reentrance) {
             reentrance = true
-            project.tasks.replace(task.name)
+            project.tasks.named(task.name) {
+                actions = []
+                dependsOn = []
+            }
             reentrance = false
         }
     }
 }
 
 // Also replace some tasks that will have already been created (and not trigger `whenTaskAdded`)
-project.tasks.replace("lint")
+project.tasks.named("lint") {
+    actions = []
+    dependsOn = []
+}
 
 android {
     defaultConfig {