Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab1bb82b authored by Georg Veichtlbauer's avatar Georg Veichtlbauer
Browse files

ExactCalculator: Add generateBp plugin

Change-Id: I7356c29b26cf9d590dfd53695d9770cb5ad927d1
parent d88145b1
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -32,7 +32,6 @@ android_app {
    product_specific: true,

    static_libs: [
        "cr",
        "androidx.core_core",
        "androidx.annotation_annotation",
        "androidx.appcompat_appcompat",
@@ -41,5 +40,5 @@ android_app {
        "androidx.gridlayout_gridlayout",
        "androidx.recyclerview_recyclerview",
        "com.google.android.material_material",
    ],
    ] + ["cr"],
}
+32 −0
Original line number Diff line number Diff line
@@ -3,11 +3,29 @@
 * SPDX-License-Identifier: Apache-2.0
 */

import org.lineageos.generatebp.GenerateBpPlugin
import org.lineageos.generatebp.GenerateBpPluginExtension
import org.lineageos.generatebp.models.Module

plugins {
    id("com.android.application") version "8.1.2"
    id("org.jetbrains.kotlin.android") version "1.7.10"
}

apply {
    plugin<GenerateBpPlugin>()
}

buildscript {
    repositories {
        maven("https://raw.githubusercontent.com/lineage-next/gradle-generatebp/v1.4/.m2")
    }

    dependencies {
        classpath("org.lineageos:gradle-generatebp:+")
    }
}

android {
    compileSdk = 34
    namespace = "com.android.calculator2"
@@ -62,3 +80,17 @@ dependencies {
    implementation("androidx.webkit:webkit:1.7.0")
    implementation("com.google.android.material:material:1.9.0")
}

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.errorprone" -> true
            module.group == "com.google.guava" -> true
            module.group == "junit" -> true
            else -> false
        }
    }
}