Migration to new deps.

This commit is contained in:
Koen 2023-12-08 14:43:24 +01:00
parent f7d2cb4055
commit 71a3828fe4
9 changed files with 63 additions and 49 deletions

View file

@ -1,11 +1,11 @@
plugins { plugins {
id 'com.android.application' id 'com.android.application'
id 'org.jetbrains.kotlin.android' 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 'org.ajoberstar.grgit' version '1.7.2'
id 'com.google.protobuf' id 'com.google.protobuf'
id 'kotlin-parcelize' id 'kotlin-parcelize'
id 'kotlin-kapt' id 'com.google.devtools.ksp'
} }
ext { ext {
@ -24,7 +24,7 @@ if (keystorePropertiesFile.exists()) {
protobuf { protobuf {
protoc { protoc {
artifact = 'com.google.protobuf:protoc:3.22.3' artifact = 'com.google.protobuf:protoc:3.25.1'
} }
generateProtoTasks { generateProtoTasks {
all().each { task -> all().each { task ->
@ -97,11 +97,15 @@ android {
defaultConfig { defaultConfig {
minSdk 28 minSdk 28
targetSdk 33 targetSdk 34
versionCode gitVersionCode versionCode gitVersionCode
versionName gitVersionName versionName gitVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ksp {
arg("room.schemaLocation", "$projectDir/schemas")
}
} }
signingConfigs { signingConfigs {
@ -137,43 +141,46 @@ android {
universalApk true universalApk true
} }
} }
buildFeatures {
buildConfig true
}
} }
dependencies { dependencies {
//Core //Core
implementation 'androidx.core:core-ktx:1.7.0' implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.appcompat:appcompat:1.4.1' implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.5.0' implementation 'com.google.android.material:material:1.10.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3' implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
//Images //Images
annotationProcessor 'com.github.bumptech.glide:compiler:4.15.1' annotationProcessor 'com.github.bumptech.glide:compiler:4.16.0'
implementation 'com.github.bumptech.glide:glide:4.15.1' implementation 'com.github.bumptech.glide:glide:4.16.0'
//Async //Async
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.2" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3"
//HTTP //HTTP
implementation "com.squareup.okhttp3:okhttp:4.10.0" implementation "com.squareup.okhttp3:okhttp:4.11.0"
//JSON //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) implementation 'com.google.code.gson:gson:2.10.1' //Used for complex/anonymous cases like during development conversions (eg. V8RemoteObject)
//JS //JS
implementation("com.caoccao.javet:javet-android:2.2.1") implementation("com.caoccao.javet:javet-android:2.2.1")
//Exoplayer //Exoplayer
implementation 'com.google.android.exoplayer:exoplayer-core:2.18.7' implementation 'com.google.android.exoplayer:exoplayer-core:2.19.1'
implementation 'com.google.android.exoplayer:exoplayer-dash:2.18.7' implementation 'com.google.android.exoplayer:exoplayer-dash:2.19.1'
implementation 'com.google.android.exoplayer:exoplayer-ui:2.18.7' implementation 'com.google.android.exoplayer:exoplayer-ui:2.19.1'
implementation 'com.google.android.exoplayer:exoplayer-hls:2.18.7' implementation 'com.google.android.exoplayer:exoplayer-hls:2.19.1'
implementation 'com.google.android.exoplayer:exoplayer-rtsp:2.18.7' implementation 'com.google.android.exoplayer:exoplayer-rtsp:2.19.1'
implementation 'com.google.android.exoplayer:exoplayer-smoothstreaming:2.18.7' implementation 'com.google.android.exoplayer:exoplayer-smoothstreaming:2.19.1'
implementation 'com.google.android.exoplayer:exoplayer-transformer:2.18.7' implementation 'com.google.android.exoplayer:exoplayer-transformer:2.19.1'
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.3' implementation 'androidx.navigation:navigation-fragment-ktx:2.7.5'
implementation 'androidx.navigation:navigation-ui-ktx:2.5.3' implementation 'androidx.navigation:navigation-ui-ktx:2.7.5'
//Other //Other
implementation 'org.jmdns:jmdns:3.5.1' implementation 'org.jmdns:jmdns:3.5.1'
@ -181,34 +188,34 @@ dependencies {
implementation 'com.google.android.flexbox:flexbox:3.0.0' implementation 'com.google.android.flexbox:flexbox:3.0.0'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'com.arthenica:ffmpeg-kit-full:5.1' 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.github.dhaval2404:imagepicker:2.1'
implementation 'com.google.zxing:core:3.4.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' implementation 'com.caverock:androidsvg-aar:1.4'
//Protobuf //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.polycentric.core:app:1.0'
implementation 'com.futo.futopay: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' implementation 'androidx.concurrent:concurrent-futures-ktx:1.1.0'
//Database //Database
implementation("androidx.room:room-runtime:2.6.0") implementation("androidx.room:room-runtime:2.6.1")
annotationProcessor("androidx.room:room-compiler:2.6.0") annotationProcessor("androidx.room:room-compiler:2.6.1")
kapt("androidx.room:room-compiler:2.6.0") ksp("androidx.room:room-compiler:2.6.1")
implementation("androidx.room:room-ktx:2.6.0") implementation("androidx.room:room-ktx:2.6.1")
//Payment //Payment
implementation 'com.stripe:stripe-android:20.28.3' implementation 'com.stripe:stripe-android:20.35.1'
testImplementation 'junit:junit:4.13.2' testImplementation 'junit:junit:4.13.2'
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.2' testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3'
testImplementation "org.jetbrains.kotlin:kotlin-test:1.8.20" testImplementation "org.jetbrains.kotlin:kotlin-test:1.8.22"
testImplementation "org.xmlunit:xmlunit-core:2.9.1" testImplementation "org.xmlunit:xmlunit-core:2.9.1"
testImplementation "org.mockito:mockito-core:5.4.0" testImplementation "org.mockito:mockito-core:5.4.0"
androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
} }

View file

@ -59,23 +59,28 @@ public class PolycentricModelLoader implements ModelLoader<String, ByteBuffer> {
@Override @Override
public void loadData(@NonNull Priority priority, @NonNull DataFetcher.DataCallback<? super ByteBuffer> callback) { public void loadData(@NonNull Priority priority, @NonNull DataFetcher.DataCallback<? super ByteBuffer> callback) {
Log.i("PolycentricModelLoader", this._model);
_deferred = PolycentricCache.getInstance().getDataAsync(_model); _deferred = PolycentricCache.getInstance().getDataAsync(_model);
_deferred.invokeOnCompletion(throwable -> { _deferred.invokeOnCompletion(throwable -> {
if (throwable != null) { if (throwable != null) {
Log.e("PolycentricModelLoader", "getDataAsync failed throwable: " + throwable.toString());
callback.onLoadFailed(new Exception(throwable)); callback.onLoadFailed(new Exception(throwable));
return Unit.INSTANCE; return Unit.INSTANCE;
} }
Deferred<ByteBuffer> deferred = _deferred; Deferred<ByteBuffer> deferred = _deferred;
if (deferred == null) { if (deferred == null) {
Log.e("PolycentricModelLoader", "getDataAsync failed deferred is null");
callback.onLoadFailed(new Exception("Deferred is null")); callback.onLoadFailed(new Exception("Deferred is null"));
return Unit.INSTANCE; return Unit.INSTANCE;
} }
ByteBuffer completed = deferred.getCompleted(); ByteBuffer completed = deferred.getCompleted();
if (completed != null) { if (completed != null) {
Log.e("PolycentricModelLoader", "getDataAsync success loaded " + completed.remaining() + " bytes");
callback.onDataReady(completed); callback.onDataReady(completed);
} else { } else {
Log.e("PolycentricModelLoader", "getDataAsync failed completed is null");
callback.onLoadFailed(new Exception("Completed is null")); callback.onLoadFailed(new Exception("Completed is null"));
} }
return Unit.INSTANCE; return Unit.INSTANCE;

View file

@ -214,11 +214,12 @@ class PreviewPostView : LinearLayout {
.load(image) .load(image)
.placeholder(R.drawable.placeholder_video_thumbnail) .placeholder(R.drawable.placeholder_video_thumbnail)
.listener(object: RequestListener<Drawable> { .listener(object: RequestListener<Drawable> {
override fun onLoadFailed(e: GlideException?, model: Any?, target: Target<Drawable>?, isFirstResource: Boolean): Boolean { override fun onLoadFailed(e: GlideException?, model: Any?, target: Target<Drawable>, isFirstResource: Boolean): Boolean {
imageImage.visibility = View.GONE; imageImage.visibility = View.GONE;
return false; return false;
} }
override fun onResourceReady(resource: Drawable?, model: Any?, target: Target<Drawable>?, dataSource: DataSource?, isFirstResource: Boolean): Boolean {
override fun onResourceReady(resource: Drawable, model: Any, target: Target<Drawable>?, dataSource: DataSource, isFirstResource: Boolean): Boolean {
return false; return false;
} }
}) })

View file

@ -1,7 +1,8 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules. // Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins { plugins {
id 'com.android.application' version '7.4.2' apply false id 'com.android.application' version '8.2.0' apply false
id 'com.android.library' version '7.4.2' apply false id 'com.android.library' version '8.2.0' apply false
id 'org.jetbrains.kotlin.android' version '1.7.20' apply false id 'org.jetbrains.kotlin.android' version '1.9.0' apply false
id 'com.google.protobuf' version '0.9.3' 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
}

@ -1 +1 @@
Subproject commit 68c9ae36fd502ac402296e16a307c2eefce393d1 Subproject commit 4268917697b975e92dc74e45b4018042ef35c509

@ -1 +1 @@
Subproject commit 62328514ec1dae52b8cc966561f73b81d7ebed80 Subproject commit 86cd96c41f15f7f73c091f61800a49f376a38150

View file

@ -21,4 +21,4 @@ kotlin.code.style=official
# resources declared in the library itself and none from the library's dependencies, # resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library # thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true android.nonTransitiveRClass=true
android.nonFinalResIds=false android.nonFinalResIds=false

View file

@ -1,6 +1,6 @@
#Fri Nov 11 13:25:09 CET 2022 #Fri Nov 11 13:25:09 CET 2022
distributionBase=GRADLE_USER_HOME 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 distributionPath=wrapper/dists
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View file

@ -16,13 +16,13 @@ dependencyResolutionManagement {
includeBuild('dep/polycentricandroid') { includeBuild('dep/polycentricandroid') {
dependencySubstitution { dependencySubstitution {
substitute module('com.polycentric.core:app') with project(':app') substitute module('com.polycentric.core:app') using project(':app')
} }
} }
includeBuild('dep/futopay/android') { includeBuild('dep/futopay/android') {
dependencySubstitution { dependencySubstitution {
substitute module('com.futo.futopay:app') with project(':app') substitute module('com.futo.futopay:app') using project(':app')
} }
} }