Skip to content

Commit

Permalink
Update README/CHANGELOG for release 4.0.0 (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
evant authored Mar 3, 2020
1 parent 6a30c42 commit e391bed
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
### [Unreleased]
### [4.0.0]
- Not having an itemBinding in xml will cause the adapter to be cleared instead of throwing an
exception (#179)
- Added convenience constructors to `BindingListViewAdapter`, `BindingViewPagerAdapter`, and
`BindingRecyclerViewAdapter` which takes the itemBinding.
- Bumped android gradle plugin to 3.5.2
- Allow itemBindings to be contravariant in adapters. This should not break any use-sites, but may
be a source-breaking change if you have overriden `setItemBinding` or `getItemBinding` in your
custom adapter. If so, you can change `T` to `? super T` (or `in T` in kotlin) to fix it.

### 3.2.0
- Add viewpager2 support with bindingcollectionadapter-viewpager2
Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ Easy way to bind collections to listviews and recyclerviews with the new [Androi

## Download

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

```groovy
implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter:3.2.0'
implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter-recyclerview:3.2.0'
implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter-viewpager2:3.2.0'
implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter:4.0.0'
implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter-recyclerview:4.0.0'
implementation 'me.tatarka.bindingcollectionadapter2:bindingcollectionadapter-viewpager2:4.0.0'
```

or use the previous stable version
Expand Down Expand Up @@ -91,6 +91,10 @@ name you passed into the `ItemBinding`.
</layout>
```

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

## Multiple View Types

You can use multiple view types by using `OnItemBind` instead. You can still bind
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:$agp_version"
classpath "com.android.tools.build:gradle:${agp_version}"
classpath 'digital.wup:android-maven-publish:3.6.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
# org.gradle.parallel=true

group=me.tatarka.bindingcollectionadapter2
version=4.0.0-SNAPSHOT
version=4.0.0
android.useAndroidX=true
android.enableJetifier=true
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit e391bed

Please sign in to comment.