Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
TuxPaper committed Nov 25, 2023
1 parent 7e4b078 commit 79637a1
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 27 deletions.
28 changes: 22 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -106,20 +106,29 @@ android {

repositories {
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
jcenter() // for ico4a
}


dependencies {
// https://github.com/google/desugar_jdk_libs/blob/master/CHANGELOG.md
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs_nio:2.0.3'
// This solves conflicts error between
// org.jetbrains.kotlin:kotlin-stdlib:1.8.0 & org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21
// leanback uses 1.6.21, but kotlin-stdlib-jdk7 & kotlin-stdlib-jdk8 were
// merged into kotlin-stdlib in v1.8.0, causing a class duplication conflict
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0"))

coreLibraryDesugaring "com.android.tools:desugar_jdk_libs_nio:${desugarVersion}"

//noinspection GradleDynamicVersion
compileOnly 'org.jetbrains:annotations:+'

// https://mvnrepository.com/artifact/dnsjava/dnsjava
// 3.x required slf4j, and I haven't researched how many more methods/bloat that adds
coreFlavorImplementation 'dnsjava:dnsjava:2.1.9'

// For Tips $
// https://developer.android.com/google/play/billing/release-notes
// 6.1.0 is minSDK 19
googleFlavorImplementation 'com.android.billingclient:billing:6.0.1'

// See versions constant in /build.gradle
Expand All @@ -137,8 +146,12 @@ dependencies {
// https://mvnrepository.com/artifact/androidx.preference/preference?repo=google
implementation "androidx.preference:preference:${preferenceVersion}"
// https://mvnrepository.com/artifact/androidx.leanback/leanback-preference?repo=google
// https://developer.android.com/jetpack/androidx/releases/leanback
// 1.2.0-alpha03+: compileSdkVersion 34
implementation "androidx.leanback:leanback-preference:1.2.0-alpha02"
// https://mvnrepository.com/artifact/androidx.constraintlayout/constraintlayout
// https://developer.android.com/jetpack/androidx/releases/constraintlayout
// https://github.com/androidx/constraintlayout
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
// https://mvnrepository.com/artifact/androidx.multidex/multidex
implementation 'androidx.multidex:multidex:2.0.1'
Expand All @@ -147,22 +160,25 @@ dependencies {
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
// 1.6.1 gives conflicts between org.jetbrains.kotlin:kotlin-stdlib:1.8.0 and org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21
// Because leanback uses 1.6.21 (So does androidx.lifecycle, but latest uses 1.8.0)
implementation "androidx.fragment:fragment:1.5.7"
implementation "androidx.fragment:fragment:1.6.2"
implementation 'androidx.documentfile:documentfile:1.1.0-alpha01'
// https://developer.android.com/jetpack/androidx/releases/viewpager2
implementation 'androidx.viewpager2:viewpager2:1.1.0-beta02'

// https://github.com/alibaba/fastjson
implementation 'com.alibaba:fastjson:1.1.72.android'
// https://github.com/alibaba/fastjson2
// https://mvnrepository.com/artifact/com.alibaba.fastjson2/fastjson2
implementation 'com.alibaba.fastjson2:fastjson2:2.0.42.android4'

// https://jcifs.samba.org/
// There's a 1.3.19, but it's not in any gradle repo I can find
implementation 'jcifs:jcifs:1.3.17'

// https://github.com/square/picasso
// Note: 2.71828 (2018-03-07) is not compatible with other 2.x releases
implementation 'com.squareup.picasso:picasso:2.5.2'

// https://github.com/divStar/ico4a
// May have to switch to https://mvnrepository.com/artifact/org.jclarion/image4j
implementation 'divstar:ico4a:v1.0'

// https://github.com/square/okhttp
Expand All @@ -183,7 +199,7 @@ dependencies {
implementation 'com.github.SumiMakito:AwesomeQRCode:1.0.6'

// https://github.com/google/flexbox-layout
implementation 'com.google.android:flexbox:2.0.1'
implementation 'com.google.android.flexbox:flexbox:3.0.0'

// https://github.com/grandcentrix/tray
// grandcentrix's implementation has ConcurrentModificationException errors
Expand Down
17 changes: 8 additions & 9 deletions app/src/main/java/com/biglybt/android/util/JSONUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
import java.io.Reader;
import java.util.*;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONReader;
import com.alibaba.fastjson.parser.Feature;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONReader;
import com.alibaba.fastjson2.JSONReader.Feature;
import com.alibaba.fastjson2.JSONWriter;
import com.biglybt.android.client.AnalyticsTracker;

import androidx.annotation.Nullable;
Expand All @@ -40,9 +40,8 @@ public class JSONUtils
{

private static final String TAG = "JSONUtils";

private static final int features = Feature.SortFeidFastMatch.mask
| Feature.IgnoreNotMatch.mask | Feature.DisableSpecialKeyDetect.mask;

private static final Feature features = Feature.AllowUnQuotedFieldNames;

private static final String DEFAULT_MAP_KEY = "value";

Expand Down Expand Up @@ -99,7 +98,7 @@ private static Object parseWithException(String json) {

private static Object parseWithException(Reader reader) {
//return new JSONParser(JSONParser.MODE_PERMISSIVE).parse(reader);
JSONReader jsonReader = new JSONReader(reader);
JSONReader jsonReader = JSONReader.of(reader);
Object readObject = jsonReader.readObject();
jsonReader.close();
return readObject;
Expand Down Expand Up @@ -139,7 +138,7 @@ private static Map encodeMap(Map map) {
*/

public static String encodeToJSON(@Nullable Map<?, ?> map) {
return JSON.toJSONString(map, SerializerFeature.WriteMapNullValue);
return JSON.toJSONString(map, JSONWriter.Feature.WriteMapNullValue, JSONWriter.Feature.WriteNulls);
}

public static String encodeToJSON(Collection<?> list) {
Expand Down
24 changes: 12 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,28 @@ apply plugin: 'com.github.ben-manes.versions'

ext {
// https://developer.android.com/jetpack/androidx/releases/recyclerview
recyclerviewVersion = '1.3.1'
recyclerviewVersion = '1.3.2'
// https://developer.android.com/jetpack/androidx/releases/preference
preferenceVersion = '1.2.1'
// https://github.com/material-components/material-components-android/releases
// 1.10+: compileSdkVersion 34
materialVersion = '1.9.0'
// https://developer.android.com/jetpack/androidx/releases/lifecycle
// 2.6.1 gives conflicts between org.jetbrains.kotlin:kotlin-stdlib:1.8.0 and org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21
// Because leanback uses 1.6.21
lifecycleVersion = '2.5.1'
lifecycleVersion = '2.6.2'
// https://developer.android.com/jetpack/androidx/releases/leanback
leanbackVersion = '1.1.0-rc02'
// 1.2.0-alpha03+: compileSdkVersion 34
leanbackVersion = '1.2.0-alpha02'
// https://developer.android.com/jetpack/androidx/releases/appcompat
// 1.7.0-alpha03+: compileSdkVersion 34
appcompatVersion = '1.6.1'
// https://developer.android.com/jetpack/androidx/releases/annotation
// 1.6.0 gives conflicts between org.jetbrains.kotlin:kotlin-stdlib:1.8.0 and org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21
// Because leanback uses 1.6.21
annotationVersion = '1.5.0'
annotationVersion = '1.7.0'
// https://github.com/google/desugar_jdk_libs/blob/master/CHANGELOG.md
desugarVersion = '2.0.4'
}

buildscript {
ext.kotlin_version = '1.9.0'
ext.kotlin_version = '1.9.20'
repositories {
google()
mavenCentral()
Expand All @@ -32,18 +33,17 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:8.1.4'
// https://github.com/KeepSafe/dexcount-gradle-plugin
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:3.1.0'
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:4.0.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}"
// https://github.com/ben-manes/gradle-versions-plugin
classpath "com.github.ben-manes:gradle-versions-plugin:0.47.0"
classpath "com.github.ben-manes:gradle-versions-plugin:0.50.0"
}
}

allprojects {
repositories {
google()
mavenCentral()
jcenter() // for ico4a
maven { url 'https://jitpack.io' } // for AwesomeQRCode
}
project.ext {
Expand Down

0 comments on commit 79637a1

Please sign in to comment.