Format remaining Kotlin files except for resource shrinker

Change-Id: I5d6eee390b2f4e180cf67f9e08c29a43707dc332
diff --git a/d8_r8/commonBuildSrc/src/main/kotlin/DependenciesPlugin.kt b/d8_r8/commonBuildSrc/src/main/kotlin/DependenciesPlugin.kt
index 6bf807c..1f3f338 100644
--- a/d8_r8/commonBuildSrc/src/main/kotlin/DependenciesPlugin.kt
+++ b/d8_r8/commonBuildSrc/src/main/kotlin/DependenciesPlugin.kt
@@ -29,8 +29,7 @@
 import org.gradle.nativeplatform.platform.OperatingSystem
 import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
 
-
-class DependenciesPlugin: Plugin<Project> {
+class DependenciesPlugin : Plugin<Project> {
 
   override fun apply(target: Project) {
     // Setup all test tasks to listen after system properties passed in by test.py.
@@ -39,7 +38,7 @@
   }
 
   companion object {
-    fun computeRoot(file: File) : File {
+    fun computeRoot(file: File): File {
       var parent = file
       while (!parent.getName().equals("d8_r8")) {
         parent = parent.getParentFile()
@@ -49,7 +48,7 @@
   }
 }
 
-enum class Jdk(val folder : String, val version: Int) {
+enum class Jdk(val folder: String, val version: Int) {
   // Only include LTS and latest non-LTS GA.
   JDK_8("jdk8", 8),
   JDK_9("openjdk-9.0.4", 9), // JDK-9 not LTS, but still used.
@@ -58,17 +57,17 @@
   JDK_21("jdk-21", 21),
   JDK_23("jdk-23", 23);
 
-  fun isJdk8() : Boolean {
+  fun isJdk8(): Boolean {
     return this == JDK_8
   }
 
-  fun getThirdPartyDependency() : ThirdPartyDependency {
+  fun getThirdPartyDependency(): ThirdPartyDependency {
     val os: OperatingSystem = DefaultNativePlatform.getCurrentOperatingSystem()
-    val subFolder : String
+    val subFolder: String
     if (os.isLinux) {
-      subFolder = if(isJdk8()) "linux-x86" else "linux"
+      subFolder = if (isJdk8()) "linux-x86" else "linux"
     } else if (os.isMacOsX) {
-      subFolder = if(isJdk8()) "darwin-x86" else "osx"
+      subFolder = if (isJdk8()) "darwin-x86" else "osx"
     } else {
       assert(os.isWindows())
       if (isJdk8()) {
@@ -79,7 +78,8 @@
     return ThirdPartyDependency(
       name,
       Paths.get("third_party", "openjdk", folder, subFolder).toFile(),
-      Paths.get("third_party", "openjdk", folder, "$subFolder.tar.gz.sha1").toFile())
+      Paths.get("third_party", "openjdk", folder, "$subFolder.tar.gz.sha1").toFile(),
+    )
   }
 }
 
@@ -87,7 +87,7 @@
   TestConfigurationHelper.setupTestTask(this, isR8Lib, r8Jar, r8LibMappingFile)
 }
 
-fun Project.getRoot() : File {
+fun Project.getRoot(): File {
   return computeRoot(this.projectDir)
 }
 
@@ -128,7 +128,7 @@
   for (i in 0..7) dest[i + destIndex] = (value shr (7 - i) * 8 and 0xffL).toByte()
 }
 
-fun Project.header(title : String) : String {
+fun Project.header(title: String): String {
   return "****** ${title} ******"
 }
 
@@ -142,90 +142,93 @@
  * Calling this from a project will amend the task graph with the task named
  * getExamplesJarsTaskName(examplesName) such that it can be referenced from the test runners.
  */
-fun Project.buildExampleJars(name : String) : Task {
-  val jarTasks : MutableList<Task> = mutableListOf()
-  val testSourceSet = extensions
-    .getByType(JavaPluginExtension::class.java)
-    .sourceSets
-    // The TEST_SOURCE_SET_NAME is the source set defined by writing java { sourcesets.test { ... }}
-    .getByName(SourceSet.TEST_SOURCE_SET_NAME)
+fun Project.buildExampleJars(name: String): Task {
+  val jarTasks: MutableList<Task> = mutableListOf()
+  val testSourceSet =
+    extensions
+      .getByType(JavaPluginExtension::class.java)
+      .sourceSets
+      // The TEST_SOURCE_SET_NAME is the source set defined by writing java { sourcesets.test { ...
+      // }}
+      .getByName(SourceSet.TEST_SOURCE_SET_NAME)
   val destinationDir = getRoot().resolveAll("build", "test", name)
   val generateDir = getRoot().resolveAll("build", "generated", name)
   val classesOutput = destinationDir.resolve("classes")
   testSourceSet.java.destinationDirectory.set(classesOutput)
   testSourceSet.resources.destinationDirectory.set(destinationDir)
-  testSourceSet
-    .java
-    .sourceDirectories
-    .files
-    .forEach { srcDir ->
-      srcDir.listFiles(File::isDirectory)?.forEach { exampleDir ->
-        arrayOf("compileTestJava", "debuginfo-all", "debuginfo-none").forEach { taskName ->
-          if (!project.getTasksByName(taskName, false).isEmpty()) {
-            var generationTask : Task? = null
-            val compileOutput = getOutputName(classesOutput.toString(), taskName)
-            if (exampleDir.resolve("TestGenerator.java").isFile) {
-              val generatedOutput = Paths.get(
-                getOutputName(generateDir.toString(), taskName), exampleDir.name).toString()
-              generationTask = tasks.register<JavaExec>(
-                "generate-$name-${exampleDir.name}-$taskName") {
+  testSourceSet.java.sourceDirectories.files.forEach { srcDir ->
+    srcDir.listFiles(File::isDirectory)?.forEach { exampleDir ->
+      arrayOf("compileTestJava", "debuginfo-all", "debuginfo-none").forEach { taskName ->
+        if (!project.getTasksByName(taskName, false).isEmpty()) {
+          var generationTask: Task? = null
+          val compileOutput = getOutputName(classesOutput.toString(), taskName)
+          if (exampleDir.resolve("TestGenerator.java").isFile) {
+            val generatedOutput =
+              Paths.get(getOutputName(generateDir.toString(), taskName), exampleDir.name).toString()
+            generationTask =
+              tasks
+                .register<JavaExec>("generate-$name-${exampleDir.name}-$taskName") {
+                  dependsOn(taskName)
+                  mainClass.set("${exampleDir.name}.TestGenerator")
+                  classpath = files(compileOutput, testSourceSet.compileClasspath)
+                  args(compileOutput, generatedOutput)
+                  outputs.dirs(generatedOutput)
+                }
+                .get()
+          }
+          jarTasks.add(
+            tasks
+              .register<Jar>("jar-$name-${exampleDir.name}-$taskName") {
                 dependsOn(taskName)
-                mainClass.set("${exampleDir.name}.TestGenerator")
-                classpath = files(compileOutput, testSourceSet.compileClasspath)
-                args(compileOutput, generatedOutput)
-                outputs.dirs(generatedOutput)
-              }.get()
-            }
-            jarTasks.add(tasks.register<Jar>("jar-$name-${exampleDir.name}-$taskName") {
-              dependsOn(taskName)
-              archiveFileName.set("${getOutputName(exampleDir.name, taskName)}.jar")
-              destinationDirectory.set(destinationDir)
-              duplicatesStrategy = DuplicatesStrategy.EXCLUDE
-              if (generationTask != null) {
-                // If a generation task exists, we first take the generated output and add to the
-                // current jar. Running with DuplicatesStrategy.EXCLUDE ensure that we do not
-                // overwrite with the non-generated file.
-                dependsOn(generationTask)
-                from(generationTask.outputs.files.singleFile.parentFile) {
+                archiveFileName.set("${getOutputName(exampleDir.name, taskName)}.jar")
+                destinationDirectory.set(destinationDir)
+                duplicatesStrategy = DuplicatesStrategy.EXCLUDE
+                if (generationTask != null) {
+                  // If a generation task exists, we first take the generated output and add to the
+                  // current jar. Running with DuplicatesStrategy.EXCLUDE ensure that we do not
+                  // overwrite with the non-generated file.
+                  dependsOn(generationTask)
+                  from(generationTask.outputs.files.singleFile.parentFile) {
+                    include("${exampleDir.name}/**/*.class")
+                    exclude("**/TestGenerator*")
+                  }
+                }
+                from(compileOutput) {
                   include("${exampleDir.name}/**/*.class")
                   exclude("**/TestGenerator*")
+                  exclude("${exampleDir.name}/twr/**")
+                }
+                // Copy additional resources into the jar.
+                from(exampleDir) {
+                  exclude("**/*.java")
+                  exclude("**/keep-rules*.txt")
+                  into(exampleDir.name)
                 }
               }
-              from(compileOutput) {
-                include("${exampleDir.name}/**/*.class")
-                exclude("**/TestGenerator*")
-                exclude("${exampleDir.name}/twr/**")
-              }
-              // Copy additional resources into the jar.
-              from(exampleDir) {
-                exclude("**/*.java")
-                exclude("**/keep-rules*.txt")
-                into(exampleDir.name)
-              }
-            }.get())
-          }
+              .get()
+          )
         }
       }
     }
-  return tasks.register(getExampleJarsTaskName(name)) {
-    dependsOn(jarTasks.toTypedArray())
-  }.get()
+  }
+  return tasks.register(getExampleJarsTaskName(name)) { dependsOn(jarTasks.toTypedArray()) }.get()
 }
 
-fun getOutputName(dest: String, taskName: String) : String {
+fun getOutputName(dest: String, taskName: String): String {
   if (taskName.equals("compileTestJava")) {
     return dest
   }
   return "${dest}_${taskName.replace('-', '_')}"
 }
 
-fun Project.getExampleJarsTaskName(name: String) : String {
+fun Project.getExampleJarsTaskName(name: String): String {
   return "build-example-jars-$name"
 }
 
 fun Project.resolve(
-  thirdPartyDependency: ThirdPartyDependency, vararg paths: String,
-) : ConfigurableFileCollection {
+  thirdPartyDependency: ThirdPartyDependency,
+  vararg paths: String,
+): ConfigurableFileCollection {
   return files(project.getRoot().resolve(thirdPartyDependency.path).resolveAll(*paths))
 }
 
@@ -233,27 +236,25 @@
  * When using composite builds, referecing tasks in other projects do not give a Task but a
  * TaskReference. To get outputs from other tasks we need to have a proper task and gradle do not
  * provide a way of getting a Task from a TaskReference. We use a trick where create a synthetic
- * task that depends on the task of interest, allowing us to look at the graph and obtain the
- * actual reference. Remove this code if gradle starts supporting this natively.
+ * task that depends on the task of interest, allowing us to look at the graph and obtain the actual
+ * reference. Remove this code if gradle starts supporting this natively.
  */
-fun Project.projectTask(project : String, taskName : String) : Task {
-  val name = "$project-reference-$taskName";
-  val task = tasks.register(name) {
-    dependsOn(gradle.includedBuild(project).task(":$taskName"))
-  }.get();
-  return task.taskDependencies
-    .getDependencies(tasks.getByName(name)).iterator().next();
+fun Project.projectTask(project: String, taskName: String): Task {
+  val name = "$project-reference-$taskName"
+  val task =
+    tasks.register(name) { dependsOn(gradle.includedBuild(project).task(":$taskName")) }.get()
+  return task.taskDependencies.getDependencies(tasks.getByName(name)).iterator().next()
 }
 
-fun File.resolveAll(vararg xs: String) : File {
-  var that = this;
+fun File.resolveAll(vararg xs: String): File {
+  var that = this
   for (x in xs) {
     that = that.resolve(x)
   }
   return that
 }
 
-fun Project.getJavaHome(jdk : Jdk) : File {
+fun Project.getJavaHome(jdk: Jdk): File {
   val os: OperatingSystem = DefaultNativePlatform.getCurrentOperatingSystem()
   var osFolder = "linux"
   if (os.isWindows()) {
@@ -265,19 +266,19 @@
   return getRoot().resolveAll("third_party", "openjdk", jdk.folder, osFolder)
 }
 
-fun Project.getCompilerPath(jdk : Jdk) : String {
+fun Project.getCompilerPath(jdk: Jdk): String {
   val os: OperatingSystem = DefaultNativePlatform.getCurrentOperatingSystem()
   val binary = if (os.isWindows()) "javac.exe" else "javac"
   return getJavaHome(jdk).resolveAll("bin", binary).toString()
 }
 
-fun Project.getJavaPath(jdk : Jdk) : String {
+fun Project.getJavaPath(jdk: Jdk): String {
   val os: OperatingSystem = DefaultNativePlatform.getCurrentOperatingSystem()
   val binary = if (os.isWindows()) "java.exe" else "java"
   return getJavaHome(jdk).resolveAll("bin", binary).toString()
 }
 
-fun Project.getJavaLauncher(jdk : Jdk) : JavaLauncher {
+fun Project.getJavaLauncher(jdk: Jdk): JavaLauncher {
   return object : JavaLauncher {
     override fun getMetadata(): JavaInstallationMetadata {
       return object : JavaInstallationMetadata {
@@ -313,17 +314,20 @@
   }
 }
 
-fun Project.getClasspath(vararg paths: File) : String {
+fun Project.getClasspath(vararg paths: File): String {
   val os: OperatingSystem = DefaultNativePlatform.getCurrentOperatingSystem()
-  assert (!paths.isEmpty())
-  val separator = if (os.isWindows()) ";"  else ":"
+  assert(!paths.isEmpty())
+  val separator = if (os.isWindows()) ";" else ":"
   var classpath = paths.joinToString(separator = separator) { it -> it.toString() }
   return classpath
 }
 
 fun Project.baseCompilerCommandLine(
-  jar: File, deps: File, compiler: String, args: List<String> = listOf(),
-) : List<String> {
+  jar: File,
+  deps: File,
+  compiler: String,
+  args: List<String> = listOf(),
+): List<String> {
   // Execute r8 commands against a stable r8 with dependencies.
   // TODO(b/139725780): See if we can remove or lower the heap size (-Xmx8g).
   return listOf(
@@ -333,29 +337,29 @@
     "-cp",
     getClasspath(jar, deps),
     "com.android.tools.r8.SwissArmyKnife",
-    compiler) + args
+    compiler,
+  ) + args
 }
 
 fun Project.baseCompilerCommandLine(
-  jvmArgs: List<String> = listOf(), jar: File, compiler: String, args: List<String> = listOf(),
-) : List<String> {
+  jvmArgs: List<String> = listOf(),
+  jar: File,
+  compiler: String,
+  args: List<String> = listOf(),
+): List<String> {
   // Execute r8 commands against a stable r8 with dependencies.
   // TODO(b/139725780): See if we can remove or lower the heap size (-Xmx8g).
-  return listOf(
-    getJavaPath(Jdk.JDK_17),
-    "-Xmx8g",
-    "-ea"
-  ) + jvmArgs +
-  listOf(
-    "-cp",
-    "$jar",
-    "com.android.tools.r8.SwissArmyKnife",
-    compiler) + args
+  return listOf(getJavaPath(Jdk.JDK_17), "-Xmx8g", "-ea") +
+    jvmArgs +
+    listOf("-cp", "$jar", "com.android.tools.r8.SwissArmyKnife", compiler) +
+    args
 }
 
 fun Project.baseCompilerCommandLine(
-  jar: File, compiler: String, args: List<String> = listOf(),
-) : List<String> {
+  jar: File,
+  compiler: String,
+  args: List<String> = listOf(),
+): List<String> {
   // Execute r8 commands against a stable r8 with dependencies.
   // TODO(b/139725780): See if we can remove or lower the heap size (-Xmx8g).
   return listOf(
@@ -365,7 +369,8 @@
     "-cp",
     "$jar",
     "com.android.tools.r8.SwissArmyKnife",
-    compiler) + args
+    compiler,
+  ) + args
 }
 
 fun Project.createR8LibCommandLine(
@@ -378,8 +383,8 @@
   lib: List<File> = listOf(),
   classpath: List<File> = listOf(),
   pgInputMap: File? = null,
-  replaceFromJar: File? = null
-) : List<String> {
+  replaceFromJar: File? = null,
+): List<String> {
   return buildList {
     add("python3")
     add("${getRoot().resolve("tools").resolve("create_r8lib.py")}")
@@ -389,9 +394,18 @@
     add("${input}")
     add("--output")
     add("${output}")
-    pgConf.forEach { add("--pg-conf"); add("$it") }
-    lib.forEach { add("--lib"); add("$it") }
-    classpath.forEach { add("--classpath"); add("$it") }
+    pgConf.forEach {
+      add("--pg-conf")
+      add("$it")
+    }
+    lib.forEach {
+      add("--lib")
+      add("$it")
+    }
+    classpath.forEach {
+      add("--classpath")
+      add("$it")
+    }
     if (excludingDepsVariant) {
       add("--excldeps-variant")
     }
@@ -435,13 +449,14 @@
   val asmUtil by lazy { "org.ow2.asm:asm-util:${Versions.asmVersion}" }
   val asmCommons by lazy { "org.ow2.asm:asm-commons:${Versions.asmVersion}" }
   val errorprone by lazy { "com.google.errorprone:error_prone_core:${Versions.errorproneVersion}" }
-  val fastUtil by lazy { "it.unimi.dsi:fastutil:${Versions.fastUtilVersion}"}
-  val gson by lazy { "com.google.code.gson:gson:${Versions.gsonVersion}"}
+  val fastUtil by lazy { "it.unimi.dsi:fastutil:${Versions.fastUtilVersion}" }
+  val gson by lazy { "com.google.code.gson:gson:${Versions.gsonVersion}" }
   val guava by lazy { "com.google.guava:guava:${Versions.guavaVersion}" }
-  val javassist by lazy { "org.javassist:javassist:${Versions.javassist}"}
-  val junit by lazy { "junit:junit:${Versions.junitVersion}"}
+  val javassist by lazy { "org.javassist:javassist:${Versions.javassist}" }
+  val junit by lazy { "junit:junit:${Versions.junitVersion}" }
   val kotlinMetadata by lazy {
-    "org.jetbrains.kotlin:kotlin-metadata-jvm:${Versions.kotlinMetadataVersion}" }
+    "org.jetbrains.kotlin:kotlin-metadata-jvm:${Versions.kotlinMetadataVersion}"
+  }
   val kotlinStdLib by lazy { "org.jetbrains.kotlin:kotlin-stdlib:${Versions.kotlinVersion}" }
   val kotlinReflect by lazy { "org.jetbrains.kotlin:kotlin-reflect:${Versions.kotlinVersion}" }
   val mockito by lazy { "org.mockito:mockito-core:${Versions.mockito}" }
@@ -451,503 +466,673 @@
 }
 
 object ThirdPartyDeps {
-  val aapt2 = ThirdPartyDependency(
-    "aapt2",
-    Paths.get("third_party", "aapt2").toFile(),
-    Paths.get("third_party", "aapt2.tar.gz.sha1").toFile())
+  val aapt2 =
+    ThirdPartyDependency(
+      "aapt2",
+      Paths.get("third_party", "aapt2").toFile(),
+      Paths.get("third_party", "aapt2.tar.gz.sha1").toFile(),
+    )
   val androidJars = getThirdPartyAndroidJars()
   val androidVMs = getThirdPartyAndroidVms()
-  val apiDatabase = ThirdPartyDependency(
-    "apiDatabase",
-    Paths.get("third_party", "api_database", "api_database").toFile(),
-    Paths.get("third_party", "api_database", "api_database.tar.gz.sha1").toFile())
-  val artTests = ThirdPartyDependency(
-    "art-tests",
-    Paths.get("tests", "2017-10-04", "art").toFile(),
-    Paths.get("tests", "2017-10-04", "art.tar.gz.sha1").toFile())
-  val artTestsLegacy = ThirdPartyDependency(
-    "art-tests-legacy",
-    Paths.get("tests", "2016-12-19", "art").toFile(),
-    Paths.get("tests", "2016-12-19", "art.tar.gz.sha1").toFile())
-  val clank = ThirdPartyDependency(
-    "clank",
-    Paths.get("third_party", "chrome", "clank_google3_prebuilt").toFile(),
-    Paths.get("third_party", "chrome", "clank_google3_prebuilt.tar.gz.sha1").toFile(),
-    DependencyType.X20)
-  val chrome = ThirdPartyDependency(
-    "chrome",
-    Paths.get("third_party", "chrome", "chrome_200430").toFile(),
-    Paths.get("third_party", "chrome", "chrome_200430.tar.gz.sha1").toFile(),
-    DependencyType.X20)
-  val chromeBenchmark = ThirdPartyDependency(
-    "chrome-benchmark",
-    Paths.get("third_party", "opensource-apps", "chrome").toFile(),
-    Paths.get("third_party", "opensource-apps", "chrome.tar.gz.sha1").toFile())
-  val compilerApi = ThirdPartyDependency(
-    "compiler-api",
-    Paths.get(
-      "third_party", "binary_compatibility_tests", "compiler_api_tests").toFile(),
-    Paths.get(
-      "third_party",
-      "binary_compatibility_tests",
-      "compiler_api_tests.tar.gz.sha1").toFile())
-  val composeExamplesChangedBitwiseValuePropagation = ThirdPartyDependency(
-    "compose-examples-changed-bitwise-value-propagation",
-    Paths.get(
-      "third_party", "opensource-apps", "compose-examples",
-      "changed-bitwise-value-propagation").toFile(),
-    Paths.get(
-      "third_party", "opensource-apps", "compose-examples",
-      "changed-bitwise-value-propagation.tar.gz.sha1").toFile())
-  val composeSamplesCrane = ThirdPartyDependency(
-    "compose-samples-crane",
-    Paths.get(
-      "third_party", "opensource-apps", "android", "compose-samples",
-      "crane").toFile(),
-    Paths.get(
-      "third_party", "opensource-apps", "android", "compose-samples",
-      "crane.tar.gz.sha1").toFile())
-  val composeSamplesJetCaster = ThirdPartyDependency(
-    "compose-samples-jetcaster",
-    Paths.get(
-      "third_party", "opensource-apps", "android", "compose-samples",
-      "jetcaster").toFile(),
-    Paths.get(
-      "third_party", "opensource-apps", "android", "compose-samples",
-      "jetcaster.tar.gz.sha1").toFile())
-  val composeSamplesJetChat = ThirdPartyDependency(
-    "compose-samples-jetchat",
-    Paths.get(
-      "third_party", "opensource-apps", "android", "compose-samples",
-      "jetchat").toFile(),
-    Paths.get(
-      "third_party", "opensource-apps", "android", "compose-samples",
-      "jetchat.tar.gz.sha1").toFile())
-  val composeSamplesJetLagged = ThirdPartyDependency(
-    "compose-samples-jetlagged",
-    Paths.get(
-      "third_party", "opensource-apps", "android", "compose-samples",
-      "jetlagged").toFile(),
-    Paths.get(
-      "third_party", "opensource-apps", "android", "compose-samples",
-      "jetlagged.tar.gz.sha1").toFile())
-  val composeSamplesJetNews = ThirdPartyDependency(
-    "compose-samples-jetnews",
-    Paths.get(
-      "third_party", "opensource-apps", "android", "compose-samples",
-      "jetnews").toFile(),
-    Paths.get(
-      "third_party", "opensource-apps", "android", "compose-samples",
-      "jetnews.tar.gz.sha1").toFile())
-  val composeSamplesJetSnack = ThirdPartyDependency(
-    "compose-samples-jetsnack",
-    Paths.get(
-      "third_party", "opensource-apps", "android", "compose-samples",
-      "jetsnack").toFile(),
-    Paths.get(
-      "third_party", "opensource-apps", "android", "compose-samples",
-      "jetsnack.tar.gz.sha1").toFile())
-  val composeSamplesOwl = ThirdPartyDependency(
-    "compose-samples-owl",
-    Paths.get(
-      "third_party", "opensource-apps", "android", "compose-samples",
-      "owl").toFile(),
-    Paths.get(
-      "third_party", "opensource-apps", "android", "compose-samples",
-      "owl.tar.gz.sha1").toFile())
-  val composeSamplesReply = ThirdPartyDependency(
-    "compose-samples-reply",
-    Paths.get(
-      "third_party", "opensource-apps", "android", "compose-samples",
-      "reply").toFile(),
-    Paths.get(
-      "third_party", "opensource-apps", "android", "compose-samples",
-      "reply.tar.gz.sha1").toFile())
-  val coreLambdaStubs = ThirdPartyDependency(
-    "coreLambdaStubs",
-    Paths.get("third_party", "core-lambda-stubs").toFile(),
-    Paths.get("third_party", "core-lambda-stubs.tar.gz.sha1").toFile())
-  val customConversion = ThirdPartyDependency(
-    "customConversion",
-    Paths.get("third_party", "openjdk", "custom_conversion").toFile(),
-    Paths.get("third_party", "openjdk", "custom_conversion.tar.gz.sha1").toFile())
-  val dagger = ThirdPartyDependency(
-    "dagger",
-    Paths.get("third_party", "dagger", "2.41").toFile(),
-    Paths.get("third_party", "dagger", "2.41.tar.gz.sha1").toFile())
-  val dartSdk = ThirdPartyDependency(
-    "dart-sdk",
-    Paths.get("third_party", "dart-sdk").toFile(),
-    Paths.get("third_party", "dart-sdk.tar.gz.sha1").toFile())
-  val ddmLib = ThirdPartyDependency(
-    "ddmlib",
-    Paths.get("third_party", "ddmlib").toFile(),
-    Paths.get("third_party", "ddmlib.tar.gz.sha1").toFile())
-  val examples = ThirdPartyDependency(
-    "examples",
-    Paths.get("third_party", "examples").toFile(),
-    Paths.get("third_party", "examples.tar.gz.sha1").toFile())
-  val examplesAndroidN = ThirdPartyDependency(
-    "examplesAndroidN",
-    Paths.get("third_party", "examplesAndroidN").toFile(),
-    Paths.get("third_party", "examplesAndroidN.tar.gz.sha1").toFile())
-  val examplesAndroidO = ThirdPartyDependency(
-    "examplesAndroidO",
-    Paths.get("third_party", "examplesAndroidO").toFile(),
-    Paths.get("third_party", "examplesAndroidO.tar.gz.sha1").toFile())
-  val examplesAndroidOGenerated = ThirdPartyDependency(
-    "examplesAndroidOGenerated",
-    Paths.get("third_party", "examplesAndroidOGenerated").toFile(),
-    Paths.get("third_party", "examplesAndroidOGenerated.tar.gz.sha1").toFile())
-  val examplesAndroidOLegacy = ThirdPartyDependency(
-    "examplesAndroidOLegacy",
-    Paths.get("third_party", "examplesAndroidOLegacy").toFile(),
-    Paths.get("third_party", "examplesAndroidOLegacy.tar.gz.sha1").toFile())
-  val examplesAndroidP = ThirdPartyDependency(
-    "examplesAndroidP",
-    Paths.get("third_party", "examplesAndroidP").toFile(),
-    Paths.get("third_party", "examplesAndroidP.tar.gz.sha1").toFile())
-  val examplesAndroidPGenerated = ThirdPartyDependency(
-    "examplesAndroidPGenerated",
-    Paths.get("third_party", "examplesAndroidPGenerated").toFile(),
-    Paths.get("third_party", "examplesAndroidPGenerated.tar.gz.sha1").toFile())
-  val desugarJdkLibs = ThirdPartyDependency(
-    "desugar-jdk-libs",
-    Paths.get("third_party", "openjdk", "desugar_jdk_libs").toFile(),
-    Paths.get("third_party", "openjdk", "desugar_jdk_libs.tar.gz.sha1").toFile())
-  val desugarJdkLibsLegacy = ThirdPartyDependency(
-    "desugar-jdk-libs-legacy",
-    Paths.get("third_party", "openjdk", "desugar_jdk_libs_legacy").toFile(),
-    Paths.get("third_party", "openjdk", "desugar_jdk_libs_legacy.tar.gz.sha1").toFile())
+  val apiDatabase =
+    ThirdPartyDependency(
+      "apiDatabase",
+      Paths.get("third_party", "api_database", "api_database").toFile(),
+      Paths.get("third_party", "api_database", "api_database.tar.gz.sha1").toFile(),
+    )
+  val artTests =
+    ThirdPartyDependency(
+      "art-tests",
+      Paths.get("tests", "2017-10-04", "art").toFile(),
+      Paths.get("tests", "2017-10-04", "art.tar.gz.sha1").toFile(),
+    )
+  val artTestsLegacy =
+    ThirdPartyDependency(
+      "art-tests-legacy",
+      Paths.get("tests", "2016-12-19", "art").toFile(),
+      Paths.get("tests", "2016-12-19", "art.tar.gz.sha1").toFile(),
+    )
+  val clank =
+    ThirdPartyDependency(
+      "clank",
+      Paths.get("third_party", "chrome", "clank_google3_prebuilt").toFile(),
+      Paths.get("third_party", "chrome", "clank_google3_prebuilt.tar.gz.sha1").toFile(),
+      DependencyType.X20,
+    )
+  val chrome =
+    ThirdPartyDependency(
+      "chrome",
+      Paths.get("third_party", "chrome", "chrome_200430").toFile(),
+      Paths.get("third_party", "chrome", "chrome_200430.tar.gz.sha1").toFile(),
+      DependencyType.X20,
+    )
+  val chromeBenchmark =
+    ThirdPartyDependency(
+      "chrome-benchmark",
+      Paths.get("third_party", "opensource-apps", "chrome").toFile(),
+      Paths.get("third_party", "opensource-apps", "chrome.tar.gz.sha1").toFile(),
+    )
+  val compilerApi =
+    ThirdPartyDependency(
+      "compiler-api",
+      Paths.get("third_party", "binary_compatibility_tests", "compiler_api_tests").toFile(),
+      Paths.get("third_party", "binary_compatibility_tests", "compiler_api_tests.tar.gz.sha1")
+        .toFile(),
+    )
+  val composeExamplesChangedBitwiseValuePropagation =
+    ThirdPartyDependency(
+      "compose-examples-changed-bitwise-value-propagation",
+      Paths.get(
+          "third_party",
+          "opensource-apps",
+          "compose-examples",
+          "changed-bitwise-value-propagation",
+        )
+        .toFile(),
+      Paths.get(
+          "third_party",
+          "opensource-apps",
+          "compose-examples",
+          "changed-bitwise-value-propagation.tar.gz.sha1",
+        )
+        .toFile(),
+    )
+  val composeSamplesCrane =
+    ThirdPartyDependency(
+      "compose-samples-crane",
+      Paths.get("third_party", "opensource-apps", "android", "compose-samples", "crane").toFile(),
+      Paths.get("third_party", "opensource-apps", "android", "compose-samples", "crane.tar.gz.sha1")
+        .toFile(),
+    )
+  val composeSamplesJetCaster =
+    ThirdPartyDependency(
+      "compose-samples-jetcaster",
+      Paths.get("third_party", "opensource-apps", "android", "compose-samples", "jetcaster")
+        .toFile(),
+      Paths.get(
+          "third_party",
+          "opensource-apps",
+          "android",
+          "compose-samples",
+          "jetcaster.tar.gz.sha1",
+        )
+        .toFile(),
+    )
+  val composeSamplesJetChat =
+    ThirdPartyDependency(
+      "compose-samples-jetchat",
+      Paths.get("third_party", "opensource-apps", "android", "compose-samples", "jetchat").toFile(),
+      Paths.get(
+          "third_party",
+          "opensource-apps",
+          "android",
+          "compose-samples",
+          "jetchat.tar.gz.sha1",
+        )
+        .toFile(),
+    )
+  val composeSamplesJetLagged =
+    ThirdPartyDependency(
+      "compose-samples-jetlagged",
+      Paths.get("third_party", "opensource-apps", "android", "compose-samples", "jetlagged")
+        .toFile(),
+      Paths.get(
+          "third_party",
+          "opensource-apps",
+          "android",
+          "compose-samples",
+          "jetlagged.tar.gz.sha1",
+        )
+        .toFile(),
+    )
+  val composeSamplesJetNews =
+    ThirdPartyDependency(
+      "compose-samples-jetnews",
+      Paths.get("third_party", "opensource-apps", "android", "compose-samples", "jetnews").toFile(),
+      Paths.get(
+          "third_party",
+          "opensource-apps",
+          "android",
+          "compose-samples",
+          "jetnews.tar.gz.sha1",
+        )
+        .toFile(),
+    )
+  val composeSamplesJetSnack =
+    ThirdPartyDependency(
+      "compose-samples-jetsnack",
+      Paths.get("third_party", "opensource-apps", "android", "compose-samples", "jetsnack")
+        .toFile(),
+      Paths.get(
+          "third_party",
+          "opensource-apps",
+          "android",
+          "compose-samples",
+          "jetsnack.tar.gz.sha1",
+        )
+        .toFile(),
+    )
+  val composeSamplesOwl =
+    ThirdPartyDependency(
+      "compose-samples-owl",
+      Paths.get("third_party", "opensource-apps", "android", "compose-samples", "owl").toFile(),
+      Paths.get("third_party", "opensource-apps", "android", "compose-samples", "owl.tar.gz.sha1")
+        .toFile(),
+    )
+  val composeSamplesReply =
+    ThirdPartyDependency(
+      "compose-samples-reply",
+      Paths.get("third_party", "opensource-apps", "android", "compose-samples", "reply").toFile(),
+      Paths.get("third_party", "opensource-apps", "android", "compose-samples", "reply.tar.gz.sha1")
+        .toFile(),
+    )
+  val coreLambdaStubs =
+    ThirdPartyDependency(
+      "coreLambdaStubs",
+      Paths.get("third_party", "core-lambda-stubs").toFile(),
+      Paths.get("third_party", "core-lambda-stubs.tar.gz.sha1").toFile(),
+    )
+  val customConversion =
+    ThirdPartyDependency(
+      "customConversion",
+      Paths.get("third_party", "openjdk", "custom_conversion").toFile(),
+      Paths.get("third_party", "openjdk", "custom_conversion.tar.gz.sha1").toFile(),
+    )
+  val dagger =
+    ThirdPartyDependency(
+      "dagger",
+      Paths.get("third_party", "dagger", "2.41").toFile(),
+      Paths.get("third_party", "dagger", "2.41.tar.gz.sha1").toFile(),
+    )
+  val dartSdk =
+    ThirdPartyDependency(
+      "dart-sdk",
+      Paths.get("third_party", "dart-sdk").toFile(),
+      Paths.get("third_party", "dart-sdk.tar.gz.sha1").toFile(),
+    )
+  val ddmLib =
+    ThirdPartyDependency(
+      "ddmlib",
+      Paths.get("third_party", "ddmlib").toFile(),
+      Paths.get("third_party", "ddmlib.tar.gz.sha1").toFile(),
+    )
+  val examples =
+    ThirdPartyDependency(
+      "examples",
+      Paths.get("third_party", "examples").toFile(),
+      Paths.get("third_party", "examples.tar.gz.sha1").toFile(),
+    )
+  val examplesAndroidN =
+    ThirdPartyDependency(
+      "examplesAndroidN",
+      Paths.get("third_party", "examplesAndroidN").toFile(),
+      Paths.get("third_party", "examplesAndroidN.tar.gz.sha1").toFile(),
+    )
+  val examplesAndroidO =
+    ThirdPartyDependency(
+      "examplesAndroidO",
+      Paths.get("third_party", "examplesAndroidO").toFile(),
+      Paths.get("third_party", "examplesAndroidO.tar.gz.sha1").toFile(),
+    )
+  val examplesAndroidOGenerated =
+    ThirdPartyDependency(
+      "examplesAndroidOGenerated",
+      Paths.get("third_party", "examplesAndroidOGenerated").toFile(),
+      Paths.get("third_party", "examplesAndroidOGenerated.tar.gz.sha1").toFile(),
+    )
+  val examplesAndroidOLegacy =
+    ThirdPartyDependency(
+      "examplesAndroidOLegacy",
+      Paths.get("third_party", "examplesAndroidOLegacy").toFile(),
+      Paths.get("third_party", "examplesAndroidOLegacy.tar.gz.sha1").toFile(),
+    )
+  val examplesAndroidP =
+    ThirdPartyDependency(
+      "examplesAndroidP",
+      Paths.get("third_party", "examplesAndroidP").toFile(),
+      Paths.get("third_party", "examplesAndroidP.tar.gz.sha1").toFile(),
+    )
+  val examplesAndroidPGenerated =
+    ThirdPartyDependency(
+      "examplesAndroidPGenerated",
+      Paths.get("third_party", "examplesAndroidPGenerated").toFile(),
+      Paths.get("third_party", "examplesAndroidPGenerated.tar.gz.sha1").toFile(),
+    )
+  val desugarJdkLibs =
+    ThirdPartyDependency(
+      "desugar-jdk-libs",
+      Paths.get("third_party", "openjdk", "desugar_jdk_libs").toFile(),
+      Paths.get("third_party", "openjdk", "desugar_jdk_libs.tar.gz.sha1").toFile(),
+    )
+  val desugarJdkLibsLegacy =
+    ThirdPartyDependency(
+      "desugar-jdk-libs-legacy",
+      Paths.get("third_party", "openjdk", "desugar_jdk_libs_legacy").toFile(),
+      Paths.get("third_party", "openjdk", "desugar_jdk_libs_legacy.tar.gz.sha1").toFile(),
+    )
   val desugarLibraryReleases = getThirdPartyDesugarLibraryReleases()
   // TODO(b/289363570): This could probably be removed.
-  val framework = ThirdPartyDependency(
-    "framework",
-    Paths.get("third_party", "framework").toFile(),
-    Paths.get("third_party", "framework.tar.gz.sha1").toFile(),
-    DependencyType.X20)
-  val googleJavaFormat = ThirdPartyDependency(
-    "google-java-format",
-    Paths.get("third_party", "google-java-format").toFile(),
-    Paths.get("third_party", "google-java-format.tar.gz.sha1").toFile())
-  val googleJavaFormat_1_24 = ThirdPartyDependency(
-    "google-java-format-1.24",
-    Paths.get("third_party", "google", "google-java-format", "1.24.0").toFile(),
-    Paths.get("third_party", "google", "google-java-format", "1.24.0.tar.gz.sha1").toFile())
-  val googleKotlinFormat_0_54 = ThirdPartyDependency(
-    "google-kotlin-format-0.54",
-    Paths.get("third_party", "google", "google-kotlin-format", "0.54").toFile(),
-    Paths.get("third_party", "google", "google-kotlin-format", "0.54.tar.gz.sha1").toFile())
-  val googleYapf_20231013 = ThirdPartyDependency(
-    "google-yapf-20231013",
-    Paths.get("third_party", "google", "yapf", "20231013").toFile(),
-    Paths.get("third_party", "google", "yapf", "20231013.tar.gz.sha1").toFile())
-  val gson = ThirdPartyDependency(
-    "gson",
-    Paths.get("third_party", "gson", "gson-2.10.1").toFile(),
-    Paths.get("third_party", "gson", "gson-2.10.1.tar.gz.sha1").toFile())
-  val guavaJre = ThirdPartyDependency(
-    "guava-jre",
-    Paths.get("third_party", "guava", "guava-32.1.2-jre").toFile(),
-    Paths.get("third_party", "guava", "guava-32.1.2-jre.tar.gz.sha1").toFile())
-  val desugarJdkLibs11 = ThirdPartyDependency(
-    "desugar-jdk-libs-11",
-    Paths.get("third_party", "openjdk", "desugar_jdk_libs_11").toFile(),
-    Paths.get("third_party", "openjdk", "desugar_jdk_libs_11.tar.gz.sha1").toFile())
+  val framework =
+    ThirdPartyDependency(
+      "framework",
+      Paths.get("third_party", "framework").toFile(),
+      Paths.get("third_party", "framework.tar.gz.sha1").toFile(),
+      DependencyType.X20,
+    )
+  val googleJavaFormat =
+    ThirdPartyDependency(
+      "google-java-format",
+      Paths.get("third_party", "google-java-format").toFile(),
+      Paths.get("third_party", "google-java-format.tar.gz.sha1").toFile(),
+    )
+  val googleJavaFormat_1_24 =
+    ThirdPartyDependency(
+      "google-java-format-1.24",
+      Paths.get("third_party", "google", "google-java-format", "1.24.0").toFile(),
+      Paths.get("third_party", "google", "google-java-format", "1.24.0.tar.gz.sha1").toFile(),
+    )
+  val googleKotlinFormat_0_54 =
+    ThirdPartyDependency(
+      "google-kotlin-format-0.54",
+      Paths.get("third_party", "google", "google-kotlin-format", "0.54").toFile(),
+      Paths.get("third_party", "google", "google-kotlin-format", "0.54.tar.gz.sha1").toFile(),
+    )
+  val googleYapf_20231013 =
+    ThirdPartyDependency(
+      "google-yapf-20231013",
+      Paths.get("third_party", "google", "yapf", "20231013").toFile(),
+      Paths.get("third_party", "google", "yapf", "20231013.tar.gz.sha1").toFile(),
+    )
+  val gson =
+    ThirdPartyDependency(
+      "gson",
+      Paths.get("third_party", "gson", "gson-2.10.1").toFile(),
+      Paths.get("third_party", "gson", "gson-2.10.1.tar.gz.sha1").toFile(),
+    )
+  val guavaJre =
+    ThirdPartyDependency(
+      "guava-jre",
+      Paths.get("third_party", "guava", "guava-32.1.2-jre").toFile(),
+      Paths.get("third_party", "guava", "guava-32.1.2-jre.tar.gz.sha1").toFile(),
+    )
+  val desugarJdkLibs11 =
+    ThirdPartyDependency(
+      "desugar-jdk-libs-11",
+      Paths.get("third_party", "openjdk", "desugar_jdk_libs_11").toFile(),
+      Paths.get("third_party", "openjdk", "desugar_jdk_libs_11.tar.gz.sha1").toFile(),
+    )
   val gmscoreVersions = getGmsCoreVersions()
   val internalIssues = getInternalIssues()
-  val jacoco = ThirdPartyDependency(
-    "jacoco",
-    Paths.get("third_party", "jacoco", "0.8.6").toFile(),
-    Paths.get("third_party", "jacoco", "0.8.6.tar.gz.sha1").toFile())
-  val jasmin = ThirdPartyDependency(
-    "jasmin",
-    Paths.get("third_party", "jasmin").toFile(),
-    Paths.get("third_party", "jasmin.tar.gz.sha1").toFile())
-  val jsr223 = ThirdPartyDependency(
-    "jsr223",
-    Paths.get("third_party", "jsr223-api-1.0").toFile(),
-    Paths.get("third_party", "jsr223-api-1.0.tar.gz.sha1").toFile())
-  val java8Runtime = ThirdPartyDependency(
-    "openjdk-rt-1.8",
-    Paths.get("third_party", "openjdk", "openjdk-rt-1.8").toFile(),
-    Paths.get("third_party", "openjdk", "openjdk-rt-1.8.tar.gz.sha1").toFile())
+  val jacoco =
+    ThirdPartyDependency(
+      "jacoco",
+      Paths.get("third_party", "jacoco", "0.8.6").toFile(),
+      Paths.get("third_party", "jacoco", "0.8.6.tar.gz.sha1").toFile(),
+    )
+  val jasmin =
+    ThirdPartyDependency(
+      "jasmin",
+      Paths.get("third_party", "jasmin").toFile(),
+      Paths.get("third_party", "jasmin.tar.gz.sha1").toFile(),
+    )
+  val jsr223 =
+    ThirdPartyDependency(
+      "jsr223",
+      Paths.get("third_party", "jsr223-api-1.0").toFile(),
+      Paths.get("third_party", "jsr223-api-1.0.tar.gz.sha1").toFile(),
+    )
+  val java8Runtime =
+    ThirdPartyDependency(
+      "openjdk-rt-1.8",
+      Paths.get("third_party", "openjdk", "openjdk-rt-1.8").toFile(),
+      Paths.get("third_party", "openjdk", "openjdk-rt-1.8.tar.gz.sha1").toFile(),
+    )
   val jdks = getJdks()
-  val jdk11Test = ThirdPartyDependency(
-    "jdk-11-test",
-    Paths.get("third_party", "openjdk", "jdk-11-test").toFile(),
-    Paths.get("third_party", "openjdk", "jdk-11-test.tar.gz.sha1").toFile())
-  val junit = ThirdPartyDependency(
-    "junit",
-    Paths.get("third_party", "junit").toFile(),
-    Paths.get("third_party", "junit.tar.gz.sha1").toFile())
-  val jdwpTests = ThirdPartyDependency(
-    "jdwp-tests",
-    Paths.get("third_party", "jdwp-tests").toFile(),
-    Paths.get("third_party", "jdwp-tests.tar.gz.sha1").toFile())
+  val jdk11Test =
+    ThirdPartyDependency(
+      "jdk-11-test",
+      Paths.get("third_party", "openjdk", "jdk-11-test").toFile(),
+      Paths.get("third_party", "openjdk", "jdk-11-test.tar.gz.sha1").toFile(),
+    )
+  val junit =
+    ThirdPartyDependency(
+      "junit",
+      Paths.get("third_party", "junit").toFile(),
+      Paths.get("third_party", "junit.tar.gz.sha1").toFile(),
+    )
+  val jdwpTests =
+    ThirdPartyDependency(
+      "jdwp-tests",
+      Paths.get("third_party", "jdwp-tests").toFile(),
+      Paths.get("third_party", "jdwp-tests.tar.gz.sha1").toFile(),
+    )
   val kotlinCompilers = getThirdPartyKotlinCompilers()
-  val kotlinR8TestResources = ThirdPartyDependency(
-    "kotlinR8TestResources",
-    Paths.get("third_party", "kotlinR8TestResources").toFile(),
-    Paths.get("third_party", "kotlinR8TestResources.tar.gz.sha1").toFile())
-  val kotlinxCoroutines = ThirdPartyDependency(
-    "kotlinx-coroutines-1.3.6",
-    Paths.get("third_party", "kotlinx-coroutines-1.3.6").toFile(),
-    Paths.get("third_party", "kotlinx-coroutines-1.3.6.tar.gz.sha1").toFile())
-  val multidex = ThirdPartyDependency(
-    "multidex",
-    Paths.get("third_party", "multidex").toFile(),
-    Paths.get("third_party", "multidex.tar.gz.sha1").toFile())
-  val nest = ThirdPartyDependency(
-    "nest",
-    Paths.get("third_party", "nest", "nest_20180926_7c6cfb").toFile(),
-    Paths.get("third_party", "nest", "nest_20180926_7c6cfb.tar.gz.sha1").toFile(),
-    DependencyType.X20)
-  val nowinandroid = ThirdPartyDependency(
-    "nowinandroid",
-    Paths.get("third_party", "opensource-apps", "android", "nowinandroid").toFile(),
-    Paths.get("third_party", "opensource-apps", "android", "nowinandroid.tar.gz.sha1").toFile())
+  val kotlinR8TestResources =
+    ThirdPartyDependency(
+      "kotlinR8TestResources",
+      Paths.get("third_party", "kotlinR8TestResources").toFile(),
+      Paths.get("third_party", "kotlinR8TestResources.tar.gz.sha1").toFile(),
+    )
+  val kotlinxCoroutines =
+    ThirdPartyDependency(
+      "kotlinx-coroutines-1.3.6",
+      Paths.get("third_party", "kotlinx-coroutines-1.3.6").toFile(),
+      Paths.get("third_party", "kotlinx-coroutines-1.3.6.tar.gz.sha1").toFile(),
+    )
+  val multidex =
+    ThirdPartyDependency(
+      "multidex",
+      Paths.get("third_party", "multidex").toFile(),
+      Paths.get("third_party", "multidex.tar.gz.sha1").toFile(),
+    )
+  val nest =
+    ThirdPartyDependency(
+      "nest",
+      Paths.get("third_party", "nest", "nest_20180926_7c6cfb").toFile(),
+      Paths.get("third_party", "nest", "nest_20180926_7c6cfb.tar.gz.sha1").toFile(),
+      DependencyType.X20,
+    )
+  val nowinandroid =
+    ThirdPartyDependency(
+      "nowinandroid",
+      Paths.get("third_party", "opensource-apps", "android", "nowinandroid").toFile(),
+      Paths.get("third_party", "opensource-apps", "android", "nowinandroid.tar.gz.sha1").toFile(),
+    )
   val proguards = getThirdPartyProguards()
-  val proguardsettings = ThirdPartyDependency(
-    "proguardsettings",
-    Paths.get("third_party", "proguardsettings").toFile(),
-    Paths.get("third_party", "proguardsettings.tar.gz.sha1").toFile(),
-    DependencyType.X20)
-  val protoc = ThirdPartyDependency(
-    "protoc",
-    Paths.get("third_party", "protoc").toFile(),
-    Paths.get("third_party", "protoc.tar.gz.sha1").toFile())
-  val protoRuntimeEdition2023 = ThirdPartyDependency(
-    "protoRuntimeEdition2023",
-    Paths.get("third_party", "proto", "runtime", "edition2023").toFile(),
-    Paths.get("third_party", "proto", "runtime", "edition2023.tar.gz.sha1").toFile(),
-    DependencyType.X20)
-  val protoRuntimeLegacy = ThirdPartyDependency(
-    "protoRuntimeLegacy",
-    Paths.get("third_party", "proto", "runtime", "legacy").toFile(),
-    Paths.get("third_party", "proto", "runtime", "legacy.tar.gz.sha1").toFile(),
-    DependencyType.X20)
-  val protoTestEdition2023 = ThirdPartyDependency(
-    "protoTestEdition2023",
-    Paths.get("third_party", "proto", "test", "edition2023").toFile(),
-    Paths.get("third_party", "proto", "test", "edition2023.tar.gz.sha1").toFile(),
-    DependencyType.X20)
-  val protoTestProto2 = ThirdPartyDependency(
-    "protoTestProto2",
-    Paths.get("third_party", "proto", "test", "proto2").toFile(),
-    Paths.get("third_party", "proto", "test", "proto2.tar.gz.sha1").toFile(),
-    DependencyType.X20)
-  val protoTestProto3 = ThirdPartyDependency(
-    "protoTestProto3",
-    Paths.get("third_party", "proto", "test", "proto3").toFile(),
-    Paths.get("third_party", "proto", "test", "proto3.tar.gz.sha1").toFile(),
-    DependencyType.X20)
-  val r8 = ThirdPartyDependency(
-    "r8",
-    Paths.get("third_party", "r8").toFile(),
-    Paths.get("third_party", "r8.tar.gz.sha1").toFile())
-  val r8Mappings = ThirdPartyDependency(
-    "r8-mappings",
-    Paths.get("third_party", "r8mappings").toFile(),
-    Paths.get("third_party", "r8mappings.tar.gz.sha1").toFile())
-  val r8v2_0_74 = ThirdPartyDependency(
-    "r8-v2-0-74",
-    Paths.get("third_party", "r8-releases","2.0.74").toFile(),
-    Paths.get("third_party", "r8-releases", "2.0.74.tar.gz.sha1").toFile())
-  val r8v3_2_54 = ThirdPartyDependency(
-    "r8-v3-2-54",
-    Paths.get("third_party", "r8-releases","3.2.54").toFile(),
-    Paths.get("third_party", "r8-releases", "3.2.54.tar.gz.sha1").toFile())
-  val r8v8_0_46 = ThirdPartyDependency(
-    "r8-v8-0-46",
-    Paths.get("third_party", "r8-releases","8.0.46").toFile(),
-    Paths.get("third_party", "r8-releases", "8.0.46.tar.gz.sha1").toFile())
-  val retraceBenchmark = ThirdPartyDependency(
-    "retrace-benchmark",
-    Paths.get("third_party", "retrace_benchmark").toFile(),
-    Paths.get("third_party", "retrace_benchmark.tar.gz.sha1").toFile())
-  val retraceBinaryCompatibility = ThirdPartyDependency(
-    "retrace-binary-compatibility",
-    Paths.get("third_party", "retrace", "binary_compatibility").toFile(),
-    Paths.get("third_party", "retrace", "binary_compatibility.tar.gz.sha1").toFile())
-  val retracePartitionFormats = ThirdPartyDependency(
-    "retrace-partition-formats",
-    Paths.get("third_party", "retrace", "partition_formats").toFile(),
-    Paths.get("third_party", "retrace", "partition_formats.tar.gz.sha1").toFile())
-  val retraceInternal = ThirdPartyDependency(
-    "retrace-internal",
-    Paths.get("third_party", "retrace_internal").toFile(),
-    Paths.get("third_party", "retrace_internal.tar.gz.sha1").toFile(),
-    DependencyType.X20)
-  val rhino = ThirdPartyDependency(
-    "rhino",
-    Paths.get("third_party", "rhino-1.7.10").toFile(),
-    Paths.get("third_party", "rhino-1.7.10.tar.gz.sha1").toFile())
-  val rhinoAndroid = ThirdPartyDependency(
-    "rhino-android",
-    Paths.get("third_party", "rhino-android-1.1.1").toFile(),
-    Paths.get("third_party", "rhino-android-1.1.1.tar.gz.sha1").toFile())
-  val smali = ThirdPartyDependency(
-    "smali",
-    Paths.get("third_party", "smali").toFile(),
-    Paths.get("third_party", "smali.tar.gz.sha1").toFile())
-  val systemUI = ThirdPartyDependency(
-    "systemUI",
-    Paths.get("third_party", "closedsource-apps", "systemui").toFile(),
-    Paths.get("third_party", "closedsource-apps", "systemui.tar.gz.sha1").toFile(),
-    DependencyType.X20)
-  val tivi = ThirdPartyDependency(
-    "tivi",
-    Paths.get("third_party", "opensource-apps", "tivi").toFile(),
-    Paths.get("third_party", "opensource-apps", "tivi.tar.gz.sha1").toFile())
-  val youtube1719 = ThirdPartyDependency(
-    "youtube-17.19",
-    Paths.get("third_party", "youtube", "youtube.android_17.19").toFile(),
-    Paths.get("third_party", "youtube", "youtube.android_17.19.tar.gz.sha1").toFile(),
-    DependencyType.X20)
+  val proguardsettings =
+    ThirdPartyDependency(
+      "proguardsettings",
+      Paths.get("third_party", "proguardsettings").toFile(),
+      Paths.get("third_party", "proguardsettings.tar.gz.sha1").toFile(),
+      DependencyType.X20,
+    )
+  val protoc =
+    ThirdPartyDependency(
+      "protoc",
+      Paths.get("third_party", "protoc").toFile(),
+      Paths.get("third_party", "protoc.tar.gz.sha1").toFile(),
+    )
+  val protoRuntimeEdition2023 =
+    ThirdPartyDependency(
+      "protoRuntimeEdition2023",
+      Paths.get("third_party", "proto", "runtime", "edition2023").toFile(),
+      Paths.get("third_party", "proto", "runtime", "edition2023.tar.gz.sha1").toFile(),
+      DependencyType.X20,
+    )
+  val protoRuntimeLegacy =
+    ThirdPartyDependency(
+      "protoRuntimeLegacy",
+      Paths.get("third_party", "proto", "runtime", "legacy").toFile(),
+      Paths.get("third_party", "proto", "runtime", "legacy.tar.gz.sha1").toFile(),
+      DependencyType.X20,
+    )
+  val protoTestEdition2023 =
+    ThirdPartyDependency(
+      "protoTestEdition2023",
+      Paths.get("third_party", "proto", "test", "edition2023").toFile(),
+      Paths.get("third_party", "proto", "test", "edition2023.tar.gz.sha1").toFile(),
+      DependencyType.X20,
+    )
+  val protoTestProto2 =
+    ThirdPartyDependency(
+      "protoTestProto2",
+      Paths.get("third_party", "proto", "test", "proto2").toFile(),
+      Paths.get("third_party", "proto", "test", "proto2.tar.gz.sha1").toFile(),
+      DependencyType.X20,
+    )
+  val protoTestProto3 =
+    ThirdPartyDependency(
+      "protoTestProto3",
+      Paths.get("third_party", "proto", "test", "proto3").toFile(),
+      Paths.get("third_party", "proto", "test", "proto3.tar.gz.sha1").toFile(),
+      DependencyType.X20,
+    )
+  val r8 =
+    ThirdPartyDependency(
+      "r8",
+      Paths.get("third_party", "r8").toFile(),
+      Paths.get("third_party", "r8.tar.gz.sha1").toFile(),
+    )
+  val r8Mappings =
+    ThirdPartyDependency(
+      "r8-mappings",
+      Paths.get("third_party", "r8mappings").toFile(),
+      Paths.get("third_party", "r8mappings.tar.gz.sha1").toFile(),
+    )
+  val r8v2_0_74 =
+    ThirdPartyDependency(
+      "r8-v2-0-74",
+      Paths.get("third_party", "r8-releases", "2.0.74").toFile(),
+      Paths.get("third_party", "r8-releases", "2.0.74.tar.gz.sha1").toFile(),
+    )
+  val r8v3_2_54 =
+    ThirdPartyDependency(
+      "r8-v3-2-54",
+      Paths.get("third_party", "r8-releases", "3.2.54").toFile(),
+      Paths.get("third_party", "r8-releases", "3.2.54.tar.gz.sha1").toFile(),
+    )
+  val r8v8_0_46 =
+    ThirdPartyDependency(
+      "r8-v8-0-46",
+      Paths.get("third_party", "r8-releases", "8.0.46").toFile(),
+      Paths.get("third_party", "r8-releases", "8.0.46.tar.gz.sha1").toFile(),
+    )
+  val retraceBenchmark =
+    ThirdPartyDependency(
+      "retrace-benchmark",
+      Paths.get("third_party", "retrace_benchmark").toFile(),
+      Paths.get("third_party", "retrace_benchmark.tar.gz.sha1").toFile(),
+    )
+  val retraceBinaryCompatibility =
+    ThirdPartyDependency(
+      "retrace-binary-compatibility",
+      Paths.get("third_party", "retrace", "binary_compatibility").toFile(),
+      Paths.get("third_party", "retrace", "binary_compatibility.tar.gz.sha1").toFile(),
+    )
+  val retracePartitionFormats =
+    ThirdPartyDependency(
+      "retrace-partition-formats",
+      Paths.get("third_party", "retrace", "partition_formats").toFile(),
+      Paths.get("third_party", "retrace", "partition_formats.tar.gz.sha1").toFile(),
+    )
+  val retraceInternal =
+    ThirdPartyDependency(
+      "retrace-internal",
+      Paths.get("third_party", "retrace_internal").toFile(),
+      Paths.get("third_party", "retrace_internal.tar.gz.sha1").toFile(),
+      DependencyType.X20,
+    )
+  val rhino =
+    ThirdPartyDependency(
+      "rhino",
+      Paths.get("third_party", "rhino-1.7.10").toFile(),
+      Paths.get("third_party", "rhino-1.7.10.tar.gz.sha1").toFile(),
+    )
+  val rhinoAndroid =
+    ThirdPartyDependency(
+      "rhino-android",
+      Paths.get("third_party", "rhino-android-1.1.1").toFile(),
+      Paths.get("third_party", "rhino-android-1.1.1.tar.gz.sha1").toFile(),
+    )
+  val smali =
+    ThirdPartyDependency(
+      "smali",
+      Paths.get("third_party", "smali").toFile(),
+      Paths.get("third_party", "smali.tar.gz.sha1").toFile(),
+    )
+  val systemUI =
+    ThirdPartyDependency(
+      "systemUI",
+      Paths.get("third_party", "closedsource-apps", "systemui").toFile(),
+      Paths.get("third_party", "closedsource-apps", "systemui.tar.gz.sha1").toFile(),
+      DependencyType.X20,
+    )
+  val tivi =
+    ThirdPartyDependency(
+      "tivi",
+      Paths.get("third_party", "opensource-apps", "tivi").toFile(),
+      Paths.get("third_party", "opensource-apps", "tivi.tar.gz.sha1").toFile(),
+    )
+  val youtube1719 =
+    ThirdPartyDependency(
+      "youtube-17.19",
+      Paths.get("third_party", "youtube", "youtube.android_17.19").toFile(),
+      Paths.get("third_party", "youtube", "youtube.android_17.19.tar.gz.sha1").toFile(),
+      DependencyType.X20,
+    )
 }
 
-fun getThirdPartyAndroidJars() : List<ThirdPartyDependency> {
+fun getThirdPartyAndroidJars(): List<ThirdPartyDependency> {
   return listOf(
-    "libcore_latest",
-    "lib-main",
-    "lib-v14",
-    "lib-v15",
-    "lib-v19",
-    "lib-v21",
-    "lib-v22",
-    "lib-v23",
-    "lib-v24",
-    "lib-v25",
-    "lib-v26",
-    "lib-v27",
-    "lib-v28",
-    "lib-v29",
-    "lib-v30",
-    "lib-v31",
-    "lib-v32",
-    "lib-v33",
-    "lib-v34",
-    "lib-v35",
-    "lib-v36"
-  ).map(::getThirdPartyAndroidJar)
+      "libcore_latest",
+      "lib-main",
+      "lib-v14",
+      "lib-v15",
+      "lib-v19",
+      "lib-v21",
+      "lib-v22",
+      "lib-v23",
+      "lib-v24",
+      "lib-v25",
+      "lib-v26",
+      "lib-v27",
+      "lib-v28",
+      "lib-v29",
+      "lib-v30",
+      "lib-v31",
+      "lib-v32",
+      "lib-v33",
+      "lib-v34",
+      "lib-v35",
+      "lib-v36",
+    )
+    .map(::getThirdPartyAndroidJar)
 }
 
-fun getThirdPartyAndroidJar(version : String) : ThirdPartyDependency {
+fun getThirdPartyAndroidJar(version: String): ThirdPartyDependency {
   return ThirdPartyDependency(
     version,
     Paths.get("third_party", "android_jar", version).toFile(),
-    Paths.get("third_party", "android_jar", "$version.tar.gz.sha1").toFile())
+    Paths.get("third_party", "android_jar", "$version.tar.gz.sha1").toFile(),
+  )
 }
 
-fun getThirdPartyAndroidVms() : List<ThirdPartyDependency> {
+fun getThirdPartyAndroidVms(): List<ThirdPartyDependency> {
   return listOf(
-    listOf("host", "art-master"),
-    listOf("host", "art-15.0.0-beta2"),
-    listOf("host", "art-14.0.0-beta3"),
-    listOf("host", "art-13.0.0"),
-    listOf("host", "art-12.0.0-beta4"),
-    listOf("art-10.0.0"),
-    listOf("art-5.1.1"),
-    listOf("art-6.0.1"),
-    listOf("art-7.0.0"),
-    listOf("art-8.1.0"),
-    listOf("art-9.0.0"),
-    listOf("art"),
-    listOf("dalvik-4.0.4"),
-    listOf("dalvik")).map(::getThirdPartyAndroidVm)
+      listOf("host", "art-master"),
+      listOf("host", "art-15.0.0-beta2"),
+      listOf("host", "art-14.0.0-beta3"),
+      listOf("host", "art-13.0.0"),
+      listOf("host", "art-12.0.0-beta4"),
+      listOf("art-10.0.0"),
+      listOf("art-5.1.1"),
+      listOf("art-6.0.1"),
+      listOf("art-7.0.0"),
+      listOf("art-8.1.0"),
+      listOf("art-9.0.0"),
+      listOf("art"),
+      listOf("dalvik-4.0.4"),
+      listOf("dalvik"),
+    )
+    .map(::getThirdPartyAndroidVm)
 }
 
-fun getThirdPartyAndroidVm(version : List<String>) : ThirdPartyDependency {
+fun getThirdPartyAndroidVm(version: List<String>): ThirdPartyDependency {
   return ThirdPartyDependency(
     version.last(),
+    Paths.get("tools", "linux", *version.slice(0..version.size - 2).toTypedArray(), version.last())
+      .toFile(),
     Paths.get(
-      "tools",
-      "linux",
-      *version.slice(0..version.size - 2).toTypedArray(),
-      version.last()).toFile(),
-    Paths.get(
-      "tools",
-      "linux",
-      *version.slice(0..version.size - 2).toTypedArray(),
-      "${version.last()}.tar.gz.sha1").toFile())
+        "tools",
+        "linux",
+        *version.slice(0..version.size - 2).toTypedArray(),
+        "${version.last()}.tar.gz.sha1",
+      )
+      .toFile(),
+  )
 }
 
-fun getJdks() : List<ThirdPartyDependency> {
+fun getJdks(): List<ThirdPartyDependency> {
   val os: OperatingSystem = DefaultNativePlatform.getCurrentOperatingSystem()
   if (os.isLinux || os.isMacOsX) {
-    return Jdk.values().map{ it.getThirdPartyDependency()}
+    return Jdk.values().map { it.getThirdPartyDependency() }
   } else {
-    return Jdk.values().filter{ !it.isJdk8() }.map{ it.getThirdPartyDependency()}
+    return Jdk.values().filter { !it.isJdk8() }.map { it.getThirdPartyDependency() }
   }
 }
 
-fun getThirdPartyProguards() : List<ThirdPartyDependency> {
+fun getThirdPartyProguards(): List<ThirdPartyDependency> {
   return listOf(
-    "proguard5.2.1",
-    "proguard6.0.1",
-    "proguard-7.0.0",
-    "proguard-7.3.2",
-    "proguard-7.4.1")
-    .map { ThirdPartyDependency(
-      it,
-      Paths.get("third_party", "proguard", it).toFile(),
-      Paths.get("third_party", "proguard", "${it}.tar.gz.sha1").toFile())}
+      "proguard5.2.1",
+      "proguard6.0.1",
+      "proguard-7.0.0",
+      "proguard-7.3.2",
+      "proguard-7.4.1",
+    )
+    .map {
+      ThirdPartyDependency(
+        it,
+        Paths.get("third_party", "proguard", it).toFile(),
+        Paths.get("third_party", "proguard", "${it}.tar.gz.sha1").toFile(),
+      )
+    }
 }
 
-fun getThirdPartyKotlinCompilers() : List<ThirdPartyDependency> {
+fun getThirdPartyKotlinCompilers(): List<ThirdPartyDependency> {
   return listOf(
-    "kotlin-compiler-1.3.72",
-    "kotlin-compiler-1.4.20",
-    "kotlin-compiler-1.5.0",
-    "kotlin-compiler-1.6.0",
-    "kotlin-compiler-1.7.0",
-    "kotlin-compiler-1.8.0",
-    "kotlin-compiler-1.9.21",
-    "kotlin-compiler-2.0.20",
-    "kotlin-compiler-2.1.0-Beta1",
-    "kotlin-compiler-dev")
-    .map { ThirdPartyDependency(
-      it,
-      Paths.get("third_party", "kotlin", it).toFile(),
-      Paths.get("third_party", "kotlin", "${it}.tar.gz.sha1").toFile())}
+      "kotlin-compiler-1.3.72",
+      "kotlin-compiler-1.4.20",
+      "kotlin-compiler-1.5.0",
+      "kotlin-compiler-1.6.0",
+      "kotlin-compiler-1.7.0",
+      "kotlin-compiler-1.8.0",
+      "kotlin-compiler-1.9.21",
+      "kotlin-compiler-2.0.20",
+      "kotlin-compiler-2.1.0-Beta1",
+      "kotlin-compiler-dev",
+    )
+    .map {
+      ThirdPartyDependency(
+        it,
+        Paths.get("third_party", "kotlin", it).toFile(),
+        Paths.get("third_party", "kotlin", "${it}.tar.gz.sha1").toFile(),
+      )
+    }
 }
 
-fun getThirdPartyDesugarLibraryReleases() : List<ThirdPartyDependency> {
-  return listOf(
-    "1.0.9",
-    "1.0.10",
-    "1.1.0",
-    "1.1.1",
-    "1.1.5",
-    "2.0.3")
-    .map { ThirdPartyDependency(
+fun getThirdPartyDesugarLibraryReleases(): List<ThirdPartyDependency> {
+  return listOf("1.0.9", "1.0.10", "1.1.0", "1.1.1", "1.1.5", "2.0.3").map {
+    ThirdPartyDependency(
       "desugar-library-release-$it",
       Paths.get("third_party", "openjdk", "desugar_jdk_libs_releases", it).toFile(),
-      Paths.get("third_party", "openjdk", "desugar_jdk_libs_releases", "${it}.tar.gz.sha1").toFile())}
+      Paths.get("third_party", "openjdk", "desugar_jdk_libs_releases", "${it}.tar.gz.sha1").toFile(),
+    )
+  }
 }
 
-fun getInternalIssues() : List<ThirdPartyDependency> {
-  return listOf("issue-127524985")
-    .map { ThirdPartyDependency(
+fun getInternalIssues(): List<ThirdPartyDependency> {
+  return listOf("issue-127524985").map {
+    ThirdPartyDependency(
       "internal-$it",
       Paths.get("third_party", "internal", it).toFile(),
       Paths.get("third_party", "internal", "${it}.tar.gz.sha1").toFile(),
-      DependencyType.X20)}
+      DependencyType.X20,
+    )
+  }
 }
 
-fun getGmsCoreVersions() : List<ThirdPartyDependency> {
-  return listOf(
-    "gmscore_v10",
-    "latest")
-    .map { ThirdPartyDependency(
+fun getGmsCoreVersions(): List<ThirdPartyDependency> {
+  return listOf("gmscore_v10", "latest").map {
+    ThirdPartyDependency(
       "gmscore-version-$it",
       Paths.get("third_party", "gmscore", it).toFile(),
       Paths.get("third_party", "gmscore", "${it}.tar.gz.sha1").toFile(),
-      DependencyType.X20)}
+      DependencyType.X20,
+    )
+  }
 }
 
-private fun Project.allDependencies() : List<ThirdPartyDependency> {
+private fun Project.allDependencies(): List<ThirdPartyDependency> {
   val allDeps = mutableListOf<ThirdPartyDependency>()
   ThirdPartyDeps::class.declaredMemberProperties.forEach {
     val value = it.get(ThirdPartyDeps)
@@ -960,10 +1145,10 @@
   return allDeps
 }
 
-fun Project.allPublicDependencies() : List<ThirdPartyDependency> {
+fun Project.allPublicDependencies(): List<ThirdPartyDependency> {
   return allDependencies().filter { x -> x.type == DependencyType.GOOGLE_STORAGE }
 }
 
-fun Project.allInternalDependencies() : List<ThirdPartyDependency> {
+fun Project.allInternalDependencies(): List<ThirdPartyDependency> {
   return allDependencies().filter { x -> x.type == DependencyType.X20 }
 }
diff --git a/d8_r8/commonBuildSrc/src/main/kotlin/DownloadAllDependenciesTask.kt b/d8_r8/commonBuildSrc/src/main/kotlin/DownloadAllDependenciesTask.kt
index f05116d..8aa785d 100644
--- a/d8_r8/commonBuildSrc/src/main/kotlin/DownloadAllDependenciesTask.kt
+++ b/d8_r8/commonBuildSrc/src/main/kotlin/DownloadAllDependenciesTask.kt
@@ -25,7 +25,7 @@
 abstract class DownloadAllDependenciesTask : DefaultTask() {
 
   private var _root: File? = null
-  private var _thirdPartyDeps: List<ThirdPartyDependency>? = null;
+  private var _thirdPartyDeps: List<ThirdPartyDependency>? = null
 
   @InputFiles
   fun getInputFile(): List<File> {
@@ -39,17 +39,16 @@
 
   @OutputFiles
   fun getOutputFiles(): List<File> {
-      return _thirdPartyDeps!!.map {
-        _root!!.resolve(it.sha1File.resolveSibling(it.sha1File.name.replace(".sha1", "")))
-      }
+    return _thirdPartyDeps!!.map {
+      _root!!.resolve(it.sha1File.resolveSibling(it.sha1File.name.replace(".sha1", "")))
+    }
   }
 
-  @Inject
-  protected abstract fun getWorkerExecutor(): WorkerExecutor?
+  @Inject protected abstract fun getWorkerExecutor(): WorkerExecutor?
 
   fun setDependencies(root: File, thirdPartyDeps: List<ThirdPartyDependency>) {
     this._root = root
-    this._thirdPartyDeps = thirdPartyDeps;
+    this._thirdPartyDeps = thirdPartyDeps
   }
 
   @TaskAction
@@ -77,11 +76,11 @@
   }
 
   interface RunDownloadParameters : WorkParameters {
-    val type : Property<DependencyType>
-    val sha1File : RegularFileProperty
-    val outputDir : RegularFileProperty
-    val tarGzFile : RegularFileProperty
-    val root : RegularFileProperty
+    val type: Property<DependencyType>
+    val sha1File: RegularFileProperty
+    val outputDir: RegularFileProperty
+    val tarGzFile: RegularFileProperty
+    val root: RegularFileProperty
   }
 
   abstract class RunDownload : WorkAction<RunDownloadParameters> {
@@ -90,7 +89,7 @@
       val outputDir = parameters.outputDir.asFile.get()
       val tarGzFile = parameters.tarGzFile.asFile.get()
       if (!shouldExecute(outputDir, tarGzFile, sha1File)) {
-        return;
+        return
       }
       if (outputDir.exists() && outputDir.isDirectory) {
         outputDir.delete()
@@ -117,9 +116,12 @@
         runProcess(
           parameters,
           ProcessBuilder()
-            .command("bash",
-                     "-c",
-                     "download_from_google_storage " + java.lang.String.join(" ", args)))
+            .command(
+              "bash",
+              "-c",
+              "download_from_google_storage " + java.lang.String.join(" ", args),
+            ),
+        )
       }
     }
 
@@ -128,9 +130,10 @@
       if (OperatingSystem.current().isWindows) {
         throw RuntimeException("Downloading from x20 unsupported on windows")
       }
-      runProcess(parameters,
-        ProcessBuilder()
-          .command("bash", "-c", "tools/download_from_x20.py $sha1File"))
+      runProcess(
+        parameters,
+        ProcessBuilder().command("bash", "-c", "tools/download_from_x20.py $sha1File"),
+      )
     }
 
     @Throws(IOException::class, InterruptedException::class)
@@ -140,27 +143,30 @@
       val p = builder.start()
       val exit = p.waitFor()
       if (exit != 0) {
-        throw IOException("Process failed for $command\n"
-            + BufferedReader(
-            InputStreamReader(p.errorStream, StandardCharsets.UTF_8))
-            .lines()
-            .collect(Collectors.joining("\n")))
+        throw IOException(
+          "Process failed for $command\n" +
+            BufferedReader(InputStreamReader(p.errorStream, StandardCharsets.UTF_8))
+              .lines()
+              .collect(Collectors.joining("\n"))
+        )
       }
     }
   }
 
   companion object {
-    fun shouldExecute(outputDir: File, tarGzFile: File, sha1File: File) : Boolean {
+    fun shouldExecute(outputDir: File, tarGzFile: File, sha1File: File): Boolean {
       // First run will write the tar.gz file, causing the second run to still be out-of-date.
       // Check if the modification time of the tar is newer than the sha in which case we are done.
-      if (outputDir.exists()
-        && outputDir.isDirectory
-        && outputDir.list()!!.isNotEmpty()
-        && tarGzFile.exists()
-        && sha1File.lastModified() <= tarGzFile.lastModified()) {
+      if (
+        outputDir.exists() &&
+          outputDir.isDirectory &&
+          outputDir.list()!!.isNotEmpty() &&
+          tarGzFile.exists() &&
+          sha1File.lastModified() <= tarGzFile.lastModified()
+      ) {
         return false
       }
       return true
     }
   }
-}
\ No newline at end of file
+}
diff --git a/d8_r8/commonBuildSrc/src/main/kotlin/TestConfigurationHelper.kt b/d8_r8/commonBuildSrc/src/main/kotlin/TestConfigurationHelper.kt
index df95ae9..6b5f2a1 100644
--- a/d8_r8/commonBuildSrc/src/main/kotlin/TestConfigurationHelper.kt
+++ b/d8_r8/commonBuildSrc/src/main/kotlin/TestConfigurationHelper.kt
@@ -26,16 +26,19 @@
       out.append("--------------------------------------\n")
       val retracePath = project.getRoot().resolveAll("tools", "retrace.py")
       val command =
-              mutableListOf(
-                      "python3", retracePath.toString(),
-                      "--quiet",
-                      "--map", mappingFile.toString(),
-                      "--r8jar", r8jar.toString())
+        mutableListOf(
+          "python3",
+          retracePath.toString(),
+          "--quiet",
+          "--map",
+          mappingFile.toString(),
+          "--r8jar",
+          r8jar.toString(),
+        )
       val process = ProcessBuilder(command).start()
       process.outputStream.use { exception.printStackTrace(PrintStream(it)) }
       process.outputStream.close()
-      val processCompleted = process.waitFor(20L, TimeUnit.SECONDS)
-        && process.exitValue() == 0
+      val processCompleted = process.waitFor(20L, TimeUnit.SECONDS) && process.exitValue() == 0
       out.append(process.inputStream.bufferedReader().use { it.readText() })
       if (!processCompleted) {
         out.append(command.joinToString(" ") + "\n")
@@ -46,7 +49,7 @@
         out.append("\n\n--------------------------------------\n")
         out.append("OBFUSCATED STACKTRACE\n")
         out.append("--------------------------------------\n")
-        var baos = ByteArrayOutputStream();
+        var baos = ByteArrayOutputStream()
         exception.printStackTrace(PrintStream(baos, true, StandardCharsets.UTF_8))
         out.append(baos.toString())
       }
@@ -68,8 +71,7 @@
         test.systemProperty("com.android.tools.r8.kotlincompilerold", "1")
       }
 
-      if (project.hasProperty("dex_vm")
-          && project.property("dex_vm") != "default") {
+      if (project.hasProperty("dex_vm") && project.property("dex_vm") != "default") {
         println("NOTE: Running with non default vm: " + project.property("dex_vm"))
         test.systemProperty("dex_vm", project.property("dex_vm")!!)
       }
@@ -83,7 +85,8 @@
       if (project.hasProperty("art_profile_rewriting_completeness_check")) {
         test.systemProperty(
           "com.android.tools.r8.artprofilerewritingcompletenesscheck",
-          project.property("art_profile_rewriting_completeness_check")!!)
+          project.property("art_profile_rewriting_completeness_check")!!,
+        )
       }
 
       if (project.hasProperty("disable_assertions")) {
@@ -92,18 +95,20 @@
 
       // Forward project properties into system properties.
       listOf(
-        "local_development",
-        "slow_tests",
-        "desugar_jdk_json_dir",
-        "desugar_jdk_libs",
-        "test_dir",
-        "command_cache_dir",
-        "command_cache_stats_dir").forEach {
-        val propertyName = it
-        if (project.hasProperty(propertyName)) {
-          project.property(propertyName)?.let { v -> test.systemProperty(propertyName, v) }
+          "local_development",
+          "slow_tests",
+          "desugar_jdk_json_dir",
+          "desugar_jdk_libs",
+          "test_dir",
+          "command_cache_dir",
+          "command_cache_stats_dir",
+        )
+        .forEach {
+          val propertyName = it
+          if (project.hasProperty(propertyName)) {
+            project.property(propertyName)?.let { v -> test.systemProperty(propertyName, v) }
+          }
         }
-      }
 
       if (project.hasProperty("no_internal")) {
         test.exclude("com/android/tools/r8/internal/**")
@@ -121,53 +126,63 @@
         test.maxHeapSize = "4G"
       }
 
-      if (isR8Lib
-        || project.hasProperty("one_line_per_test")
-        || project.hasProperty("update_test_timestamp")) {
-        test.addTestListener(object : TestListener {
-          val testTimes = mutableMapOf<TestDescriptor?,Long>()
-          val maxPrintTimesCount = 200
-          override fun beforeSuite(desc: TestDescriptor?) {}
-          override fun afterSuite(desc: TestDescriptor?, result: TestResult?) {
-            if (project.hasProperty("print_times")) {
-              // desc.parent == null when we are all done
-              if (desc?.parent == null) {
-                testTimes.toList()
-                  .sortedByDescending { it.second }
-                  .take(maxPrintTimesCount)
-                  .forEach {
-                    println("${it.first} took: ${it.second}")
+      if (
+        isR8Lib ||
+          project.hasProperty("one_line_per_test") ||
+          project.hasProperty("update_test_timestamp")
+      ) {
+        test.addTestListener(
+          object : TestListener {
+            val testTimes = mutableMapOf<TestDescriptor?, Long>()
+            val maxPrintTimesCount = 200
+
+            override fun beforeSuite(desc: TestDescriptor?) {}
+
+            override fun afterSuite(desc: TestDescriptor?, result: TestResult?) {
+              if (project.hasProperty("print_times")) {
+                // desc.parent == null when we are all done
+                if (desc?.parent == null) {
+                  testTimes
+                    .toList()
+                    .sortedByDescending { it.second }
+                    .take(maxPrintTimesCount)
+                    .forEach { println("${it.first} took: ${it.second}") }
                 }
               }
             }
-          }
-          override fun beforeTest(desc: TestDescriptor?) {
-            if (project.hasProperty("one_line_per_test")) {
-              println("Start executing ${desc}")
-            }
-            if (project.hasProperty("print_times")) {
-              testTimes[desc] = Date().getTime()
-            }
-          }
 
-          override fun afterTest(desc: TestDescriptor?, result: TestResult?) {
-            if (project.hasProperty("one_line_per_test")) {
-              println("Done executing ${desc} with result: ${result?.resultType}")
+            override fun beforeTest(desc: TestDescriptor?) {
+              if (project.hasProperty("one_line_per_test")) {
+                println("Start executing ${desc}")
+              }
+              if (project.hasProperty("print_times")) {
+                testTimes[desc] = Date().getTime()
+              }
             }
-            if (project.hasProperty("print_times")) {
-              testTimes[desc] = Date().getTime() - testTimes[desc]!!
-            }
-            if (project.hasProperty("update_test_timestamp")) {
-              File(project.property("update_test_timestamp")!!.toString())
-                .writeText(Date().getTime().toString())
-            }
-            if (isR8Lib
-              && result?.resultType == TestResult.ResultType.FAILURE
-              && result.exception != null) {
-              println(retrace(project, r8Jar!!, r8LibMappingFile!!, result.exception as Throwable))
+
+            override fun afterTest(desc: TestDescriptor?, result: TestResult?) {
+              if (project.hasProperty("one_line_per_test")) {
+                println("Done executing ${desc} with result: ${result?.resultType}")
+              }
+              if (project.hasProperty("print_times")) {
+                testTimes[desc] = Date().getTime() - testTimes[desc]!!
+              }
+              if (project.hasProperty("update_test_timestamp")) {
+                File(project.property("update_test_timestamp")!!.toString())
+                  .writeText(Date().getTime().toString())
+              }
+              if (
+                isR8Lib &&
+                  result?.resultType == TestResult.ResultType.FAILURE &&
+                  result.exception != null
+              ) {
+                println(
+                  retrace(project, r8Jar!!, r8LibMappingFile!!, result.exception as Throwable)
+                )
+              }
             }
           }
-        })
+        )
       }
 
       val userDefinedCoresPerFork = System.getenv("R8_GRADLE_CORES_PER_FORK")
diff --git a/d8_r8/commonBuildSrc/src/main/kotlin/TestingState.kt b/d8_r8/commonBuildSrc/src/main/kotlin/TestingState.kt
index 1b89075..7369840 100644
--- a/d8_r8/commonBuildSrc/src/main/kotlin/TestingState.kt
+++ b/d8_r8/commonBuildSrc/src/main/kotlin/TestingState.kt
@@ -28,12 +28,21 @@
     const val PATH_PROPERTY = "testing-state-path"
 
     // Operating mode for the test state.
-    enum class Mode { ALL, OUTSTANDING, FAILING, PAST_FAILING }
+    enum class Mode {
+      ALL,
+      OUTSTANDING,
+      FAILING,
+      PAST_FAILING,
+    }
 
     // These are the files that are allowed for tracking test status.
-    enum class StatusType { SUCCESS, FAILURE, PAST_FAILURE }
+    enum class StatusType {
+      SUCCESS,
+      FAILURE,
+      PAST_FAILURE,
+    }
 
-    fun getRerunMode(project: Project) : Mode? {
+    fun getRerunMode(project: Project): Mode? {
       val prop = project.findProperty(MODE_PROPERTY) ?: return null
       return when (prop.toString().lowercase()) {
         "all" -> Mode.ALL
@@ -74,18 +83,14 @@
       }
       val statusType = getStatusTypeForMode(mode)
       val statusOutputFile = indexDir.resolve("${projectName}.${statusType.name}.txt")
-      val findStatusTask = task.project.tasks.register<Exec>("${projectName}-find-status-files")
-      {
-        inputs.dir(reportDir)
-        outputs.file(statusOutputFile)
-        workingDir(reportDir)
-        commandLine(
-          "find", ".", "-name", statusType.name
-        )
-        doFirst {
-          standardOutput = statusOutputFile.outputStream()
+      val findStatusTask =
+        task.project.tasks.register<Exec>("${projectName}-find-status-files") {
+          inputs.dir(reportDir)
+          outputs.file(statusOutputFile)
+          workingDir(reportDir)
+          commandLine("find", ".", "-name", statusType.name)
+          doFirst { standardOutput = statusOutputFile.outputStream() }
         }
-      }
       task.dependsOn(findStatusTask)
       task.doFirst {
         if (mode == Mode.OUTSTANDING) {
@@ -93,13 +98,16 @@
             statusType,
             findStatusTask.get().outputs.files.singleFile,
             task.logger,
-            { clazz, name -> task.filter.excludeTestsMatching("${clazz}.${name}") })
+            { clazz, name -> task.filter.excludeTestsMatching("${clazz}.${name}") },
+          )
         } else {
-          val hasMatch = forEachTestReportStatusMatching(
-            statusType,
-            findStatusTask.get().outputs.files.singleFile,
-            task.logger,
-            { clazz, name -> task.filter.includeTestsMatching("${clazz}.${name}") })
+          val hasMatch =
+            forEachTestReportStatusMatching(
+              statusType,
+              findStatusTask.get().outputs.files.singleFile,
+              task.logger,
+              { clazz, name -> task.filter.includeTestsMatching("${clazz}.${name}") },
+            )
           if (!hasMatch) {
             // Add a filter that does not match to ensure the test run is not "without filters"
             // which would run all tests.
@@ -109,108 +117,108 @@
       }
     }
 
-    private fun addTestHandler(
-      task: Test,
-      projectName: String,
-      index: File,
-      reportDir: File) {
-      task.addTestOutputListener(object : TestOutputListener {
-        override fun onOutput(desc: TestDescriptor, event: TestOutputEvent) {
-          withTestResultEntryWriter(reportDir, desc, event.getDestination().name, true, {
-            it.append(event.getMessage())
-          })
-        }
-      })
-      task.addTestListener(object : TestListener {
-
-        override fun beforeSuite(desc: TestDescriptor) {}
-
-        override fun afterSuite(desc: TestDescriptor, result: TestResult) {
-          if (desc.parent != null) {
-            return
+    private fun addTestHandler(task: Test, projectName: String, index: File, reportDir: File) {
+      task.addTestOutputListener(
+        object : TestOutputListener {
+          override fun onOutput(desc: TestDescriptor, event: TestOutputEvent) {
+            withTestResultEntryWriter(
+              reportDir,
+              desc,
+              event.getDestination().name,
+              true,
+              { it.append(event.getMessage()) },
+            )
           }
-          // Update the final test results in the index.
-          val text = StringBuilder()
-          val successColor = "#a2ff99"
-          val failureColor = "#ff6454"
-          val emptyColor = "#d4d4d4"
-          val color: String;
-          if (result.testCount == 0L) {
-            color = emptyColor
-          } else if (result.resultType == TestResult.ResultType.SUCCESS) {
-            color = successColor
-          } else if (result.resultType == TestResult.ResultType.FAILURE) {
-            color = failureColor
-          } else {
-            color = failureColor
-          }
-          // The failure list has an open <ul> so close it before appending the module results.
-          text.append("</ul>")
-          text.append("<div style=\"background-color:${color}\">")
-          text.append("<h2>${projectName}: ${result.resultType.name}</h2>")
-          text.append("<ul>")
-          text.append("<li>Number of tests: ${result.testCount}")
-          text.append("<li>Failing tests: ${result.failedTestCount}")
-          text.append("<li>Successful tests: ${result.successfulTestCount}")
-          text.append("<li>Skipped tests: ${result.skippedTestCount}")
-          text.append("</ul></div>")
-          // Reopen a <ul> as other modules may still append test failures.
-          text.append("<ul>")
-
-          index.appendText(text.toString())
         }
+      )
+      task.addTestListener(
+        object : TestListener {
 
-        override fun beforeTest(desc: TestDescriptor) {
-          // Remove any stale output files before running the test.
-          for (destType in TestOutputEvent.Destination.values()) {
-            val destFile = getTestResultEntryOutputFile(reportDir, desc, destType.name)
-            if (destFile.exists()) {
-              destFile.delete()
+          override fun beforeSuite(desc: TestDescriptor) {}
+
+          override fun afterSuite(desc: TestDescriptor, result: TestResult) {
+            if (desc.parent != null) {
+              return
+            }
+            // Update the final test results in the index.
+            val text = StringBuilder()
+            val successColor = "#a2ff99"
+            val failureColor = "#ff6454"
+            val emptyColor = "#d4d4d4"
+            val color: String
+            if (result.testCount == 0L) {
+              color = emptyColor
+            } else if (result.resultType == TestResult.ResultType.SUCCESS) {
+              color = successColor
+            } else if (result.resultType == TestResult.ResultType.FAILURE) {
+              color = failureColor
+            } else {
+              color = failureColor
+            }
+            // The failure list has an open <ul> so close it before appending the module results.
+            text.append("</ul>")
+            text.append("<div style=\"background-color:${color}\">")
+            text.append("<h2>${projectName}: ${result.resultType.name}</h2>")
+            text.append("<ul>")
+            text.append("<li>Number of tests: ${result.testCount}")
+            text.append("<li>Failing tests: ${result.failedTestCount}")
+            text.append("<li>Successful tests: ${result.successfulTestCount}")
+            text.append("<li>Skipped tests: ${result.skippedTestCount}")
+            text.append("</ul></div>")
+            // Reopen a <ul> as other modules may still append test failures.
+            text.append("<ul>")
+
+            index.appendText(text.toString())
+          }
+
+          override fun beforeTest(desc: TestDescriptor) {
+            // Remove any stale output files before running the test.
+            for (destType in TestOutputEvent.Destination.values()) {
+              val destFile = getTestResultEntryOutputFile(reportDir, desc, destType.name)
+              if (destFile.exists()) {
+                destFile.delete()
+              }
+            }
+          }
+
+          override fun afterTest(desc: TestDescriptor, result: TestResult) {
+            if (result.testCount != 1L) {
+              throw IllegalStateException("Unexpected test with more than one result: ${desc}")
+            }
+            updateStatusFiles(reportDir, desc, result.resultType)
+            // Emit the test time.
+            withTestResultEntryWriter(
+              reportDir,
+              desc,
+              "time",
+              false,
+              { it.append("${result.getEndTime() - result.getStartTime()}") },
+            )
+            // For failed tests, update the index and emit stack trace information.
+            if (result.resultType == ResultType.FAILURE) {
+              val title = testLinkContent(desc)
+              val link = getTestReportEntryURL(reportDir, desc)
+              index.appendText("<li><a href=\"${link}\">${title}</a></li>")
+              if (!result.exceptions.isEmpty()) {
+                printAllStackTracesToFile(
+                  result.exceptions,
+                  getTestResultEntryOutputFile(reportDir, desc, "exceptions-raw.txt"),
+                )
+                // The raw stacktrace has lots of useless gradle test runner frames.
+                // As a convenience filter out those so the stack is just easier to read.
+                filterStackTraces(result)
+                printAllStackTracesToFile(
+                  result.exceptions,
+                  getTestResultEntryOutputFile(reportDir, desc, "exceptions-filtered.txt"),
+                )
+              }
             }
           }
         }
-
-        override fun afterTest(desc: TestDescriptor, result: TestResult) {
-          if (result.testCount != 1L) {
-            throw IllegalStateException("Unexpected test with more than one result: ${desc}")
-          }
-          updateStatusFiles(reportDir, desc, result.resultType)
-          // Emit the test time.
-          withTestResultEntryWriter(reportDir, desc, "time", false, {
-            it.append("${result.getEndTime() - result.getStartTime()}")
-          })
-          // For failed tests, update the index and emit stack trace information.
-          if (result.resultType == ResultType.FAILURE) {
-            val title = testLinkContent(desc)
-            val link = getTestReportEntryURL(reportDir, desc)
-            index.appendText("<li><a href=\"${link}\">${title}</a></li>")
-            if (!result.exceptions.isEmpty()) {
-              printAllStackTracesToFile(
-                result.exceptions,
-                getTestResultEntryOutputFile(
-                  reportDir,
-                  desc,
-                  "exceptions-raw.txt"
-                )
-              )
-              // The raw stacktrace has lots of useless gradle test runner frames.
-              // As a convenience filter out those so the stack is just easier to read.
-              filterStackTraces(result)
-              printAllStackTracesToFile(
-                result.exceptions,
-                getTestResultEntryOutputFile(
-                  reportDir,
-                  desc,
-                  "exceptions-filtered.txt"
-                )
-              )
-            }
-          }
-        }
-      })
+      )
     }
 
-    private fun getStatusTypeForMode(mode: Mode) : StatusType {
+    private fun getStatusTypeForMode(mode: Mode): StatusType {
       return when (mode) {
         Mode.OUTSTANDING -> StatusType.SUCCESS
         Mode.FAILING -> StatusType.FAILURE
@@ -219,7 +227,7 @@
       }
     }
 
-    private fun getStatusTypeForResult(result: ResultType) : StatusType {
+    private fun getStatusTypeForResult(result: ResultType): StatusType {
       return when (result) {
         ResultType.FAILURE -> StatusType.FAILURE
         ResultType.SUCCESS -> StatusType.SUCCESS
@@ -228,10 +236,7 @@
     }
 
     private fun escapeHtml(string: String): String {
-      return string
-        .replace("&", "&amp;")
-        .replace("<", "&lt;")
-        .replace(">", "&gt;")
+      return string.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
     }
 
     private fun urlEncode(string: String): String {
@@ -239,7 +244,7 @@
       return URLEncoder.encode(string, "UTF-8").replace("+", "%20")
     }
 
-    private fun testLinkContent(desc: TestDescriptor) : String {
+    private fun testLinkContent(desc: TestDescriptor): String {
       val pkgR8 = "com.android.tools.r8."
       val className = desc.className!!
       val shortClassName =
@@ -295,11 +300,16 @@
       return reportDir.toPath().resolve(testClass)
     }
 
-    private fun getTestReportEntryDirFromString(reportDir: File, testClass: String, testName: String): File {
+    private fun getTestReportEntryDirFromString(
+      reportDir: File,
+      testClass: String,
+      testName: String,
+    ): File {
       return ensureDir(
         getTestReportClassDirPath(reportDir, testClass)
           .resolve(sanitizedTestName(testName))
-          .toFile())
+          .toFile()
+      )
     }
 
     private fun getTestReportEntryDirFromTest(reportDir: File, testDesc: TestDescriptor): File {
@@ -315,26 +325,25 @@
     private fun getTestResultEntryOutputFile(
       reportDir: File,
       testDesc: TestDescriptor,
-      fileName: String
+      fileName: String,
     ): File {
       val dir = getTestReportEntryDirFromTest(reportDir, testDesc).toPath()
       return dir.resolve(fileName).toFile()
     }
 
-    private fun updateStatusFiles(
-      reportDir: File,
-      desc: TestDescriptor,
-      result: ResultType) {
+    private fun updateStatusFiles(reportDir: File, desc: TestDescriptor, result: ResultType) {
       val statusFile = getStatusTypeForResult(result)
-      withTestResultEntryWriter(reportDir, desc, statusFile.name, false, {
-        it.append(statusFile.name)
-      })
+      withTestResultEntryWriter(
+        reportDir,
+        desc,
+        statusFile.name,
+        false,
+        { it.append(statusFile.name) },
+      )
       if (statusFile == StatusType.FAILURE) {
         getTestResultEntryOutputFile(reportDir, desc, StatusType.SUCCESS.name).delete()
         val pastFailure = StatusType.PAST_FAILURE.name
-        withTestResultEntryWriter(reportDir, desc, pastFailure, false, {
-          it.append(pastFailure)
-        })
+        withTestResultEntryWriter(reportDir, desc, pastFailure, false, { it.append(pastFailure) })
       } else {
         getTestResultEntryOutputFile(reportDir, desc, StatusType.FAILURE.name).delete()
       }
@@ -345,15 +354,18 @@
       testDesc: TestDescriptor,
       fileName: String,
       append: Boolean,
-      fn: (FileWriter) -> Unit
+      fn: (FileWriter) -> Unit,
     ) {
       val file = getTestResultEntryOutputFile(reportDir, testDesc, fileName)
       FileWriter(file, append).use(fn)
     }
 
     private fun forEachTestReportStatusMatching(
-      type: StatusType, file: File, logger: Logger, onTest: (String, String) -> Unit
-    ) : Boolean {
+      type: StatusType,
+      file: File,
+      logger: Logger,
+      onTest: (String, String) -> Unit,
+    ): Boolean {
       val fileName = type.name
       var hasMatch = false
       for (rawLine in file.bufferedReader().lineSequence()) {
@@ -373,4 +385,4 @@
       return hasMatch
     }
   }
-}
\ No newline at end of file
+}
diff --git a/d8_r8/commonBuildSrc/src/main/kotlin/ThirdPartyDependency.kt b/d8_r8/commonBuildSrc/src/main/kotlin/ThirdPartyDependency.kt
index 510892d..7ea90fb 100644
--- a/d8_r8/commonBuildSrc/src/main/kotlin/ThirdPartyDependency.kt
+++ b/d8_r8/commonBuildSrc/src/main/kotlin/ThirdPartyDependency.kt
@@ -6,11 +6,12 @@
 
 enum class DependencyType {
   GOOGLE_STORAGE,
-  X20
+  X20,
 }
 
 data class ThirdPartyDependency(
-  val packageName : String,
-  val path : File,
-  val sha1File : File,
-  val type: DependencyType = DependencyType.GOOGLE_STORAGE)
+  val packageName: String,
+  val path: File,
+  val sha1File: File,
+  val type: DependencyType = DependencyType.GOOGLE_STORAGE,
+)