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

[WIP] Use vendored fluxc and login #13304

Draft
wants to merge 7 commits into
base: login_with_history
Choose a base branch
from

Conversation

wzieba
Copy link
Contributor

@wzieba wzieba commented Jan 14, 2025

This PR introduces necessary changes to make the assembleWasabiDebug pass when using vendored fluxc and login modules.

Among others, this PR:

  • replaces coordinates of fluxc and login to point to local modules
  • updates dependencies and adds missing ones for vendored modules
  • unifies JVM version
  • adds necessary dependencies
  • fixes minor code issues, forced by Kotlin update on vendored codebase

Closes: #

Description

Steps to reproduce

Testing information

The tests that have been performed

Images/gif

  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

  • The PR is small and has a clear, single focus, or a valid explanation is provided in the description. If needed, please request to split it into smaller PRs.
  • Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
  • Manual Testing: The author listed all the tests they ran, including smoke tests when needed (e.g., for refactorings). The reviewer confirmed that the PR works as expected on big (tablet) and small (phone) in case of UI changes, and no regressions are added.

@dangermattic
Copy link
Collaborator

1 Warning
⚠️ This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.
1 Message
📖 This PR is still a Draft: some checks will be skipped.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jan 14, 2025

Project dependencies changes

The following changes in project dependencies were detected (configuration vanillaReleaseRuntimeClasspath):

list
Removed Dependencies
org.wordpress.fluxc.plugins:woocommerce:trunk-0264533ce612f74e1ae6fcbaefeb69b252163774
org.wordpress.fluxc:fluxc-annotations:trunk-0264533ce612f74e1ae6fcbaefeb69b252163774
org.wordpress:fluxc:trunk-0264533ce612f74e1ae6fcbaefeb69b252163774
org.wordpress:login:1.19.0
tree
-+--- org.wordpress:fluxc:trunk-0264533ce612f74e1ae6fcbaefeb69b252163774
-|    +--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.25 -> 2.0.21
-|    |    +--- org.jetbrains.kotlin:kotlin-stdlib:2.0.21 (*)
-|    |    \--- org.jetbrains.kotlin:kotlin-android-extensions-runtime:2.0.21
-|    |         \--- org.jetbrains.kotlin:kotlin-stdlib:2.0.21 (*)
-|    +--- androidx.exifinterface:exifinterface:1.0.0 -> 1.3.6
-|    |    \--- androidx.annotation:annotation:1.2.0 -> 1.8.1 (*)
-|    +--- androidx.security:security-crypto:1.0.0 -> 1.1.0-alpha03
-|    |    +--- androidx.annotation:annotation:1.1.0 -> 1.8.1 (*)
-|    |    +--- com.google.crypto.tink:tink-android:1.5.0
-|    |    \--- androidx.collection:collection:1.1.0 -> 1.4.0 (*)
-|    +--- com.squareup.okhttp3:okhttp-urlconnection:4.9.0
-|    |    +--- com.squareup.okhttp3:okhttp:4.9.0 -> 4.12.0 (*)
-|    |    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10 -> 1.9.10 (*)
-|    +--- com.google.code.gson:gson:2.8.5 -> 2.10.1
-|    +--- org.apache.commons:commons-text:1.10.0 (*)
-|    +--- androidx.room:room-runtime:2.6.1 (*)
-|    +--- androidx.room:room-ktx:2.6.1
-|    |    +--- androidx.room:room-common:2.6.1 (*)
-|    |    +--- androidx.room:room-runtime:2.6.1 (*)
-|    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 2.0.21 (*)
-|    |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1 -> 1.8.1 (*)
-|    |    +--- androidx.room:room-common:2.6.1 (c)
-|    |    \--- androidx.room:room-runtime:2.6.1 (c)
-|    +--- com.google.dagger:dagger:2.51.1
-|    |    \--- javax.inject:javax.inject:1
-|    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1 (*)
-|    +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1 (*)
-|    +--- org.wordpress:wellsql:2.0.0
-|    |    +--- androidx.annotation:annotation:1.2.0 -> 1.8.1 (*)
-|    |    \--- org.wordpress.wellsql:wellsql-annotations:2.0.0
-|    +--- org.wordpress.fluxc:fluxc-annotations:trunk-0264533ce612f74e1ae6fcbaefeb69b252163774
-|    +--- org.greenrobot:eventbus:3.3.1 (*)
-|    +--- org.greenrobot:eventbus-java:3.3.1
-|    +--- com.squareup.okhttp3:okhttp:4.9.0 -> 4.12.0 (*)
-|    +--- com.android.volley:volley:1.1.1 -> 1.2.0
-|    +--- androidx.paging:paging-runtime:2.1.2
-|    |    +--- androidx.paging:paging-common:2.1.2
-|    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.8.1 (*)
-|    |    |    \--- androidx.arch.core:core-common:2.0.0 -> 2.2.0 (*)
-|    |    +--- androidx.arch.core:core-runtime:2.0.0 -> 2.2.0 (*)
-|    |    +--- androidx.lifecycle:lifecycle-runtime:2.0.0 -> 2.8.7 (*)
-|    |    +--- androidx.lifecycle:lifecycle-livedata:2.0.0 -> 2.8.7 (*)
-|    |    \--- androidx.recyclerview:recyclerview:1.0.0 -> 1.3.2 (*)
-|    +--- com.goterl:lazysodium-android:5.0.2
-|    +--- net.java.dev.jna:jna:5.5.0
-|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.25 -> 2.0.21 (*)
-+--- org.wordpress.fluxc.plugins:woocommerce:trunk-0264533ce612f74e1ae6fcbaefeb69b252163774
-|    +--- org.wordpress:fluxc:trunk-0264533ce612f74e1ae6fcbaefeb69b252163774 (*)
-|    +--- com.google.code.gson:gson:2.8.5 -> 2.10.1
-|    +--- com.google.dagger:dagger:2.51.1 (*)
-|    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1 (*)
-|    +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1 (*)
-|    +--- androidx.room:room-runtime:2.6.1 (*)
-|    +--- org.wordpress:wellsql:2.0.0 (*)
-|    +--- org.wordpress.fluxc:fluxc-annotations:trunk-0264533ce612f74e1ae6fcbaefeb69b252163774
-|    +--- androidx.room:room-ktx:2.6.1 (*)
-|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.25 -> 2.0.21 (*)
-\--- org.wordpress:login:1.19.0
-     +--- com.gravatar:gravatar:0.2.0
-     |    +--- com.squareup.okhttp3:okhttp:4.12.0 (*)
-     |    +--- com.squareup.retrofit2:retrofit:2.9.0
-     |    |    \--- com.squareup.okhttp3:okhttp:3.14.9 -> 4.12.0 (*)
-     |    +--- com.squareup.retrofit2:converter-gson:2.9.0
-     |    |    +--- com.squareup.retrofit2:retrofit:2.9.0 (*)
-     |    |    \--- com.google.code.gson:gson:2.8.5 -> 2.10.1
-     |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3 -> 1.8.1 (*)
-     |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.22 -> 2.0.21 (*)
-     +--- androidx.appcompat:appcompat:1.6.1 (*)
-     +--- androidx.constraintlayout:constraintlayout:2.0.4 -> 2.1.4 (*)
-     +--- com.google.android.material:material:1.2.1 -> 1.12.0 (*)
-     +--- androidx.core:core:1.12.0 -> 1.13.1 (*)
-     +--- com.github.bumptech.glide:glide:4.12.0 -> 4.16.0
-     |    +--- com.github.bumptech.glide:gifdecoder:4.16.0
-     |    |    \--- androidx.annotation:annotation:1.5.0 -> 1.8.1 (*)
-     |    +--- com.github.bumptech.glide:disklrucache:4.16.0
-     |    +--- com.github.bumptech.glide:annotations:4.16.0
-     |    +--- androidx.fragment:fragment:1.3.6 -> 1.8.5 (*)
-     |    +--- androidx.vectordrawable:vectordrawable-animated:1.1.0 (*)
-     |    +--- androidx.exifinterface:exifinterface:1.3.6 (*)
-     |    \--- androidx.tracing:tracing:1.0.0 (*)
-     +--- androidx.credentials:credentials:1.2.0
-     |    +--- androidx.annotation:annotation:1.5.0 -> 1.8.1 (*)
-     |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 2.0.21 (*)
-     |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1 -> 1.8.1 (*)
-     |    \--- androidx.credentials:credentials-play-services-auth:1.2.0 (c)
-     +--- androidx.credentials:credentials-play-services-auth:1.2.0
-     |    +--- androidx.credentials:credentials:1.2.0 (*)
-     |    +--- com.google.android.gms:play-services-auth:20.7.0 (*)
-     |    +--- com.google.android.gms:play-services-fido:20.1.0 (*)
-     |    +--- com.google.android.libraries.identity.googleid:googleid:1.1.0
-     |    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.0 -> 2.0.21 (*)
-     |    |    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0 -> 1.9.10 (*)
-     |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 2.0.21 (*)
-     |    \--- androidx.credentials:credentials:1.2.0 (c)
-     +--- com.google.dagger:dagger:2.47 -> 2.51.1 (*)
-     +--- com.google.dagger:dagger-android-support:2.47 -> 2.50
-     |    +--- com.google.dagger:dagger:2.50 -> 2.51.1 (*)
-     |    +--- com.google.dagger:dagger-android:2.50
-     |    |    +--- com.google.dagger:dagger:2.50 -> 2.51.1 (*)
-     |    |    +--- com.google.dagger:dagger-lint-aar:2.50
-     |    |    +--- androidx.annotation:annotation:1.2.0 -> 1.8.1 (*)
-     |    |    \--- javax.inject:javax.inject:1
-     |    +--- com.google.dagger:dagger-lint-aar:2.50
-     |    +--- androidx.activity:activity:1.5.1 -> 1.8.1 (*)
-     |    +--- androidx.annotation:annotation:1.2.0 -> 1.8.1 (*)
-     |    +--- androidx.appcompat:appcompat:1.3.1 -> 1.6.1 (*)
-     |    +--- androidx.fragment:fragment:1.5.1 -> 1.8.5 (*)
-     |    +--- androidx.lifecycle:lifecycle-common:2.5.1 -> 2.8.7 (*)
-     |    +--- androidx.lifecycle:lifecycle-viewmodel:2.5.1 -> 2.8.7 (*)
-     |    +--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.5.1 -> 2.8.7 (*)
-     |    \--- javax.inject:javax.inject:1
-     +--- com.google.android.gms:play-services-auth:18.1.0 -> 20.7.0 (*)
-     \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.25 -> 2.0.21 (*)
++--- project :libs:fluxc
+|    +--- org.wordpress:wellsql:2.0.0
+|    |    +--- androidx.annotation:annotation:1.2.0 -> 1.8.1 (*)
+|    |    \--- org.wordpress.wellsql:wellsql-annotations:2.0.0
+|    +--- project :libs:fluxc-annotations
+|    +--- org.greenrobot:eventbus:3.3.1 (*)
+|    +--- org.greenrobot:eventbus-java:3.3.1
+|    +--- com.squareup.okhttp3:okhttp:4.9.0 -> 4.12.0 (*)
+|    +--- com.android.volley:volley:1.1.1 -> 1.2.0
+|    +--- androidx.paging:paging-runtime:2.1.2
+|    |    +--- androidx.paging:paging-common:2.1.2
+|    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.8.1 (*)
+|    |    |    \--- androidx.arch.core:core-common:2.0.0 -> 2.2.0 (*)
+|    |    +--- androidx.arch.core:core-runtime:2.0.0 -> 2.2.0 (*)
+|    |    +--- androidx.lifecycle:lifecycle-runtime:2.0.0 -> 2.8.7 (*)
+|    |    +--- androidx.lifecycle:lifecycle-livedata:2.0.0 -> 2.8.7 (*)
+|    |    \--- androidx.recyclerview:recyclerview:1.0.0 -> 1.3.2 (*)
+|    +--- com.goterl:lazysodium-android:5.0.2
+|    +--- net.java.dev.jna:jna:5.5.0
+|    +--- org.jetbrains.kotlin:kotlin-stdlib:2.0.21 (*)
+|    +--- androidx.exifinterface:exifinterface:1.0.0 -> 1.3.6
+|    |    \--- androidx.annotation:annotation:1.2.0 -> 1.8.1 (*)
+|    +--- androidx.security:security-crypto:1.0.0 -> 1.1.0-alpha03
+|    |    +--- androidx.annotation:annotation:1.1.0 -> 1.8.1 (*)
+|    |    +--- com.google.crypto.tink:tink-android:1.5.0
+|    |    \--- androidx.collection:collection:1.1.0 -> 1.4.0 (*)
+|    +--- org.wordpress:utils:3.15.0 (*)
+|    +--- com.squareup.okhttp3:okhttp-urlconnection:4.9.0
+|    |    +--- com.squareup.okhttp3:okhttp:4.9.0 -> 4.12.0 (*)
+|    |    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10 -> 1.9.10 (*)
+|    +--- com.google.code.gson:gson:2.10.1
+|    +--- org.apache.commons:commons-text:1.10.0 (*)
+|    +--- androidx.room:room-runtime:2.6.1 (*)
+|    +--- androidx.room:room-ktx:2.6.1
+|    |    +--- androidx.room:room-common:2.6.1 (*)
+|    |    +--- androidx.room:room-runtime:2.6.1 (*)
+|    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 2.0.21 (*)
+|    |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1 -> 1.8.1 (*)
+|    |    +--- androidx.room:room-common:2.6.1 (c)
+|    |    \--- androidx.room:room-runtime:2.6.1 (c)
+|    +--- com.google.dagger:dagger:2.50 -> 2.51.1
+|    |    \--- javax.inject:javax.inject:1
+|    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1 (*)
+|    +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1 (*)
+|    \--- org.jetbrains.kotlin:kotlin-parcelize-runtime:2.0.21
+|         +--- org.jetbrains.kotlin:kotlin-stdlib:2.0.21 (*)
+|         \--- org.jetbrains.kotlin:kotlin-android-extensions-runtime:2.0.21
+|              \--- org.jetbrains.kotlin:kotlin-stdlib:2.0.21 (*)
++--- project :libs:fluxc-plugin
+|    +--- org.wordpress:wellsql:2.0.0 (*)
+|    +--- project :libs:fluxc-annotations
+|    +--- androidx.room:room-ktx:2.6.1 (*)
+|    +--- org.jetbrains.kotlin:kotlin-stdlib:2.0.21 (*)
+|    +--- project :libs:fluxc (*)
+|    +--- org.wordpress:utils:3.15.0 (*)
+|    +--- com.google.code.gson:gson:2.10.1
+|    +--- com.google.dagger:dagger:2.50 -> 2.51.1 (*)
+|    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1 (*)
+|    +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1 (*)
+|    \--- androidx.room:room-runtime:2.6.1 (*)
+\--- project :libs:login
+     +--- com.google.android.gms:play-services-auth:20.2.0 -> 20.7.0 (*)
+     +--- org.jetbrains.kotlin:kotlin-stdlib:2.0.21 (*)
+     +--- org.wordpress:utils:3.15.0 (*)
+     +--- com.gravatar:gravatar:0.2.0
+     |    +--- com.squareup.okhttp3:okhttp:4.12.0 (*)
+     |    +--- com.squareup.retrofit2:retrofit:2.9.0
+     |    |    \--- com.squareup.okhttp3:okhttp:3.14.9 -> 4.12.0 (*)
+     |    +--- com.squareup.retrofit2:converter-gson:2.9.0
+     |    |    +--- com.squareup.retrofit2:retrofit:2.9.0 (*)
+     |    |    \--- com.google.code.gson:gson:2.8.5 -> 2.10.1
+     |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3 -> 1.8.1 (*)
+     |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.22 -> 2.0.21 (*)
+     +--- androidx.appcompat:appcompat:1.4.2 -> 1.6.1 (*)
+     +--- androidx.constraintlayout:constraintlayout:2.1.4 (*)
+     +--- com.google.android.material:material:1.12.0 (*)
+     +--- androidx.core:core-ktx:1.13.1 (*)
+     +--- project :libs:fluxc (*)
+     +--- com.github.bumptech.glide:glide:4.16.0
+     |    +--- com.github.bumptech.glide:gifdecoder:4.16.0
+     |    |    \--- androidx.annotation:annotation:1.5.0 -> 1.8.1 (*)
+     |    +--- com.github.bumptech.glide:disklrucache:4.16.0
+     |    +--- com.github.bumptech.glide:annotations:4.16.0
+     |    +--- androidx.fragment:fragment:1.3.6 -> 1.8.5 (*)
+     |    +--- androidx.vectordrawable:vectordrawable-animated:1.1.0 (*)
+     |    +--- androidx.exifinterface:exifinterface:1.3.6 (*)
+     |    \--- androidx.tracing:tracing:1.0.0 (*)
+     +--- androidx.credentials:credentials:1.2.0
+     |    +--- androidx.annotation:annotation:1.5.0 -> 1.8.1 (*)
+     |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 2.0.21 (*)
+     |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1 -> 1.8.1 (*)
+     |    \--- androidx.credentials:credentials-play-services-auth:1.2.0 (c)
+     +--- androidx.credentials:credentials-play-services-auth:1.2.0
+     |    +--- androidx.credentials:credentials:1.2.0 (*)
+     |    +--- com.google.android.gms:play-services-auth:20.7.0 (*)
+     |    +--- com.google.android.gms:play-services-fido:20.1.0 (*)
+     |    +--- com.google.android.libraries.identity.googleid:googleid:1.1.0
+     |    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.0 -> 2.0.21 (*)
+     |    |    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0 -> 1.9.10 (*)
+     |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 2.0.21 (*)
+     |    \--- androidx.credentials:credentials:1.2.0 (c)
+     +--- com.google.dagger:dagger:2.50 -> 2.51.1 (*)
+     \--- com.google.dagger:dagger-android-support:2.50
+          +--- com.google.dagger:dagger:2.50 -> 2.51.1 (*)
+          +--- com.google.dagger:dagger-android:2.50
+          |    +--- com.google.dagger:dagger:2.50 -> 2.51.1 (*)
+          |    +--- com.google.dagger:dagger-lint-aar:2.50
+          |    +--- androidx.annotation:annotation:1.2.0 -> 1.8.1 (*)
+          |    \--- javax.inject:javax.inject:1
+          +--- com.google.dagger:dagger-lint-aar:2.50
+          +--- androidx.activity:activity:1.5.1 -> 1.8.1 (*)
+          +--- androidx.annotation:annotation:1.2.0 -> 1.8.1 (*)
+          +--- androidx.appcompat:appcompat:1.3.1 -> 1.6.1 (*)
+          +--- androidx.fragment:fragment:1.5.1 -> 1.8.5 (*)
+          +--- androidx.lifecycle:lifecycle-common:2.5.1 -> 2.8.7 (*)
+          +--- androidx.lifecycle:lifecycle-viewmodel:2.5.1 -> 2.8.7 (*)
+          +--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.5.1 -> 2.8.7 (*)
+          \--- javax.inject:javax.inject:1

Build environment changes

The following changes in the build classpath were detected:

list
New Dependencies
org.jetbrains.kotlin.kapt:org.jetbrains.kotlin.kapt.gradle.plugin:2.0.21
tree
+\--- org.jetbrains.kotlin.kapt:org.jetbrains.kotlin.kapt.gradle.plugin:2.0.21
+     \--- org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.21 (*)

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jan 14, 2025

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit7b5ebd2
Direct Downloadwoocommerce-wear-prototype-build-pr13304-7b5ebd2.apk

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jan 14, 2025

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commit7b5ebd2
Direct Downloadwoocommerce-prototype-build-pr13304-7b5ebd2.apk

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Android Lint found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@wzieba wzieba mentioned this pull request Jan 14, 2025
4 tasks
@wzieba wzieba force-pushed the login_with_history branch from df275bc to a17b932 Compare January 14, 2025 17:15
@wzieba wzieba force-pushed the adjust_fluxc_login_vendor branch from 54707c5 to 11253d1 Compare January 14, 2025 17:15
@wzieba wzieba force-pushed the login_with_history branch 9 times, most recently from bd9aece to bb71676 Compare January 15, 2025 15:59
@wzieba wzieba force-pushed the adjust_fluxc_login_vendor branch from 11253d1 to 0cb655c Compare January 15, 2025 16:34
@wzieba wzieba force-pushed the login_with_history branch from bb71676 to 565d952 Compare January 17, 2025 10:49
This PR introduces necessary changes to make the `assembleWasabiDebug` pass when using vendored `fluxc` and `login` modules.

Among others, this PR:
  - replaces coordinates of `fluxc` and `login` to point to local modules
  - updates dependencies and adds missing ones for vendored modules
  - unifies JVM version
  - adds necessary dependencies
  - fixes minor code issues, forced by Kotlin update on vendored codebase
This PR introduces necessary changes to make the `assembleWasabiDebug` pass when using vendored `fluxc` and `login` modules.

Among others, this PR:
  - replaces coordinates of `fluxc` and `login` to point to local modules
  - updates dependencies and adds missing ones for vendored modules
  - unifies JVM version
  - adds necessary dependencies
  - fixes minor code issues, forced by Kotlin update on vendored codebase
Which contains all unit tests from original `example` module. Also, this commit adds a number of changes to make unit tests run.

`ArrayUtilsTest` is removed as `ArrayUtils` was an example-app only class.
@wzieba wzieba force-pushed the adjust_fluxc_login_vendor branch from 0cb655c to 2f75caf Compare January 17, 2025 11:10
- `mockito` upgrade is necessary to make the build work with newer JDKs

```
Java 21 (65) is not supported by the current version of Byte Buddy which officially supports Java 20 (64) - update Byte Buddy or set net.bytebuddy.experimental as a VM property
```

- since 5.0, `mockito-core` includes the `mockito-inline` module
To address `NoWhenBranchMatchedException`: these failing tests were crashing because `response` in `ProductRestClient#fetchProducts` was checked in `when` branch, while the value was null (not mocked). This change was requested by Kotlin update.
Citing the documentation:

```
The List type in Java is mapped to the MutableList type in Kotlin. Because the List.removeFirst() and List.removeLast() APIs have been introduced in Android 15 (API level 35), the Kotlin compiler resolves function calls, for example list.removeFirst(), statically to the new List APIs instead of to the extension functions in kotlin-stdlib.

If an app is re-compiled with compileSdk set to 35 and minSdk set to 34 or lower, and then the app is run on Android 14 and lower, a runtime error is thrown:
```

https://developer.android.com/about/versions/15/behavior-changes-15
They were not enabled/configured back in FluxC, so enabling them here causes hundreds of violations.

Adjust `MagicNumber` rule to also fit newly added codebase
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants