Updater: Use generateBp plugin
Change-Id: Ic5431575b684ee2d416d5707e499f0cf538ce4c4
This commit is contained in:
@@ -20,6 +20,7 @@ android_app {
|
||||
system_ext_specific: true,
|
||||
|
||||
static_libs: [
|
||||
// DO NOT EDIT THIS SECTION MANUALLY
|
||||
"androidx.core_core-ktx",
|
||||
"androidx.appcompat_appcompat",
|
||||
"androidx.cardview_cardview",
|
||||
|
||||
@@ -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 @@ dependencies {
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user