Aperture: Align versions of all Kotlin components

Change-Id: I1bb1750047bae5e3ffdf32f30c71d98815014305
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 5b95ed8..048d3d5 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -51,6 +51,9 @@
 }
 
 dependencies {
+    // Align versions of all Kotlin components
+    implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0"))
+
     implementation("androidx.core:core-ktx:1.10.1")
     implementation("androidx.appcompat:appcompat:1.6.1")
     implementation("androidx.constraintlayout:constraintlayout:2.1.4")
@@ -159,7 +162,10 @@
     File("${project.projectDir.absolutePath}/Android.bp").let { file ->
         // Read dependencies
         val dependencies = "${spaces(8)}// DO NOT EDIT THIS SECTION MANUALLY\n".plus(
-            configuration.allDependencies.joinToString("\n") {
+            configuration.allDependencies.filter {
+                // kotlin-bom does not need to be added to dependencies
+                it.group != "org.jetbrains.kotlin" && it.name != "kotlin-bom"
+            }.joinToString("\n") {
                 if (isAvailableInAosp(it.group!!, it.name)) {
                     "${spaces(8)}\"${moduleNameAosp("${it.group}:${it.name}")}\","
                 } else {