Skip to content

Commit e391bed

Browse files
authored
Update README/CHANGELOG for release 4.0.0 (#182)
1 parent 6a30c42 commit e391bed

File tree

5 files changed

+16
-8
lines changed

5 files changed

+16
-8
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
### [Unreleased]
1+
### [4.0.0]
22
- Not having an itemBinding in xml will cause the adapter to be cleared instead of throwing an
33
exception (#179)
44
- Added convenience constructors to `BindingListViewAdapter`, `BindingViewPagerAdapter`, and
55
`BindingRecyclerViewAdapter` which takes the itemBinding.
6+
- Bumped android gradle plugin to 3.5.2
7+
- Allow itemBindings to be contravariant in adapters. This should not break any use-sites, but may
8+
be a source-breaking change if you have overriden `setItemBinding` or `getItemBinding` in your
9+
custom adapter. If so, you can change `T` to `? super T` (or `in T` in kotlin) to fix it.
610

711
### 3.2.0
812
- Add viewpager2 support with bindingcollectionadapter-viewpager2

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ Easy way to bind collections to listviews and recyclerviews with the new [Androi
55

66
## Download
77

8-
If you are using androidx use version `3.2.0`, this also uses databinding v2
8+
If you are using androidx use version `4.0.0`, this also uses databinding v2
99

1010
```groovy
11-
implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter:3.2.0'
12-
implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter-recyclerview:3.2.0'
13-
implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter-viewpager2:3.2.0'
11+
implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter:4.0.0'
12+
implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter-recyclerview:4.0.0'
13+
implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter-viewpager2:4.0.0'
1414
```
1515

1616
or use the previous stable version
@@ -91,6 +91,10 @@ name you passed into the `ItemBinding`.
9191
</layout>
9292
```
9393

94+
Note: if `app:itemBinding` is null, then the adapter will be set to null. This is useful if you
95+
don't have an `itemBinding` right away (ex: need to wait till you load data). If you aren't seeing
96+
any views, make sure you have `itemBinding` defined!
97+
9498
## Multiple View Types
9599

96100
You can use multiple view types by using `OnItemBind` instead. You can still bind

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ buildscript {
88
jcenter()
99
}
1010
dependencies {
11-
classpath "com.android.tools.build:gradle:$agp_version"
11+
classpath "com.android.tools.build:gradle:${agp_version}"
1212
classpath 'digital.wup:android-maven-publish:3.6.2'
1313
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1414
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
# org.gradle.parallel=true
1919

2020
group=me.tatarka.bindingcollectionadapter2
21-
version=4.0.0-SNAPSHOT
21+
version=4.0.0
2222
android.useAndroidX=true
2323
android.enableJetifier=true
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)