From 212e3e83e41f232bc46c3819df63875edb207412 Mon Sep 17 00:00:00 2001 From: Mike Penz Date: Sat, 6 Feb 2021 13:09:54 +0100 Subject: [PATCH 1/4] - remove obsolete badges --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 989030edd..b5e03b56d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# FastAdapter [![Status](https://travis-ci.org/mikepenz/FastAdapter.svg?branch=develop)](https://travis-ci.org/mikepenz/FastAdapter) [![Download](https://api.bintray.com/packages/mikepenz/maven/com.mikepenz%3Afastadapter/images/download.svg)](https://bintray.com/mikepenz/maven/com.mikepenz%3Afastadapter/_latestVersion) +# FastAdapter The FastAdapter is here to simplify creating adapters for RecyclerViews. Don't worry about the adapter anymore. Just write the logic for how your view/item should look like, and you are done. It's blazingly fast, minimizing the code you need to write, and is easy to extend. From 8e75a8f57bac8d47c287fa6a2ab109156caf24ff Mon Sep 17 00:00:00 2001 From: Mike Penz Date: Sun, 7 Feb 2021 10:05:35 +0100 Subject: [PATCH 2/4] - update project to properly provide transitive dependencies - update gradle-release.gradle script to ensure dependencies as compile - cleanup duplicated dependency specifications --- fastadapter-extensions-binding/build.gradle | 4 ---- fastadapter-extensions-diff/build.gradle | 7 +------ fastadapter-extensions-drag/build.gradle | 5 ----- fastadapter-extensions-expandable/build.gradle | 8 +------- fastadapter-extensions-paged/build.gradle | 4 +--- fastadapter-extensions-scroll/build.gradle | 5 ----- fastadapter-extensions-swipe/build.gradle | 5 ----- fastadapter-extensions-ui/build.gradle | 4 ---- fastadapter-extensions-utils/build.gradle | 4 ---- fastadapter/build.gradle | 10 ++++------ gradle-release.gradle | 4 ++++ 11 files changed, 11 insertions(+), 49 deletions(-) diff --git a/fastadapter-extensions-binding/build.gradle b/fastadapter-extensions-binding/build.gradle index 7370a5fb8..f1619f53f 100644 --- a/fastadapter-extensions-binding/build.gradle +++ b/fastadapter-extensions-binding/build.gradle @@ -38,10 +38,6 @@ android { dependencies { implementation project(':fastadapter') - implementation "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}" - - implementation "androidx.annotation:annotation:${versions.androidX}" - implementation "androidx.recyclerview:recyclerview:${versions.recyclerView}" compileOnly "androidx.databinding:viewbinding:${setup.gradleTools}" } diff --git a/fastadapter-extensions-diff/build.gradle b/fastadapter-extensions-diff/build.gradle index 9f5ef9aa4..8ba21d898 100644 --- a/fastadapter-extensions-diff/build.gradle +++ b/fastadapter-extensions-diff/build.gradle @@ -38,12 +38,7 @@ android { dependencies { implementation project(':fastadapter') - implementation "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}" - - implementation "androidx.recyclerview:recyclerview:${versions.recyclerView}" - implementation "androidx.annotation:annotation:${versions.androidX}" - - testImplementation 'junit:junit:4.13' + testImplementation 'junit:junit:4.13.1' testImplementation 'org.mockito:mockito-all:1.10.19' testImplementation "org.robolectric:robolectric:${versions.roboelectric}" testImplementation 'com.squareup.assertj:assertj-android:1.2.0' diff --git a/fastadapter-extensions-drag/build.gradle b/fastadapter-extensions-drag/build.gradle index 52cbbdd0b..433f859b1 100644 --- a/fastadapter-extensions-drag/build.gradle +++ b/fastadapter-extensions-drag/build.gradle @@ -35,11 +35,6 @@ android { dependencies { implementation project(':fastadapter') - - implementation "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}" - - implementation "androidx.recyclerview:recyclerview:${versions.recyclerView}" - implementation "androidx.annotation:annotation:${versions.androidX}" } if (project.hasProperty('pushall') || project.hasProperty('library_extensions_drag_only')) { diff --git a/fastadapter-extensions-expandable/build.gradle b/fastadapter-extensions-expandable/build.gradle index 8bf4c150d..a68fc49e2 100644 --- a/fastadapter-extensions-expandable/build.gradle +++ b/fastadapter-extensions-expandable/build.gradle @@ -36,13 +36,7 @@ android { dependencies { implementation project(':fastadapter') - implementation "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}" - - implementation "androidx.appcompat:appcompat:${versions.appcompat}" - implementation "androidx.recyclerview:recyclerview:${versions.recyclerView}" - implementation "androidx.annotation:annotation:${versions.androidX}" - - testImplementation 'junit:junit:4.13' + testImplementation 'junit:junit:4.13.1' testImplementation 'org.mockito:mockito-all:1.10.19' testImplementation "org.robolectric:robolectric:${versions.roboelectric}" diff --git a/fastadapter-extensions-paged/build.gradle b/fastadapter-extensions-paged/build.gradle index 2b997c170..078721994 100644 --- a/fastadapter-extensions-paged/build.gradle +++ b/fastadapter-extensions-paged/build.gradle @@ -38,9 +38,7 @@ android { dependencies { implementation project(':fastadapter') - implementation "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}" - - api "androidx.paging:paging-runtime:${versions.paging}" + api "androidx.paging:paging-runtime-ktx:${versions.paging}" } if (project.hasProperty('pushall') || project.hasProperty('library_extensions_paged_only')) { diff --git a/fastadapter-extensions-scroll/build.gradle b/fastadapter-extensions-scroll/build.gradle index 860ec689c..a4aea1121 100644 --- a/fastadapter-extensions-scroll/build.gradle +++ b/fastadapter-extensions-scroll/build.gradle @@ -35,11 +35,6 @@ android { dependencies { implementation project(':fastadapter') - - implementation "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}" - - implementation "androidx.recyclerview:recyclerview:${versions.recyclerView}" - implementation "androidx.annotation:annotation:${versions.androidX}" } if (project.hasProperty('pushall') || project.hasProperty('library_extensions_scroll_only')) { diff --git a/fastadapter-extensions-swipe/build.gradle b/fastadapter-extensions-swipe/build.gradle index e156e584b..dcb2c43d8 100644 --- a/fastadapter-extensions-swipe/build.gradle +++ b/fastadapter-extensions-swipe/build.gradle @@ -35,11 +35,6 @@ android { dependencies { implementation project(':fastadapter') - - implementation "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}" - - implementation "androidx.recyclerview:recyclerview:${versions.recyclerView}" - implementation "androidx.annotation:annotation:${versions.androidX}" } if (project.hasProperty('pushall') || project.hasProperty('library_extensions_swipe_only')) { diff --git a/fastadapter-extensions-ui/build.gradle b/fastadapter-extensions-ui/build.gradle index b81e59c6b..a6db237cc 100644 --- a/fastadapter-extensions-ui/build.gradle +++ b/fastadapter-extensions-ui/build.gradle @@ -33,11 +33,7 @@ android { dependencies { implementation project(':fastadapter') - implementation "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}" - - implementation "androidx.recyclerview:recyclerview:${versions.recyclerView}" implementation "com.google.android.material:material:${versions.material}" - implementation "androidx.annotation:annotation:${versions.androidX}" } if (project.hasProperty('pushall') || project.hasProperty('library_extensions_ui_only')) { diff --git a/fastadapter-extensions-utils/build.gradle b/fastadapter-extensions-utils/build.gradle index 864357899..b938c2451 100644 --- a/fastadapter-extensions-utils/build.gradle +++ b/fastadapter-extensions-utils/build.gradle @@ -36,11 +36,7 @@ dependencies { implementation project(':fastadapter-extensions-swipe') implementation project(':fastadapter-extensions-drag') - implementation "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}" - - implementation "androidx.recyclerview:recyclerview:${versions.recyclerView}" implementation "com.google.android.material:material:${versions.material}" - implementation "androidx.annotation:annotation:${versions.androidX}" } if (project.hasProperty('pushall') || project.hasProperty('library_extensions_utils_only')) { diff --git a/fastadapter/build.gradle b/fastadapter/build.gradle index 987648903..1c4880a12 100644 --- a/fastadapter/build.gradle +++ b/fastadapter/build.gradle @@ -38,13 +38,11 @@ android { } dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}" + api "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}" + api "androidx.recyclerview:recyclerview:${versions.recyclerView}" + api "androidx.appcompat:appcompat:${versions.appcompat}" - implementation "androidx.appcompat:appcompat:${versions.appcompat}" - implementation "androidx.recyclerview:recyclerview:${versions.recyclerView}" - implementation "androidx.annotation:annotation:${versions.androidX}" - - testImplementation 'junit:junit:4.13' + testImplementation 'junit:junit:4.13.1' testImplementation 'org.mockito:mockito-all:1.10.19' testImplementation "org.robolectric:robolectric:${versions.roboelectric}" testImplementation 'com.squareup.assertj:assertj-android:1.2.0' diff --git a/gradle-release.gradle b/gradle-release.gradle index d3a2af620..e4fecf43a 100644 --- a/gradle-release.gradle +++ b/gradle-release.gradle @@ -79,7 +79,11 @@ afterEvaluate { project -> asNode().appendNode('description', POM_DESCRIPTION) asNode().appendNode('url', POM_SCM_URL) asNode().children().last() + pomConfig + + // we want dependencies as compile, to ensure they are transitively resolved + asNode().dependencies.'*'.findAll() { it.scope.text() == 'runtime' }.each { it.scope*.value = 'compile' } } + } } From 3eb938eaab936eedbb4677e60e30692882078f34 Mon Sep 17 00:00:00 2001 From: Mike Penz Date: Sun, 7 Feb 2021 10:23:39 +0100 Subject: [PATCH 3/4] - remove butterknife - cleanup sample app gradle some more --- README.md | 6 ------ app/build.gradle | 14 +++----------- .../mikepenz/fastadapter/app/MopubAdsActivity.kt | 3 --- .../com/mikepenz/fastadapter/app/SortActivity.kt | 3 --- .../app/StickyHeaderMopubAdsActivity.kt | 3 --- .../fastadapter/app/items/SimpleImageItem.kt | 6 +----- gradle.properties | 1 - 7 files changed, 4 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index b5e03b56d..72872838b 100644 --- a/README.md +++ b/README.md @@ -326,12 +326,6 @@ Mike Penz: - ItemAnimators https://github.com/mikepenz/ItemAnimators - MaterialDrawer https://github.com/mikepenz/MaterialDrawer -Other Libs: -- Butterknife https://github.com/JakeWharton/butterknife -- Glide https://github.com/bumptech/glide -- MaterialScrollBar https://github.com/krimin-killr21/MaterialScrollBar -- StickyRecyclerHeadersAdapter https://github.com/timehop/sticky-headers-recyclerview - # Developed By diff --git a/app/build.gradle b/app/build.gradle index 7c050a9fd..272c90402 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -58,8 +58,8 @@ android { } buildFeatures { - viewBinding = true - dataBinding = true + viewBinding true + dataBinding true } } @@ -68,9 +68,7 @@ kapt { } dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}" - - implementation 'com.android.support:multidex:1.0.3' + implementation 'androidx.multidex:multidex:2.0.1' implementation project(':fastadapter') implementation project(':fastadapter-extensions-binding') @@ -83,8 +81,6 @@ dependencies { implementation project(':fastadapter-extensions-utils') implementation project(':fastadapter-extensions-paged') - implementation "androidx.appcompat:appcompat:${versions.appcompat}" - implementation "androidx.recyclerview:recyclerview:${versions.recyclerView}" implementation "androidx.cardview:cardview:${versions.cardview}" implementation "com.google.android.material:material:${versions.material}" @@ -130,10 +126,6 @@ dependencies { //https://github.com/krimin-killr21/MaterialScrollBar implementation 'com.github.turing-tech:MaterialScrollBar:13.3.4' - //https://github.com/JakeWharton/butterknife - implementation 'com.jakewharton:butterknife:10.2.3' - kapt 'com.jakewharton:butterknife-compiler:10.2.3' - //used to load the images in the ImageListSample //https://github.com/coil-kt/coil implementation 'io.coil-kt:coil:1.1.1' diff --git a/app/src/main/java/com/mikepenz/fastadapter/app/MopubAdsActivity.kt b/app/src/main/java/com/mikepenz/fastadapter/app/MopubAdsActivity.kt index 7ca043adb..392e20948 100644 --- a/app/src/main/java/com/mikepenz/fastadapter/app/MopubAdsActivity.kt +++ b/app/src/main/java/com/mikepenz/fastadapter/app/MopubAdsActivity.kt @@ -5,7 +5,6 @@ import android.view.MenuItem import android.widget.Toast import androidx.appcompat.app.AppCompatActivity import androidx.recyclerview.widget.GridLayoutManager -import butterknife.ButterKnife import com.mikepenz.fastadapter.app.adapters.MopubFastItemAdapter import com.mikepenz.fastadapter.app.databinding.ActivitySampleBinding import com.mikepenz.fastadapter.app.items.LetterItem @@ -24,8 +23,6 @@ class MopubAdsActivity : AppCompatActivity() { setContentView(it.root) } - ButterKnife.bind(this) - // Handle Toolbar setSupportActionBar(binding.toolbar) diff --git a/app/src/main/java/com/mikepenz/fastadapter/app/SortActivity.kt b/app/src/main/java/com/mikepenz/fastadapter/app/SortActivity.kt index 337158c00..50c809522 100644 --- a/app/src/main/java/com/mikepenz/fastadapter/app/SortActivity.kt +++ b/app/src/main/java/com/mikepenz/fastadapter/app/SortActivity.kt @@ -11,7 +11,6 @@ import androidx.annotation.IntRange import androidx.appcompat.app.AppCompatActivity import androidx.recyclerview.widget.DefaultItemAnimator import androidx.recyclerview.widget.LinearLayoutManager -import butterknife.ButterKnife import com.mikepenz.fastadapter.FastAdapter import com.mikepenz.fastadapter.IAdapter import com.mikepenz.fastadapter.adapters.ItemAdapter @@ -67,8 +66,6 @@ class SortActivity : AppCompatActivity() { setContentView(it.root) } - ButterKnife.bind(this) - // Handle Toolbar setSupportActionBar(binding.toolbar) diff --git a/app/src/main/java/com/mikepenz/fastadapter/app/StickyHeaderMopubAdsActivity.kt b/app/src/main/java/com/mikepenz/fastadapter/app/StickyHeaderMopubAdsActivity.kt index f161e4e2e..9919a273e 100644 --- a/app/src/main/java/com/mikepenz/fastadapter/app/StickyHeaderMopubAdsActivity.kt +++ b/app/src/main/java/com/mikepenz/fastadapter/app/StickyHeaderMopubAdsActivity.kt @@ -6,7 +6,6 @@ import androidx.appcompat.app.AppCompatActivity import androidx.recyclerview.widget.DefaultItemAnimator import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView -import butterknife.ButterKnife import com.mikepenz.fastadapter.adapters.ItemAdapter import com.mikepenz.fastadapter.app.adapters.MopubFastItemAdapter import com.mikepenz.fastadapter.app.adapters.StickyHeaderAdapter @@ -33,8 +32,6 @@ class StickyHeaderMopubAdsActivity : AppCompatActivity() { setContentView(it.root) } - ButterKnife.bind(this) - // Handle Toolbar setSupportActionBar(binding.toolbar) diff --git a/app/src/main/java/com/mikepenz/fastadapter/app/items/SimpleImageItem.kt b/app/src/main/java/com/mikepenz/fastadapter/app/items/SimpleImageItem.kt index 17cf63a13..873038696 100644 --- a/app/src/main/java/com/mikepenz/fastadapter/app/items/SimpleImageItem.kt +++ b/app/src/main/java/com/mikepenz/fastadapter/app/items/SimpleImageItem.kt @@ -6,7 +6,6 @@ import android.widget.ImageView import android.widget.TextView import androidx.core.content.ContextCompat import androidx.recyclerview.widget.RecyclerView -import butterknife.ButterKnife import coil.clear import coil.load import com.mikepenz.aboutlibraries.util.getThemeColor @@ -109,15 +108,12 @@ class SimpleImageItem : BaseItem() { * our ViewHolder */ class ViewHolder(view: View) : RecyclerView.ViewHolder(view) { - var view: FrameLayout + var view: FrameLayout = view as FrameLayout var imageView: ImageView = view.findViewById(R.id.item_image_img) var imageName: TextView = view.findViewById(R.id.item_image_name) var imageDescription: TextView = view.findViewById(R.id.item_image_description) init { - ButterKnife.bind(this, view) - this.view = view as FrameLayout - //optimization to preset the correct height for our device val screenWidth = view.context.resources.displayMetrics.widthPixels val finalHeight = (screenWidth / 1.5).toInt() / 2 diff --git a/gradle.properties b/gradle.properties index ff4c35d7c..c297ab376 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,5 +18,4 @@ POM_DEVELOPER_ID=mikepenz POM_DEVELOPER_NAME=Mike Penz android.useAndroidX=true android.enableJetifier=true -android.jetifier.blacklist=butterknife-compiler org.gradle.jvmargs=-Xmx4G From c0d07734bd2fd649c11937f653931f9594fa9715 Mon Sep 17 00:00:00 2001 From: Mike Penz Date: Sun, 7 Feb 2021 10:36:26 +0100 Subject: [PATCH 4/4] - [release] v5.3.4 --- README.md | 2 +- build.gradle | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 72872838b..258d5b1dd 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ It's blazingly fast, minimizing the code you need to write, and is easy to exten ## Latest releases 🛠 -- Kotlin | [v5.3.3](https://github.com/mikepenz/FastAdapter/tree/v5.3.3) +- Kotlin | [v5.3.4](https://github.com/mikepenz/FastAdapter/tree/v5.3.4) - Java && AndroidX | [v3.3.1](https://github.com/mikepenz/FastAdapter/tree/v3.3.1) - Java && AppCompat | [v3.2.9](https://github.com/mikepenz/FastAdapter/tree/v3.2.9) diff --git a/build.gradle b/build.gradle index 6a141392c..07cd4b34d 100644 --- a/build.gradle +++ b/build.gradle @@ -4,8 +4,8 @@ buildscript { ext { release = [ - versionName: "5.3.3", - versionCode: 5033 + versionName: "5.3.4", + versionCode: 5034 ] setup = [