From 71a3828fe498685324690f2505a7b8631db79cb3 Mon Sep 17 00:00:00 2001 From: Koen Date: Fri, 8 Dec 2023 14:43:24 +0100 Subject: [PATCH] Migration to new deps. --- app/build.gradle | 79 ++++++++++--------- .../images/PolycentricModelLoader.java | 5 ++ .../adapters/feedtypes/PreviewPostView.kt | 5 +- build.gradle | 11 +-- dep/futopay | 2 +- dep/polycentricandroid | 2 +- gradle.properties | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- settings.gradle | 4 +- 9 files changed, 63 insertions(+), 49 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 8881e28b..b5c68c4f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,11 +1,11 @@ plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' - id 'org.jetbrains.kotlin.plugin.serialization' version '1.6.10' + id 'org.jetbrains.kotlin.plugin.serialization' version '1.9.21' id 'org.ajoberstar.grgit' version '1.7.2' id 'com.google.protobuf' id 'kotlin-parcelize' - id 'kotlin-kapt' + id 'com.google.devtools.ksp' } ext { @@ -24,7 +24,7 @@ if (keystorePropertiesFile.exists()) { protobuf { protoc { - artifact = 'com.google.protobuf:protoc:3.22.3' + artifact = 'com.google.protobuf:protoc:3.25.1' } generateProtoTasks { all().each { task -> @@ -97,11 +97,15 @@ android { defaultConfig { minSdk 28 - targetSdk 33 + targetSdk 34 versionCode gitVersionCode versionName gitVersionName testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + + ksp { + arg("room.schemaLocation", "$projectDir/schemas") + } } signingConfigs { @@ -137,43 +141,46 @@ android { universalApk true } } + buildFeatures { + buildConfig true + } } dependencies { //Core - implementation 'androidx.core:core-ktx:1.7.0' - implementation 'androidx.appcompat:appcompat:1.4.1' - implementation 'com.google.android.material:material:1.5.0' - implementation 'androidx.constraintlayout:constraintlayout:2.1.3' + implementation 'androidx.core:core-ktx:1.12.0' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'com.google.android.material:material:1.10.0' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' //Images - annotationProcessor 'com.github.bumptech.glide:compiler:4.15.1' - implementation 'com.github.bumptech.glide:glide:4.15.1' + annotationProcessor 'com.github.bumptech.glide:compiler:4.16.0' + implementation 'com.github.bumptech.glide:glide:4.16.0' //Async - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.2" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3" //HTTP - implementation "com.squareup.okhttp3:okhttp:4.10.0" + implementation "com.squareup.okhttp3:okhttp:4.11.0" //JSON - implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1" //Used for structured json + implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.2" //Used for structured json implementation 'com.google.code.gson:gson:2.10.1' //Used for complex/anonymous cases like during development conversions (eg. V8RemoteObject) //JS implementation("com.caoccao.javet:javet-android:2.2.1") //Exoplayer - implementation 'com.google.android.exoplayer:exoplayer-core:2.18.7' - implementation 'com.google.android.exoplayer:exoplayer-dash:2.18.7' - implementation 'com.google.android.exoplayer:exoplayer-ui:2.18.7' - implementation 'com.google.android.exoplayer:exoplayer-hls:2.18.7' - implementation 'com.google.android.exoplayer:exoplayer-rtsp:2.18.7' - implementation 'com.google.android.exoplayer:exoplayer-smoothstreaming:2.18.7' - implementation 'com.google.android.exoplayer:exoplayer-transformer:2.18.7' - implementation 'androidx.navigation:navigation-fragment-ktx:2.5.3' - implementation 'androidx.navigation:navigation-ui-ktx:2.5.3' + implementation 'com.google.android.exoplayer:exoplayer-core:2.19.1' + implementation 'com.google.android.exoplayer:exoplayer-dash:2.19.1' + implementation 'com.google.android.exoplayer:exoplayer-ui:2.19.1' + implementation 'com.google.android.exoplayer:exoplayer-hls:2.19.1' + implementation 'com.google.android.exoplayer:exoplayer-rtsp:2.19.1' + implementation 'com.google.android.exoplayer:exoplayer-smoothstreaming:2.19.1' + implementation 'com.google.android.exoplayer:exoplayer-transformer:2.19.1' + implementation 'androidx.navigation:navigation-fragment-ktx:2.7.5' + implementation 'androidx.navigation:navigation-ui-ktx:2.7.5' //Other implementation 'org.jmdns:jmdns:3.5.1' @@ -181,34 +188,34 @@ dependencies { implementation 'com.google.android.flexbox:flexbox:3.0.0' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' implementation 'com.arthenica:ffmpeg-kit-full:5.1' - implementation 'org.jetbrains.kotlin:kotlin-reflect:1.7.20' + implementation 'org.jetbrains.kotlin:kotlin-reflect:1.9.0' implementation 'com.github.dhaval2404:imagepicker:2.1' implementation 'com.google.zxing:core:3.4.1' - implementation 'com.journeyapps:zxing-android-embedded:4.2.0' + implementation 'com.journeyapps:zxing-android-embedded:4.3.0' implementation 'com.caverock:androidsvg-aar:1.4' //Protobuf - implementation 'com.google.protobuf:protobuf-javalite:3.22.3' + implementation 'com.google.protobuf:protobuf-javalite:3.25.1' implementation 'com.polycentric.core:app:1.0' implementation 'com.futo.futopay:app:1.0' - implementation 'androidx.work:work-runtime-ktx:2.8.1' + implementation 'androidx.work:work-runtime-ktx:2.9.0' implementation 'androidx.concurrent:concurrent-futures-ktx:1.1.0' //Database - implementation("androidx.room:room-runtime:2.6.0") - annotationProcessor("androidx.room:room-compiler:2.6.0") - kapt("androidx.room:room-compiler:2.6.0") - implementation("androidx.room:room-ktx:2.6.0") + implementation("androidx.room:room-runtime:2.6.1") + annotationProcessor("androidx.room:room-compiler:2.6.1") + ksp("androidx.room:room-compiler:2.6.1") + implementation("androidx.room:room-ktx:2.6.1") //Payment - implementation 'com.stripe:stripe-android:20.28.3' + implementation 'com.stripe:stripe-android:20.35.1' testImplementation 'junit:junit:4.13.2' - testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.2' - testImplementation "org.jetbrains.kotlin:kotlin-test:1.8.20" + testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3' + testImplementation "org.jetbrains.kotlin:kotlin-test:1.8.22" testImplementation "org.xmlunit:xmlunit-core:2.9.1" testImplementation "org.mockito:mockito-core:5.4.0" - androidTestImplementation 'androidx.test.ext:junit:1.1.3' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' -} \ No newline at end of file + androidTestImplementation 'androidx.test.ext:junit:1.1.5' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' +} diff --git a/app/src/main/java/com/futo/platformplayer/images/PolycentricModelLoader.java b/app/src/main/java/com/futo/platformplayer/images/PolycentricModelLoader.java index 067d8fcf..ded61ffc 100644 --- a/app/src/main/java/com/futo/platformplayer/images/PolycentricModelLoader.java +++ b/app/src/main/java/com/futo/platformplayer/images/PolycentricModelLoader.java @@ -59,23 +59,28 @@ public class PolycentricModelLoader implements ModelLoader { @Override public void loadData(@NonNull Priority priority, @NonNull DataFetcher.DataCallback callback) { + Log.i("PolycentricModelLoader", this._model); _deferred = PolycentricCache.getInstance().getDataAsync(_model); _deferred.invokeOnCompletion(throwable -> { if (throwable != null) { + Log.e("PolycentricModelLoader", "getDataAsync failed throwable: " + throwable.toString()); callback.onLoadFailed(new Exception(throwable)); return Unit.INSTANCE; } Deferred deferred = _deferred; if (deferred == null) { + Log.e("PolycentricModelLoader", "getDataAsync failed deferred is null"); callback.onLoadFailed(new Exception("Deferred is null")); return Unit.INSTANCE; } ByteBuffer completed = deferred.getCompleted(); if (completed != null) { + Log.e("PolycentricModelLoader", "getDataAsync success loaded " + completed.remaining() + " bytes"); callback.onDataReady(completed); } else { + Log.e("PolycentricModelLoader", "getDataAsync failed completed is null"); callback.onLoadFailed(new Exception("Completed is null")); } return Unit.INSTANCE; diff --git a/app/src/main/java/com/futo/platformplayer/views/adapters/feedtypes/PreviewPostView.kt b/app/src/main/java/com/futo/platformplayer/views/adapters/feedtypes/PreviewPostView.kt index d7427313..5a476421 100644 --- a/app/src/main/java/com/futo/platformplayer/views/adapters/feedtypes/PreviewPostView.kt +++ b/app/src/main/java/com/futo/platformplayer/views/adapters/feedtypes/PreviewPostView.kt @@ -214,11 +214,12 @@ class PreviewPostView : LinearLayout { .load(image) .placeholder(R.drawable.placeholder_video_thumbnail) .listener(object: RequestListener { - override fun onLoadFailed(e: GlideException?, model: Any?, target: Target?, isFirstResource: Boolean): Boolean { + override fun onLoadFailed(e: GlideException?, model: Any?, target: Target, isFirstResource: Boolean): Boolean { imageImage.visibility = View.GONE; return false; } - override fun onResourceReady(resource: Drawable?, model: Any?, target: Target?, dataSource: DataSource?, isFirstResource: Boolean): Boolean { + + override fun onResourceReady(resource: Drawable, model: Any, target: Target?, dataSource: DataSource, isFirstResource: Boolean): Boolean { return false; } }) diff --git a/build.gradle b/build.gradle index 871c089e..ebf69186 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,8 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id 'com.android.application' version '7.4.2' apply false - id 'com.android.library' version '7.4.2' apply false - id 'org.jetbrains.kotlin.android' version '1.7.20' apply false - id 'com.google.protobuf' version '0.9.3' apply false -} \ No newline at end of file + id 'com.android.application' version '8.2.0' apply false + id 'com.android.library' version '8.2.0' apply false + id 'org.jetbrains.kotlin.android' version '1.9.0' apply false + id 'com.google.protobuf' version '0.9.4' apply false + id 'com.google.devtools.ksp' version '1.9.0-1.0.13' apply false +} diff --git a/dep/futopay b/dep/futopay index 68c9ae36..42689176 160000 --- a/dep/futopay +++ b/dep/futopay @@ -1 +1 @@ -Subproject commit 68c9ae36fd502ac402296e16a307c2eefce393d1 +Subproject commit 4268917697b975e92dc74e45b4018042ef35c509 diff --git a/dep/polycentricandroid b/dep/polycentricandroid index 62328514..86cd96c4 160000 --- a/dep/polycentricandroid +++ b/dep/polycentricandroid @@ -1 +1 @@ -Subproject commit 62328514ec1dae52b8cc966561f73b81d7ebed80 +Subproject commit 86cd96c41f15f7f73c091f61800a49f376a38150 diff --git a/gradle.properties b/gradle.properties index f19c7b9b..7edc7334 100644 --- a/gradle.properties +++ b/gradle.properties @@ -21,4 +21,4 @@ kotlin.code.style=official # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library android.nonTransitiveRClass=true -android.nonFinalResIds=false \ No newline at end of file +android.nonFinalResIds=false diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 55028634..743191c6 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Fri Nov 11 13:25:09 CET 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/settings.gradle b/settings.gradle index f6679f95..fae609e0 100644 --- a/settings.gradle +++ b/settings.gradle @@ -16,13 +16,13 @@ dependencyResolutionManagement { includeBuild('dep/polycentricandroid') { dependencySubstitution { - substitute module('com.polycentric.core:app') with project(':app') + substitute module('com.polycentric.core:app') using project(':app') } } includeBuild('dep/futopay/android') { dependencySubstitution { - substitute module('com.futo.futopay:app') with project(':app') + substitute module('com.futo.futopay:app') using project(':app') } }