Skip to content

Commit fc197ce

Browse files
authored
Merge pull request #1 from bmarty/master
Upgrade the dependencies and do some cleanup
2 parents 52ecd76 + 4d8b103 commit fc197ce

File tree

15 files changed

+59
-56
lines changed

15 files changed

+59
-56
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ Add this in your root build.gradle at the end of repositories:
1717
````
1818

1919
````
20-
implementation 'com.github.BillCarsonFr:JsonViewer:0.3'
20+
implementation 'com.github.BillCarsonFr:JsonViewer:0.6'
2121
````
2222

2323
This library depends on epoxy
2424
````
2525
implementation("com.airbnb.android:epoxy:$epoxy_version")
2626
kapt "com.airbnb.android:epoxy-processor:$epoxy_version"
27-
implementation 'com.airbnb.android:mvrx:1.3.0'
27+
implementation 'com.airbnb.android:mvrx:1.5.1'
2828
````
2929

3030

app/build.gradle

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,44 @@
11
apply plugin: 'com.android.application'
2-
32
apply plugin: 'kotlin-android'
43

5-
apply plugin: 'kotlin-android-extensions'
6-
74
//TO ADD IN YOUR PROJECT
85
apply plugin: 'kotlin-kapt'
96

107
android {
11-
compileSdkVersion 29
12-
buildToolsVersion "29.0.2"
8+
compileSdkVersion 30
9+
1310
defaultConfig {
1411
applicationId "org.billcarsonfr.jsonviewerexample"
1512
minSdkVersion 19
16-
targetSdkVersion 29
13+
targetSdkVersion 30
1714
multiDexEnabled true
1815
versionCode 1
1916
versionName "1.0"
2017
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2118
}
19+
2220
buildTypes {
2321
release {
2422
minifyEnabled false
2523
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
2624
}
2725
}
26+
27+
compileOptions {
28+
sourceCompatibility JavaVersion.VERSION_1_8
29+
targetCompatibility JavaVersion.VERSION_1_8
30+
}
31+
32+
kotlinOptions {
33+
jvmTarget = "1.8"
34+
}
2835
}
2936

3037
dependencies {
31-
implementation fileTree(dir: 'libs', include: ['*.jar'])
3238
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
33-
implementation 'androidx.appcompat:appcompat:1.1.0'
34-
implementation 'androidx.core:core-ktx:1.1.0'
35-
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
39+
implementation 'androidx.appcompat:appcompat:1.2.0'
40+
implementation 'androidx.core:core-ktx:1.3.2'
41+
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
3642
implementation 'androidx.multidex:multidex:2.0.1'
3743

3844

@@ -42,11 +48,11 @@ dependencies {
4248
implementation("com.airbnb.android:epoxy:$epoxy_version")
4349
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
4450
kapt "com.airbnb.android:epoxy-processor:$epoxy_version"
45-
implementation 'com.airbnb.android:mvrx:1.3.0'
51+
implementation 'com.airbnb.android:mvrx:1.5.1'
4652
// ============
4753

48-
testImplementation 'junit:junit:4.12'
49-
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
50-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
54+
testImplementation 'junit:junit:4.13.2'
55+
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
56+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
5157
implementation project(path: ':jsonviewer')
5258
}

build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.kotlin_version = '1.3.50'
5-
ext.epoxy_version = '3.9.0'
4+
ext.kotlin_version = '1.4.31'
5+
ext.epoxy_version = '4.4.2'
66
repositories {
77
google()
88
jcenter()
99

1010
}
1111
dependencies {
12-
classpath 'com.android.tools.build:gradle:3.5.3'
12+
classpath 'com.android.tools.build:gradle:4.1.2'
1313
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1414
// NOTE: Do not place your application dependencies here; they belong
1515
// in the individual module build.gradle files
16-
classpath 'com.jakewharton:butterknife-gradle-plugin:10.1.0'
16+
classpath 'com.jakewharton:butterknife-gradle-plugin:10.2.3'
1717
}
1818

1919
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Sat Feb 08 10:40:46 CET 2020
1+
#Thu Mar 11 11:49:45 CET 2021
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip

jsonviewer/build.gradle

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
apply plugin: 'com.android.library'
22
apply plugin: 'kotlin-android'
3-
apply plugin: 'kotlin-android-extensions'
3+
apply plugin: 'kotlin-parcelize'
44
apply plugin: 'kotlin-kapt'
55
apply plugin: 'com.jakewharton.butterknife'
66

77
android {
8-
compileSdkVersion 29
9-
buildToolsVersion "29.0.2"
10-
8+
compileSdkVersion 30
119

1210
defaultConfig {
1311
minSdkVersion 19
14-
targetSdkVersion 29
12+
targetSdkVersion 30
1513
versionCode 1
1614
versionName "1.0"
1715

@@ -26,27 +24,34 @@ android {
2624
}
2725
}
2826

27+
compileOptions {
28+
sourceCompatibility JavaVersion.VERSION_1_8
29+
targetCompatibility JavaVersion.VERSION_1_8
30+
}
31+
32+
kotlinOptions {
33+
jvmTarget = '1.8'
34+
}
2935
}
3036

3137
dependencies {
32-
implementation fileTree(dir: 'libs', include: ['*.jar'])
3338
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
34-
implementation 'androidx.appcompat:appcompat:1.1.0'
35-
implementation 'androidx.core:core-ktx:1.1.0'
39+
implementation 'androidx.appcompat:appcompat:1.2.0'
40+
implementation 'androidx.core:core-ktx:1.3.2'
3641

3742
// Epoxy dependency
38-
implementation("com.airbnb.android:epoxy:$epoxy_version")
43+
implementation "com.airbnb.android:epoxy:$epoxy_version"
3944
kapt "com.airbnb.android:epoxy-processor:$epoxy_version"
40-
implementation 'com.airbnb.android:mvrx:1.3.0'
45+
implementation 'com.airbnb.android:mvrx:1.5.1'
4146
// Span utils
4247
implementation 'me.gujun.android:span:1.7'
43-
implementation 'com.google.android.material:material:1.2.0-alpha03'
48+
implementation 'com.google.android.material:material:1.4.0-alpha01'
4449

45-
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.2"
46-
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.2"
50+
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2"
51+
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2"
4752

4853
testImplementation 'org.json:json:20190722'
49-
testImplementation 'junit:junit:4.12'
50-
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
51-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
54+
testImplementation 'junit:junit:4.13.2'
55+
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
56+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
5257
}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="org.billcarsonfr.jsonviewer" />
1+
<manifest package="org.billcarsonfr.jsonviewer" />

jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerFragment.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import com.airbnb.mvrx.BaseMvRxFragment
1111
import com.airbnb.mvrx.MvRx
1212
import com.airbnb.mvrx.fragmentViewModel
1313
import com.airbnb.mvrx.withState
14-
import kotlinx.android.parcel.Parcelize
14+
import kotlinx.parcelize.Parcelize
1515

1616
@Parcelize
1717
data class JSonViewerFragmentArgs(
@@ -24,13 +24,13 @@ data class JSonViewerFragmentArgs(
2424

2525
class JSonViewerFragment : BaseMvRxFragment() {
2626

27-
val viewModel: JSonViewerViewModel by fragmentViewModel(JSonViewerViewModel::class)
27+
private val viewModel: JSonViewerViewModel by fragmentViewModel(JSonViewerViewModel::class)
2828

29-
val epoxyController by lazy {
29+
private val epoxyController by lazy {
3030
JSonViewerEpoxyController(requireContext())
3131
}
3232

33-
lateinit var recyclerView: EpoxyRecyclerView
33+
private lateinit var recyclerView: EpoxyRecyclerView
3434

3535
override fun onCreateView(
3636
inflater: LayoutInflater,

jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerModel.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ class JSonViewerArray(key: String?, index: Int?, jObject: JSONArray) :
3030
var items = ArrayList<JSonViewerModel>()
3131

3232
override fun addChild(model: JSonViewerModel) {
33-
val index = items.size
3433
items.add(model)
3534
}
3635
}

jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerStyleProvider.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import android.content.Context
44
import android.os.Parcelable
55
import androidx.annotation.ColorInt
66
import androidx.core.content.ContextCompat
7-
import kotlinx.android.parcel.Parcelize
7+
import kotlinx.parcelize.Parcelize
88

99
@Parcelize
1010
data class JSonViewerStyleProvider(

jsonviewer/src/main/java/org/billcarsonfr/jsonviewer/JSonViewerViewModel.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,5 @@ class JSonViewerViewModel(initialState: JSonViewerState) :
5050
}
5151

5252
}
53-
5453
}
5554
}

0 commit comments

Comments
 (0)