Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev -> main #990

Merged
merged 11 commits into from
Apr 9, 2021
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ jobs:
with:
fetch-depth: 100

- uses: actions/setup-java@v1
with:
java-version: '11'
java-package: jdk

- name: Validate gradle wrapper
uses: gradle/wrapper-validation-action@v1

Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ GEM
faraday-net_http (1.0.1)
git (1.8.1)
rchardet (~> 1.8)
kramdown (2.3.0)
kramdown (2.3.1)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ It's blazing fast, minimizing the code you need to write, and is easy to extend.

## Latest releases 🛠

- Kotlin Beta | [v5.4.0-b01](https://github.com/mikepenz/FastAdapter/tree/v5.4.0-b01)
- Kotlin | [v5.3.5](https://github.com/mikepenz/FastAdapter/tree/v5.3.5)
- Kotlin | [v5.4.0](https://github.com/mikepenz/FastAdapter/tree/v5.4.0)
- 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)

Expand Down
32 changes: 25 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,26 @@ kapt {
generateStubs = true
}

repositories {
maven {
url "https://jitpack.io"
content {
includeGroup "com.github.MFlisar"
includeGroup "com.github.turing-tech"
}
}
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
content { includeGroup "com.mikepenz.thirdparty" }
}
jcenter() {
content {
includeGroup "com.mopub"
includeGroup "com.mopub.volley"
}
}
}

dependencies {
implementation 'androidx.multidex:multidex:2.0.1'

Expand Down Expand Up @@ -145,16 +165,13 @@ dependencies {

//Used to async operations
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation 'io.reactivex.rxjava2:rxjava:2.2.20'
implementation 'io.reactivex.rxjava2:rxjava:2.2.21'

compileOnly "com.google.code.findbugs:jsr305:3.0.2"

implementation "androidx.room:room-runtime:${versions.room}"
kapt "androidx.room:room-compiler:${versions.room}"

implementation "androidx.lifecycle:lifecycle-extensions:${versions.lifecycle}"


configurations.all {
resolutionStrategy.force "com.mikepenz:iconics-core:${versions.iconics}"
resolutionStrategy.force "com.mikepenz:iconics-views:${versions.iconics}"
Expand All @@ -169,10 +186,11 @@ dependencies {

buildscript {
repositories {
google()
jcenter()
mavenCentral()
jcenter() { content { includeGroup "io.realm" } }
}

dependencies {
classpath "io.realm:realm-gradle-plugin:10.3.1"
classpath "io.realm:realm-gradle-plugin:10.4.0"
}
}
11 changes: 4 additions & 7 deletions app/src/main/java/com/mikepenz/fastadapter/app/PagedActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ package com.mikepenz.fastadapter.app
import android.os.Bundle
import android.os.Handler
import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProviders
import androidx.paging.PagedList
import androidx.lifecycle.ViewModelProvider
import androidx.recyclerview.widget.AsyncDifferConfig
import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.LinearLayoutManager
Expand Down Expand Up @@ -69,12 +67,11 @@ class PagedActivity : AppCompatActivity() {
binding.rv.layoutManager = LinearLayoutManager(this)
binding.rv.adapter = mFastAdapter

val viewModel = ViewModelProviders.of(this,
DemoEntityViewModel.DemoEntityViewModelFactory(this.application))
.get(DemoEntityViewModel::class.java)
val viewModel = ViewModelProvider(this, DemoEntityViewModel.DemoEntityViewModelFactory(this.application))
.get(DemoEntityViewModel::class.java)

//listen to data changes and pass it to adapter for displaying in recycler view
viewModel.demoEntitiesList.observe(this, Observer<PagedList<DemoEntity>> { t -> mItemAdapter.submitList(t!!) })
viewModel.demoEntitiesList.observe(this, { t -> mItemAdapter.submitList(t!!) })

//if we do this. the first added items will be animated :D
Handler().postDelayed({
Expand Down
41 changes: 22 additions & 19 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ buildscript {

ext {
release = [
versionName: "5.4.0-b01",
versionName: "5.4.0",
versionCode: 5040
]

setup = [
gradleTools: '4.1.2',
gradleTools: '4.1.3',
compileSdk : 30,
buildTools : "30.0.2",
minSdk : 16,
Expand All @@ -18,31 +18,28 @@ buildscript {

versions = [
androidX : '1.1.0',
recyclerView : '1.1.0',
recyclerView : '1.2.0',
material : '1.3.0',
appcompat : '1.2.0',
drawerlayout : '1.1.0',
constraintLayout: '2.0.4',
cardview : '1.0.0',
kotlin : '1.4.30',
iconics : '5.2.5',
materialdrawer : '8.3.1',
aboutlib : '8.8.1',
kotlin : '1.4.32',
iconics : '5.2.8',
materialdrawer : '8.4.0',
aboutlib : '8.8.4',
roboelectric : '4.5.1',
detekt : '1.15.0',
detekt : '1.16.0',
paging : "2.1.2",
room : "2.2.6",
lifecycle : "2.2.0"
lifecycle : "2.3.1"
]
}

repositories {
google()
gradlePluginPortal()
mavenCentral()
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
google()
}
dependencies {
classpath "com.android.tools.build:gradle:${setup.gradleTools}"
Expand All @@ -56,12 +53,18 @@ allprojects {
group "com.mikepenz"

repositories {
google()
mavenCentral()
jcenter()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://jitpack.io" }
maven { url "https://dl.bintray.com/mikepenz/maven" }
google()
maven {
// (mp) remove when available on maven center
url "https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven"
content { includeGroup "org.jetbrains.kotlinx" }
}
}

configurations.all {
resolutionStrategy.force "org.jetbrains.kotlinx:kotlinx-html-jvm:0.7.3"
// (mp) remove when available on maven center
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ open class FastAdapter<Item : GenericItem> : RecyclerView.Adapter<RecyclerView.V
if (relativePosition != RecyclerView.NO_POSITION) {
return position + relativePosition
}
position = adapter.adapterItemCount
position += adapter.adapterItemCount
}

return RecyclerView.NO_POSITION
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENCE_DIST=repo
POM_DEVELOPER_ID=mikepenz
POM_DEVELOPER_NAME=Mike Penz

android.useAndroidX=true
android.enableJetifier=true
org.gradle.jvmargs=-Xmx4G
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-6.8.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists