Skip to content

Commit

Permalink
Merge pull request #15 from LDRAlighieri/update/material-1.9.0
Browse files Browse the repository at this point in the history
Update kotlin, coroutines, material and other library dependencies
  • Loading branch information
LDRAlighieri authored May 6, 2023
2 parents 399e6ea + 0a7bdca commit 5c9d176
Show file tree
Hide file tree
Showing 26 changed files with 229 additions and 87 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
java-version: 17

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/gradle-build-action@v2.4.2

- name: Build the sample app to verify it works
run: ./gradlew sample:assemble
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
java-version: 17

- name: Setup Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/gradle-build-action@v2.4.2

- name: Build the sample app to verify it works
run: ./gradlew sample:assemble
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
# ChangeLog


## Version 1.8.0

* New: Bindings list:
* Google "material" library bindings:
* `corbind-material`:
* `MaskableFrameLayout`:
* `maskChanges`
* New: Binary compatibility validator
* Update: Kotlin to v1.8.21.
* Update: Kotlin coroutines to v1.7.0.
* Update: Material components to v1.9.0.
* Update: Minor update of other libraries.


## Version 1.7.0

* New: Bindings list:
Expand Down
53 changes: 27 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[![Corbind](logo.svg)](https://ldralighieri.github.io/Corbind)

[![Maven Central](https://img.shields.io/maven-central/v/ru.ldralighieri.corbind/corbind.svg)](https://search.maven.org/search?q=g:ru.ldralighieri.corbind)
[![Kotlin Version](https://img.shields.io/badge/Kotlin-v1.8.0-blue.svg?logo=kotlin)](https://kotlinlang.org)
[![Kotlin Coroutines Version](https://img.shields.io/badge/Coroutines-v1.6.4-blue.svg)](https://kotlinlang.org/docs/reference/coroutines-overview.html)
[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0)
[![Kotlin Version](https://img.shields.io/badge/Kotlin-v1.8.21-blue.svg?logo=kotlin)](https://kotlinlang.org)
[![Kotlin Coroutines Version](https://img.shields.io/badge/Coroutines-v1.7.0-blue.svg)](https://kotlinlang.org/docs/reference/coroutines-overview.html)
[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/a1c9a1b1d1ce4ca7a201ab93492bf6e0)](https://app.codacy.com/gh/LDRAlighieri/Corbind)
[![API](https://img.shields.io/badge/API-14%2B-brightgreen.svg)](https://android-arsenal.com/api?level=14)
![Publish status](https://github.com/LDRAlighieri/Corbind/actions/workflows/publish.yml/badge.svg)
[![Publish status](https://github.com/LDRAlighieri/Corbind/actions/workflows/publish.yml/badge.svg)](https://github.com/LDRAlighieri/Corbind/actions)

[![Google Dev Library](https://img.shields.io/badge/Google_DevLibrary-Corbind-blue)](https://devlibrary.withgoogle.com/products/android/repos/LDRAlighieri-Corbind)
[![Android Weekly](https://androidweekly.net/issues/issue-377/badge)](https://androidweekly.net/issues/issue-377)
Expand All @@ -19,41 +19,42 @@

## Description

This library is for Android applications only. Help you to transform Android UI events into cold [Flow][flow], hot [ReceiveChannel][channel] or just perform an action through an [Actor][actor]. Please consider giving this repository a star ⭐ if you like the project.
This library is for Android applications only. Help you to transform Android UI events into cold [Flow][flow], hot [ReceiveChannel][channel] or just perform an action through an [Actor][actor].
Please consider giving this repository a star ⭐ if you like the project.


## Using in your projects

Platform bindings:
```kotlin
dependencies {
implementation("ru.ldralighieri.corbind:corbind:1.7.0")
implementation("ru.ldralighieri.corbind:corbind:1.8.0")
}
```

AndroidX library bindings:
```kotlin
dependencies {
implementation("ru.ldralighieri.corbind:corbind-activity:1.7.0")
implementation("ru.ldralighieri.corbind:corbind-appcompat:1.7.0")
implementation("ru.ldralighieri.corbind:corbind-core:1.7.0")
implementation("ru.ldralighieri.corbind:corbind-drawerlayout:1.7.0")
implementation("ru.ldralighieri.corbind:corbind-fragment:1.7.0")
implementation("ru.ldralighieri.corbind:corbind-leanback:1.7.0")
implementation("ru.ldralighieri.corbind:corbind-lifecycle:1.7.0")
implementation("ru.ldralighieri.corbind:corbind-navigation:1.7.0")
implementation("ru.ldralighieri.corbind:corbind-recyclerview:1.7.0")
implementation("ru.ldralighieri.corbind:corbind-slidingpanelayout:1.7.0")
implementation("ru.ldralighieri.corbind:corbind-swiperefreshlayout:1.7.0")
implementation("ru.ldralighieri.corbind:corbind-viewpager:1.7.0")
implementation("ru.ldralighieri.corbind:corbind-viewpager2:1.7.0")
implementation("ru.ldralighieri.corbind:corbind-activity:1.8.0")
implementation("ru.ldralighieri.corbind:corbind-appcompat:1.8.0")
implementation("ru.ldralighieri.corbind:corbind-core:1.8.0")
implementation("ru.ldralighieri.corbind:corbind-drawerlayout:1.8.0")
implementation("ru.ldralighieri.corbind:corbind-fragment:1.8.0")
implementation("ru.ldralighieri.corbind:corbind-leanback:1.8.0")
implementation("ru.ldralighieri.corbind:corbind-lifecycle:1.8.0")
implementation("ru.ldralighieri.corbind:corbind-navigation:1.8.0")
implementation("ru.ldralighieri.corbind:corbind-recyclerview:1.8.0")
implementation("ru.ldralighieri.corbind:corbind-slidingpanelayout:1.8.0")
implementation("ru.ldralighieri.corbind:corbind-swiperefreshlayout:1.8.0")
implementation("ru.ldralighieri.corbind:corbind-viewpager:1.8.0")
implementation("ru.ldralighieri.corbind:corbind-viewpager2:1.8.0")
}
```

Google 'material' library bindings:
```kotlin
dependencies {
implementation("ru.ldralighieri.corbind:corbind-material:1.7.0")
implementation("ru.ldralighieri.corbind:corbind-material:1.8.0")
}
```

Expand Down Expand Up @@ -94,7 +95,7 @@ You can find a list of extensions in the description of each module:

If you need to get a text change events of EditText widget, simple use case with cold [Flow][flow] will look something like this:
```kotlin
findViewById<EditText>(R.id.et_name)
findViewById<EditText>(R.id.etName)
.textChanges() // Flow<CharSequence>
.onEach { /* handle text change events */ }
.flowWithLifecycle(lifecycle)
Expand All @@ -104,7 +105,7 @@ findViewById<EditText>(R.id.et_name)
If you prefer hot [ReceiveChannel][channel] and you need to get a ViewPager page selection events, then the use case will transform in something like this:
```kotlin
launch {
findViewById<ViewPager>(R.id.vp_slides)
findViewById<ViewPager>(R.id.vpSlides)
.pageSelections(scope) // ReceiveChannel<Int>
.consumeEach {
/* handle ViewPager events */
Expand All @@ -115,7 +116,7 @@ launch {
And if you just need to perform an action on button click, the easiest way will be:
```kotlin
launch {
findViewById<AppCompatButton>(R.id.bt_confirm)
findViewById<AppCompatButton>(R.id.btConfirm)
.clicks {
/* perform an action on View click events */
}
Expand All @@ -125,15 +126,15 @@ launch {
Just one more traditional example of login button enabling/disabling by email and password field validation:
```kotlin
combine(
et_email.textChanges()
etEmail.textChanges() // Flow<CharSequence>
.map { Patterns.EMAIL_ADDRESS.matcher(it).matches() },

et_password.textChanges()
etPassword.textChanges() // Flow<CharSequence>
.map { it.length > 7 },

transform = { email, password -> email && password }
)
.onEach { bt_login.isEnabled = it }
.onEach { btLogin.isEnabled = it }
.flowWithLifecycle(lifecycle)
.launchIn(lifecycleScope) // lifecycle-runtime-ktx
```
Expand Down
Binary file removed build-logic/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 0 additions & 6 deletions build-logic/gradle/wrapper/gradle-wrapper.properties

This file was deleted.

2 changes: 1 addition & 1 deletion corbind-activity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ To add androidx activity bindings, import `corbind-activity` module:

```kotlin
dependencies {
implementation("ru.ldralighieri.corbind:corbind-activity:1.7.0")
implementation("ru.ldralighieri.corbind:corbind-activity:1.8.0")
}
```

Expand Down
2 changes: 1 addition & 1 deletion corbind-appcompat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ To add androidx appcompat bindings, import `corbind-appcompat` module:

```kotlin
dependencies {
implementation("ru.ldralighieri.corbind:corbind-appcompat:1.7.0")
implementation("ru.ldralighieri.corbind:corbind-appcompat:1.8.0")
}
```

Expand Down
2 changes: 1 addition & 1 deletion corbind-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ To add androidx core bindings, import `corbind-core` module:

```kotlin
dependencies {
implementation("ru.ldralighieri.corbind:corbind-core:1.7.0")
implementation("ru.ldralighieri.corbind:corbind-core:1.8.0")
}
```

Expand Down
4 changes: 2 additions & 2 deletions corbind-drawerlayout/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ To add androidx drawerlayout bindings, import `corbind-drawerlayout` module:

```kotlin
dependencies {
implementation("ru.ldralighieri.corbind:corbind-drawerlayout:1.7.0")
implementation("ru.ldralighieri.corbind:corbind-drawerlayout:1.8.0")
}
```

Expand All @@ -21,7 +21,7 @@ Component | Extension | Description
```kotlin
drawer.drawerOpens() // Flow<Boolean>
.onEach { isOpen ->
tv_message = "Drawer completely ${ if (isOpen) "open" else "close"}"
tvMessage = "Drawer completely ${ if (isOpen) "open" else "close"}"
}
.flowWithLifecycle(lifecycle)
.launchIn(lifecycleScope) // lifecycle-runtime-ktx
Expand Down
2 changes: 1 addition & 1 deletion corbind-fragment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ To add androidx fragment bindings, import `corbind-fragment` module:

```kotlin
dependencies {
implementation("ru.ldralighieri.corbind:corbind-fragment:1.7.0")
implementation("ru.ldralighieri.corbind:corbind-fragment:1.8.0")
}
```

Expand Down
2 changes: 1 addition & 1 deletion corbind-leanback/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ To add androidx leanback bindings, import `corbind-leanback` module:

```kotlin
dependencies {
implementation("ru.ldralighieri.corbind:corbind-leanback:1.7.0")
implementation("ru.ldralighieri.corbind:corbind-leanback:1.8.0")
}
```

Expand Down
2 changes: 1 addition & 1 deletion corbind-lifecycle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ To add androidx lifecycle bindings, import `corbind-lifecycle` module:

```kotlin
dependencies {
implementation("ru.ldralighieri.corbind:corbind-lifecycle:1.7.0")
implementation("ru.ldralighieri.corbind:corbind-lifecycle:1.8.0")
}
```

Expand Down
3 changes: 2 additions & 1 deletion corbind-material/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ To add material bindings, import `corbind-material` module:

```kotlin
dependencies {
implementation("ru.ldralighieri.corbind:corbind-material:1.7.0")
implementation("ru.ldralighieri.corbind:corbind-material:1.8.0")
}
```

Expand All @@ -19,6 +19,7 @@ Component | Extension | Description
**Chip** | `closeIconClicks` | Called when the chip’s close icon is clicked.
**ChipGroup** | `checkedChanges` | Called when the checked chips are changed.
**View**<br>(HideBottomViewOnScrollBehavior) | `bottomViewScrollStateChanges` | Called when the bottom view changes its scrolled state.
**MaskableFrameLayout** | `maskChanges` | Called when changes in a mask's RectF occur.
**MaterialButton** | `checkedChanges` | Called when the checked state of a MaterialButton has changed.
**MaterialButtonToggleGroup** | `buttonCheckedChangeEvents` | Called when a `MaterialButton` in this group is checked or unchecked (only *not* in single selection mode).
  | `buttonCheckedChanges` | Called when a `MaterialButton` in this group is checked (only in single selection mode).
Expand Down
10 changes: 10 additions & 0 deletions corbind-material/api/corbind-material.api
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ public final class ru/ldralighieri/corbind/material/HideBottomViewOnScrollBehavi
public static synthetic fun bottomViewScrollStateChanges$default (Landroid/view/View;Lkotlinx/coroutines/CoroutineScope;ILkotlin/jvm/functions/Function2;ILjava/lang/Object;)V
}

public final class ru/ldralighieri/corbind/material/MaskableFrameLayoutMaskChangesKt {
public static final fun maskChanges (Lcom/google/android/material/carousel/MaskableFrameLayout;)Lkotlinx/coroutines/flow/Flow;
public static final fun maskChanges (Lcom/google/android/material/carousel/MaskableFrameLayout;ILkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public static final fun maskChanges (Lcom/google/android/material/carousel/MaskableFrameLayout;Lkotlinx/coroutines/CoroutineScope;I)Lkotlinx/coroutines/channels/ReceiveChannel;
public static final fun maskChanges (Lcom/google/android/material/carousel/MaskableFrameLayout;Lkotlinx/coroutines/CoroutineScope;ILkotlin/jvm/functions/Function2;)V
public static synthetic fun maskChanges$default (Lcom/google/android/material/carousel/MaskableFrameLayout;ILkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
public static synthetic fun maskChanges$default (Lcom/google/android/material/carousel/MaskableFrameLayout;Lkotlinx/coroutines/CoroutineScope;IILjava/lang/Object;)Lkotlinx/coroutines/channels/ReceiveChannel;
public static synthetic fun maskChanges$default (Lcom/google/android/material/carousel/MaskableFrameLayout;Lkotlinx/coroutines/CoroutineScope;ILkotlin/jvm/functions/Function2;ILjava/lang/Object;)V
}

public final class ru/ldralighieri/corbind/material/MaterialButtonCheckedChangeEvent {
public fun <init> (IZ)V
public final fun component1 ()I
Expand Down
Loading

0 comments on commit 5c9d176

Please sign in to comment.