Skip to content

Commit

Permalink
ExactCalculator: Migrate generatebp to plugin declaration
Browse files Browse the repository at this point in the history
Change-Id: I38020976a6414c297ff37bbba7d2c7d1aaa4423f
  • Loading branch information
luca020400 committed Jan 10, 2025
1 parent 3ba7fcc commit 1a8f18b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 34 deletions.
2 changes: 1 addition & 1 deletion Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ android_app {

static_libs: [
// DO NOT EDIT THIS SECTION MANUALLY
"kotlin-stdlib",
"androidx.gridlayout_gridlayout",
"androidx.webkit_webkit",
"com.google.android.material_material",
"ExactCalculator_com.hp_crcalc",
"kotlin-stdlib",
],
}
17 changes: 2 additions & 15 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,13 @@
* 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.7.1"
id("org.jetbrains.kotlin.android") version "1.9.23"
}

apply {
plugin<GenerateBpPlugin>()
}

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

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

android {
Expand Down Expand Up @@ -82,6 +68,7 @@ dependencies {

configure<GenerateBpPluginExtension> {
targetSdk.set(android.defaultConfig.targetSdk!!)
minSdk.set(android.defaultConfig.minSdk!!)
availableInAOSP.set { module: Module ->
when {
module.group.startsWith("androidx") -> true
Expand Down
16 changes: 2 additions & 14 deletions libs/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,14 @@
// DO NOT EDIT THIS FILE MANUALLY

java_import {
name: "ExactCalculator_com.hp_crcalc-nodeps",
jars: ["com/hp/crcalc/1.0/crcalc-1.0.jar"],
sdk_version: "35",
min_sdk_version: "14",
apex_available: [
"//apex_available:platform",
"//apex_available:anyapex",
],
}

java_library_static {
name: "ExactCalculator_com.hp_crcalc",
jars: ["com/hp/crcalc/1.0/crcalc-1.0.jar"],
sdk_version: "35",
min_sdk_version: "14",
min_sdk_version: "31",
apex_available: [
"//apex_available:platform",
"//apex_available:anyapex",
],
static_libs: [
"ExactCalculator_com.hp_crcalc-nodeps",
],
java_version: "1.7",
}
6 changes: 3 additions & 3 deletions libs/com/hp/crcalc/1.0/crcalc-1.0.jar.license
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SPDX-FileCopyrightText: 2024 The Android Open Source Project
SPDX-FileCopyrightText: 2024 Silicon Graphics, Inc.
SPDX-FileCopyrightText: 2024 Hewlett-Packard Company
SPDX-FileCopyrightText: The Android Open Source Project
SPDX-FileCopyrightText: Silicon Graphics, Inc.
SPDX-FileCopyrightText: Hewlett-Packard Company

SPDX-License-Identifier: Apache-2.0
5 changes: 4 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023 The LineageOS Project
* SPDX-FileCopyrightText: 2023-2025 The LineageOS Project
* SPDX-License-Identifier: Apache-2.0
*/

Expand All @@ -8,8 +8,10 @@ pluginManagement {
gradlePluginPortal()
google()
mavenCentral()
maven("https://raw.githubusercontent.com/lineage-next/gradle-generatebp/v1.21/.m2")
}
}

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
Expand All @@ -18,4 +20,5 @@ dependencyResolutionManagement {
maven("https://raw.githubusercontent.com/lineage-next/crcalc/main/.m2")
}
}

rootProject.name = "ExactCalculator"

0 comments on commit 1a8f18b

Please sign in to comment.