From b8bd8122a10f08a99b4a12014f7e24942e40331b Mon Sep 17 00:00:00 2001 From: yingchen Date: Wed, 10 Jul 2024 23:25:31 -0700 Subject: [PATCH] feat: Mark Bento as deprecated --- README.md | 13 ++++++++----- .../yelp/android/bento/compose/ComposeViewHolder.kt | 5 ++++- .../java/com/yelp/android/bento/core/Component.java | 4 ++++ .../yelp/android/bento/core/ComponentController.kt | 3 +++ .../com/yelp/android/bento/core/ComponentGroup.java | 4 ++++ .../yelp/android/bento/core/ComponentViewHolder.kt | 3 +++ 6 files changed, 26 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index bd4ff95..a1b7893 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,10 @@ - +# ⛔️ DEPRECATED +This is no longer supported, please consider using [Jetpack Compose](https://developer.android.com/develop/ui/compose) instead. -## A delicious framework for building modularized Android user interfaces, by Yelp. + +### A delicious framework for building modularized Android user interfaces, by Yelp. +![No Maintenance Intended](https://unmaintained.tech/badge.svg) ![Maven Central](https://img.shields.io/maven-central/v/com.yelp.android/bento.svg) [![Build Status](https://travis-ci.org/Yelp/bento.svg?branch=master)](https://travis-ci.org/Yelp/bento) [![Twitter](https://img.shields.io/badge/Twitter-@YelpEngineering-blue.svg)](https://twitter.com/YelpEngineering) @@ -54,9 +57,9 @@ Bento can be setup with Gradle: ```groovy // Top level build.gradle allprojects { - repositories { - mavenCentral() - } + repositories { + mavenCentral() + } } // Module level build.gradle diff --git a/bento-compose/src/main/java/com/yelp/android/bento/compose/ComposeViewHolder.kt b/bento-compose/src/main/java/com/yelp/android/bento/compose/ComposeViewHolder.kt index fccc3d7..159a613 100644 --- a/bento-compose/src/main/java/com/yelp/android/bento/compose/ComposeViewHolder.kt +++ b/bento-compose/src/main/java/com/yelp/android/bento/compose/ComposeViewHolder.kt @@ -11,9 +11,12 @@ import androidx.compose.ui.platform.ComposeView import com.yelp.android.bento.core.ComponentViewHolder /** - * ViewHolder which allows compatability with Jetpack Compose. Basically, this lets you write the + * ViewHolder which allows compatibility with Jetpack Compose. Basically, this lets you write the * view holders view code with Compose. */ +@Deprecated( + message = "Bento is deprecated! Only use ComposeViewHolder temporarily while migrating to full Jetpack Compose. Note that using Compose inside Bento may reduce performance. Please ensure a plan to migrate fully to Jetpack Compose soon.", +) abstract class ComposeViewHolder : ComponentViewHolder() { private lateinit var composeView: ComposeView diff --git a/bento/src/main/java/com/yelp/android/bento/core/Component.java b/bento/src/main/java/com/yelp/android/bento/core/Component.java index 0be7ab3..cc3de79 100644 --- a/bento/src/main/java/com/yelp/android/bento/core/Component.java +++ b/bento/src/main/java/com/yelp/android/bento/core/Component.java @@ -10,6 +10,9 @@ import java.util.List; /** + * @deprecated Bento is deprecated! + *

Please consider using Jetpack Compose https://developer.android.com/jetpack/compose instead.

+ *
* The building block of user interfaces in the Bento framework. Represents a self-contained * component to be used with a {@link ComponentController}. * @@ -20,6 +23,7 @@ * a user interface as a series of modular components instead of a complicated set of internal items * whose state must be managed by the component. */ +@Deprecated public abstract class Component { private final ComponentDataObservable mObservable = new ComponentDataObservable(); diff --git a/bento/src/main/java/com/yelp/android/bento/core/ComponentController.kt b/bento/src/main/java/com/yelp/android/bento/core/ComponentController.kt index 1fbc97c..79d26af 100644 --- a/bento/src/main/java/com/yelp/android/bento/core/ComponentController.kt +++ b/bento/src/main/java/com/yelp/android/bento/core/ComponentController.kt @@ -8,6 +8,9 @@ import com.yelp.android.bento.utils.AccordionList.Range *



* See: [Component], [ComponentViewHolder] */ +@Deprecated( + message = "Bento is deprecated! Please consider using Jetpack Compose https://developer.android.com/jetpack/compose instead.", +) interface ComponentController { /** diff --git a/bento/src/main/java/com/yelp/android/bento/core/ComponentGroup.java b/bento/src/main/java/com/yelp/android/bento/core/ComponentGroup.java index d7b248a..e67f84d 100644 --- a/bento/src/main/java/com/yelp/android/bento/core/ComponentGroup.java +++ b/bento/src/main/java/com/yelp/android/bento/core/ComponentGroup.java @@ -16,10 +16,14 @@ import java.util.Map.Entry; /** + * @deprecated Bento is deprecated! + *

Please consider using Jetpack Compose https://developer.android.com/jetpack/compose instead.

+ *
* A {@link Component} comprising of zero or more ordered child {@link Component}s. Useful for * maintaining a group of related components in close proximity to each other in the {@link * ComponentController}. */ +@Deprecated public class ComponentGroup extends Component { /** diff --git a/bento/src/main/java/com/yelp/android/bento/core/ComponentViewHolder.kt b/bento/src/main/java/com/yelp/android/bento/core/ComponentViewHolder.kt index 90f0af6..d5f29d6 100644 --- a/bento/src/main/java/com/yelp/android/bento/core/ComponentViewHolder.kt +++ b/bento/src/main/java/com/yelp/android/bento/core/ComponentViewHolder.kt @@ -15,6 +15,9 @@ import android.view.ViewGroup * no-arg constructor. Unfortunately, this means all subclasses must be visible from this package * and provide a no-arg constructor. */ +@Deprecated( + message = "Bento is deprecated! Please consider using Jetpack Compose https://developer.android.com/jetpack/compose instead.", +) abstract class ComponentViewHolder { /**