fixup! Etar: Use generateBp plugin
Change-Id: Iecc624942f89deefe8094ce77fd969c0def29f4d
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index c8aeb12..ed11225 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -1,4 +1,7 @@
import com.android.build.gradle.internal.tasks.factory.dependsOn
+import org.lineageos.generatebp.GenerateBpPlugin
+import org.lineageos.generatebp.GenerateBpPluginExtension
+import org.lineageos.generatebp.models.Module
plugins {
id("com.android.application")
@@ -6,6 +9,20 @@
id("org.ec4j.editorconfig")
}
+apply {
+ plugin<GenerateBpPlugin>()
+}
+
+buildscript {
+ repositories {
+ maven("https://raw.githubusercontent.com/lineage-next/gradle-generatebp/v1.9/.m2")
+ }
+
+ dependencies {
+ classpath("org.lineageos:gradle-generatebp:+")
+ }
+}
+
editorconfig {
excludes = listOf("external/**", "metadata/**", "**/*.webp")
}
@@ -142,4 +159,16 @@
implementation("androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version")
}
+configure<GenerateBpPluginExtension> {
+ targetSdk.set(android.defaultConfig.targetSdk!!)
+ availableInAOSP.set { module: Module ->
+ when {
+ module.group.startsWith("androidx") -> true
+ module.group.startsWith("com.google") -> true
+ module.group.startsWith("org.jetbrains") -> true
+ else -> false
+ }
+ }
+}
+
tasks.preBuild.dependsOn(":aarGen")
diff --git a/app/generatebp.gradle.kts b/app/generatebp.gradle.kts
deleted file mode 100644
index 41b161e..0000000
--- a/app/generatebp.gradle.kts
+++ /dev/null
@@ -1,29 +0,0 @@
-import org.lineageos.generatebp.GenerateBpPlugin
-import org.lineageos.generatebp.GenerateBpPluginExtension
-import org.lineageos.generatebp.models.Module
-
-apply {
- plugin<GenerateBpPlugin>()
-}
-
-buildscript {
- repositories {
- maven("https://raw.githubusercontent.com/lineage-next/gradle-generatebp/v1.9/.m2")
- }
-
- dependencies {
- classpath("org.lineageos:gradle-generatebp:+")
- }
-}
-
-configure<GenerateBpPluginExtension> {
- targetSdk.set(extra.get("targetSdk") as Int)
- availableInAOSP.set { module: Module ->
- when {
- module.group.startsWith("androidx") -> true
- module.group.startsWith("com.google") -> true
- module.group.startsWith("org.jetbrains") -> true
- else -> false
- }
- }
-}