Updater: Use generateBp plugin
Change-Id: Ic5431575b684ee2d416d5707e499f0cf538ce4c4
diff --git a/app/Android.bp b/app/Android.bp
index 7878184..634ad7e 100644
--- a/app/Android.bp
+++ b/app/Android.bp
@@ -20,6 +20,7 @@
system_ext_specific: true,
static_libs: [
+ // DO NOT EDIT THIS SECTION MANUALLY
"androidx.core_core-ktx",
"androidx.appcompat_appcompat",
"androidx.cardview_cardview",
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 6de50b2..3c0452e 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -1,10 +1,27 @@
import java.util.Properties
+import org.lineageos.generatebp.GenerateBpPlugin
+import org.lineageos.generatebp.GenerateBpPluginExtension
+import org.lineageos.generatebp.models.Module
plugins {
id("com.android.application")
id("kotlin-android")
}
+apply {
+ plugin<GenerateBpPlugin>()
+}
+
+buildscript {
+ repositories {
+ maven("https://raw.githubusercontent.com/lineage-next/gradle-generatebp/v1.2/.m2")
+ }
+
+ dependencies {
+ classpath("org.lineageos:gradle-generatebp:+")
+ }
+}
+
val keystorePropertiesFile = rootProject.file("keystore.properties")
val keystoreProperties = Properties().apply {
if (keystorePropertiesFile.exists()) {
@@ -78,3 +95,18 @@
implementation("androidx.recyclerview:recyclerview:1.2.1")
implementation("com.google.android.material:material:1.9.0-alpha01")
}
+
+configure<GenerateBpPluginExtension> {
+ targetSdk.set(android.defaultConfig.targetSdk!!)
+ availableInAOSP.set { module: Module ->
+ when {
+ module.group.startsWith("androidx") -> true
+ module.group.startsWith("org.jetbrains") -> true
+ module.group == "com.google.android.material" -> true
+ module.group == "com.google.errorprone" -> true
+ module.group == "com.google.guava" -> true
+ module.group == "junit" -> true
+ else -> false
+ }
+ }
+}