diff --git a/app/src/main/Android.bp b/app/Android.bp similarity index 79% rename from app/src/main/Android.bp rename to app/Android.bp index 843cc7ad..85355de5 100644 --- a/app/src/main/Android.bp +++ b/app/Android.bp @@ -17,22 +17,21 @@ android_app { name: "Recorder", - resource_dirs: ["res"], + manifest: "src/main/AndroidManifest.xml", + resource_dirs: ["src/main/res"], srcs: [ - "java/**/*.java", - "gen/**/*.java" + "src/main/java/**/*.java", + "src/main/gen/**/*.java" ], product_specific: true, static_libs: [ - "androidx.annotation_annotation", - "androidx-constraintlayout_constraintlayout", - "androidx-constraintlayout_constraintlayout-solver", + // DO NOT EDIT THIS SECTION MANUALLY "androidx.appcompat_appcompat", - "androidx.recyclerview_recyclerview", "com.google.android.material_material", + "androidx-constraintlayout_constraintlayout", ], sdk_version: "current", diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 51c5b535..a377fd40 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,7 +1,25 @@ +import org.lineageos.generatebp.GenerateBpPlugin +import org.lineageos.generatebp.GenerateBpPluginExtension +import org.lineageos.generatebp.models.Module + plugins { id("com.android.application") } +apply { + plugin() +} + +buildscript { + repositories { + maven("https://raw.githubusercontent.com/lineage-next/gradle-generatebp/v1.2/.m2") + } + + dependencies { + classpath("org.lineageos:gradle-generatebp:+") + } +} + android { compileSdk = 33 @@ -43,3 +61,16 @@ dependencies { implementation("com.google.android.material:material:1.6.1") implementation("androidx.constraintlayout:constraintlayout:2.1.4") } + +configure { + 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.guava" -> true + else -> false + } + } +}