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

Open
wants to merge 8 commits into
base: login_with_history
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions WooCommerce-Wear/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,8 @@ android {
dependencies {
// Project
implementation project(":libs:commons")
implementation("${gradle.ext.fluxCBinaryPath}:${libs.versions.wordpress.fluxc.get()}") {
exclude group: "com.android.support"
exclude group: "org.wordpress", module: "utils"
}
implementation("${gradle.ext.fluxCWooCommercePluginBinaryPath}:${libs.versions.wordpress.fluxc.get()}") {
exclude group: "com.android.support"
exclude group: "org.wordpress", module: "utils"
}
implementation(project(":libs:fluxc"))
implementation(project(":libs:fluxc-plugin"))
implementation(libs.wordpress.utils) {
exclude group: "com.mcxiaoke.volley"
exclude group: "com.android.support"
Expand Down Expand Up @@ -194,7 +188,6 @@ dependencies {
// Testing
testImplementation(libs.junit)
testImplementation(libs.mockito.kotlin)
testImplementation(libs.mockito.inline)
testImplementation(libs.kotlin.test.junit)
testImplementation(libs.assertj.core)
testImplementation(libs.androidx.arch.core.testing) {
Expand Down
17 changes: 3 additions & 14 deletions WooCommerce/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -245,19 +245,9 @@ dependencies {
implementation(libs.automattic.tracks.android)
implementation(libs.automattic.tracks.crashlogging)

implementation("${gradle.ext.fluxCBinaryPath}:${libs.versions.wordpress.fluxc.get()}") {
exclude group: "com.android.support"
exclude group: "org.wordpress", module: "utils"
}
implementation("${gradle.ext.fluxCWooCommercePluginBinaryPath}:${libs.versions.wordpress.fluxc.get()}") {
exclude group: "com.android.support"
exclude group: "org.wordpress", module: "utils"
}

implementation("$gradle.ext.loginFlowBinaryPath:${libs.versions.wordpress.login.get()}") {
exclude group: "org.wordpress", module: "utils"
exclude group: "org.wordpress", module: "fluxc"
}
implementation(project(":libs:fluxc"))
implementation(project(":libs:fluxc-plugin"))
implementation(project(":libs:login"))

implementation(libs.wordpress.aztec.main) {
exclude group: "com.android.volley"
Expand Down Expand Up @@ -331,7 +321,6 @@ dependencies {
// Dependencies for local unit tests
testImplementation(libs.junit)
testImplementation(libs.mockito.kotlin)
testImplementation(libs.mockito.inline)
testImplementation(libs.kotlin.test.junit)
testImplementation(libs.assertj.core)
testImplementation(libs.androidx.arch.core.testing) {
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ plugins {
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.compose).apply(false)
alias(libs.plugins.kotlin.parcelize) apply false
alias(libs.plugins.kotlin.kapt) apply false
alias(libs.plugins.google.dagger.hilt) apply false
alias(libs.plugins.androidx.navigation.safeargs) apply false
alias(libs.plugins.google.services) apply false
Expand Down
3 changes: 3 additions & 0 deletions config/detekt/detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ complexity:
formatting:
active: true
autoCorrect: true
excludes: ['**/fluxc/**', '**/login/**']
wzieba marked this conversation as resolved.
Show resolved Hide resolved
Indentation:
active: true
autoCorrect: true
Expand All @@ -27,6 +28,8 @@ style:
active: true
ignoreAnnotated: [ 'Module' ]
MagicNumber:
ignoreEnums: true
ignorePropertyDeclaration: true
wzieba marked this conversation as resolved.
Show resolved Hide resolved
ignoreAnnotated: [ 'Composable' ]
UnusedPrivateMember:
ignoreAnnotated: [ 'Preview', 'LightDarkThemePreviews', 'OrientationPreviews', 'FontScalePreviews', 'LayoutDirectionPreviews' ]
Expand Down
43 changes: 38 additions & 5 deletions gradle/libs.versions.toml
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor (🔍): Some things I noticed during review, some related, some unrelated to the actual changes in this PR:

  • Related: The androidx-appcompat version is pointing to 1.4.2 but the login library was pointing to 1.6.1, we could consider updating it to point to a latest version instead of an older one. PS: I am sure that transitive updates already pointing to a much newer version, but... 🤷
  • Unrelated: The androidx-activity version is unused, we could consider removing it.
  • Unrelated: The android-billingclient-ktx and bumptech-glide-ksp libraries are unused, we could consider removing them.

Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,19 @@ androidx-constraintlayout-compose = '1.0.1'
androidx-constraintlayout-main = '2.1.4'
androidx-core-main = '1.13.1'
androidx-core-splashscreen = '1.0.1'
androidx-credentials = '1.2.0'
Fixed Show fixed Hide fixed
Fixed Show fixed Hide fixed
androidx-datastore = '1.0.0' # Higher versions of the DataStore library are presenting crashes, refer to peaMlT-XN before upgrading it.
androidx-exifinterface = "1.0.0"
androidx-fragment = '1.8.5'
androidx-hilt = '1.2.0'
androidx-lifecycle = '2.8.7'
androidx-navigation = '2.7.7'
androidx-paging-runtime = "2.1.2"
Fixed Show fixed Hide fixed
androidx-preference = '1.2.1'
androidx-recyclerview-main = '1.3.2'
androidx-recyclerview-selection = '1.1.0'
androidx-room = "2.6.1"
androidx-security-crypto = "1.0.0"
androidx-test-espresso = '3.4.0'
androidx-test-ext = '1.1.5'
androidx-test-main = '1.4.0'
Expand All @@ -45,11 +49,14 @@ coil = '2.1.0'
commons-fileupload = '1.5'
dependency-analysis = '1.28.0'
detekt = '1.23.5'
eventbus = "3.3.1"
facebook-flipper = '0.176.1'
facebook-shimmer = '0.5.0'
facebook-soloader = '0.10.4'
fastlane-screengrab = '2.1.1'
fladle = '0.17.5'
glassfish-javax-annotation = "10.0-b28"
google-autoService = "1.0-rc4"
Fixed Show fixed Hide fixed
google-dagger = "2.50" # Fix the crash on the media picker before upgrading this
google-firebase-bom = '32.7.1'
google-gson = '2.10.1'
Expand Down Expand Up @@ -77,19 +84,23 @@ lottie = '5.2.0'
kotlin = '2.0.21'
kotlinx-coroutines = '1.8.1'
ksp = '2.0.21-1.0.27'
mockito-inline = '4.6.1'
mockito-kotlin = '4.0.0'
mockito = '5.14.2'
wzieba marked this conversation as resolved.
Show resolved Hide resolved
mockito-kotlin = '5.4.0'
mpandroidchart = 'v3.1.0'
photoview = '2.3.0'
robolectric = "4.11"
sentry = '4.10.0'
squareup-javapoet = "1.7.0"
squareup-leakcanary = '2.14'
squareup-okhttp3 = "4.9.0"
stripe-terminal = '3.7.1'
tinder-statemachine = '0.2.0'
volley = "1.1.1"
Fixed Show fixed Hide fixed
wellsql = "2.0.0"
wiremock = '2.26.3'
wordpress-aztec = 'v2.1.4'
wordpress-fluxc = 'trunk-657a72d968f89dc2edd6a6e6e57f579643d1e213'
wordpress-login = 'trunk-706a58b33ff8f1a2858ae64e51204426ec12fe7b'
wordpress-libaddressinput = '0.0.2'
wordpress-lint = "2.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor (🔍): The wordpress-lint version is pointing to 2.0.0 but the login library was pointing to 2.1.0, we could consider updating it to point to a latest version instead of an older one.

wordpress-mediapicker = '0.3.1'
wordpress-utils = '3.15.0'
zendesk = '5.0.8'
Expand Down Expand Up @@ -121,8 +132,11 @@ androidx-constraintlayout-compose = { group = "androidx.constraintlayout", name
androidx-constraintlayout-main = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "androidx-constraintlayout-main" }
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "androidx-core-main" }
androidx-core-splashscreen = { group = "androidx.core", name = "core-splashscreen", version.ref = "androidx-core-splashscreen" }
androidx-credentials-main = { module = "androidx.credentials:credentials", version.ref = "androidx-credentials" }
Fixed Show fixed Hide fixed
androidx-credentials-play-service-auth = { module = "androidx.credentials:credentials-play-services-auth", version.ref = "androidx-credentials" }
androidx-datastore-main = { group = "androidx.datastore", name = "datastore", version.ref = "androidx-datastore" }
androidx-datastore-preferences = { group = "androidx.datastore", name = "datastore-preferences", version.ref = "androidx-datastore" }
androidx-exifinterface = { module = "androidx.exifinterface:exifinterface", version.ref = "androidx-exifinterface" }
androidx-fragment-ktx = { group = "androidx.fragment", name = "fragment-ktx", version.ref = "androidx-fragment" }
androidx-hilt-common = { group = "androidx.hilt", name = "hilt-common", version.ref = "androidx-hilt" }
androidx-hilt-compiler = { group = "androidx.hilt", name = "hilt-compiler", version.ref = "androidx-hilt" }
Expand All @@ -139,13 +153,16 @@ androidx-navigation-compose = { group = "androidx.navigation", name = "navigatio
androidx-navigation-fragment = { group = "androidx.navigation", name = "navigation-fragment", version.ref = "androidx-navigation" }
androidx-navigation-runtime = { group = "androidx.navigation", name = "navigation-runtime", version.ref = "androidx-navigation" }
androidx-navigation-ui = { group = "androidx.navigation", name = "navigation-ui", version.ref = "androidx-navigation" }
androidx-paging-runtime = { module = "androidx.paging:paging-runtime", version.ref = "androidx-paging-runtime" }
androidx-preference-main = { group = "androidx.preference", name = "preference", version.ref = "androidx-preference" }
androidx-preference-ktx = { group = "androidx.preference", name = "preference-ktx", version.ref = "androidx-preference" }
androidx-recyclerview-main = { group = "androidx.recyclerview", name = "recyclerview", version.ref = "androidx-recyclerview-main" }
androidx-recyclerview-selection = { group = "androidx.recyclerview", name = "recyclerview-selection", version.ref = "androidx-recyclerview-selection" }
androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "androidx-room" }
androidx-room-ktx = { module = "androidx.room:room-ktx", version.ref = "androidx-room" }
androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "androidx-room" }
androidx-room-testing = { module = "androidx.room:room-testing", version.ref = "androidx-room" }
androidx-security-crypto = { module = "androidx.security:security-crypto", version.ref = "androidx-security-crypto" }
androidx-test-espresso-contrib = { group = "androidx.test.espresso", name = "espresso-contrib", version.ref = "androidx-test-espresso" }
androidx-test-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "androidx-test-espresso" }
androidx-test-ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "androidx-test-ext" }
Expand All @@ -170,20 +187,27 @@ automattic-tracks-experimentation = { group = "com.automattic.tracks", name = "e
automattic-tracks-crashlogging = { group = "com.automattic.tracks", name = "crashlogging", version.ref = "automattic-tracks" }
bumptech-glide-main = { group = "com.github.bumptech.glide", name = "glide", version.ref = "bumptech-glide" }
bumptech-glide-compiler = { group = "com.github.bumptech.glide", name = "compiler", version.ref = "bumptech-glide" }
bumptech-glide-ksp = { group = "com.github.bumptech.glide", name = "ksp", version.ref = "bumptech-glide" }
bumptech-glide-volley-integration = { group = "com.github.bumptech.glide", name = "volley-integration", version.ref = "bumptech-glide" }
bumptech-glide-avif-integration = { group = "com.github.bumptech.glide", name = "avif-integration", version.ref = "bumptech-glide" }
cashapp-turbine = { group = "app.cash.turbine", name = "turbine", version.ref = "cashapp-turbine" }
coil-compose = { group = "io.coil-kt", name = "coil-compose", version.ref = "coil" }
coil-svg = { group = "io.coil-kt", name = "coil-svg", version.ref = "coil" }
commons-fileupload = { group = "commons-fileupload", name = "commons-fileupload", version.ref = "commons-fileupload" }
detekt-formatting = { group = "io.gitlab.arturbosch.detekt", name = "detekt-formatting", version.ref = "detekt" }
eventbus-android = { module = "org.greenrobot:eventbus", version.ref = "eventbus" }
eventbus-java = {group = "org.greenrobot", name = "eventbus-java", version.ref = "eventbus" }
facebook-flipper-main = { group = "com.facebook.flipper", name = "flipper", version.ref = "facebook-flipper" }
facebook-flipper-network-plugin = { group = "com.facebook.flipper", name = "flipper-network-plugin", version.ref = "facebook-flipper" }
facebook-shimmer = { group = "com.facebook.shimmer", name = "shimmer", version.ref = "facebook-shimmer" }
facebook-soloader = { group = "com.facebook.soloader", name = "soloader", version.ref = "facebook-soloader" }
fastlane-screengrab = { group = "tools.fastlane", name = "screengrab", version.ref = "fastlane-screengrab" }
glassfish-javax-annotation = { module = "org.glassfish:javax.annotation", version.ref = "glassfish-javax-annotation" }
google-autoService = { module = "com.google.auto.service:auto-service", version.ref = "google-autoService" }
google-dagger = { module = "com.google.dagger:dagger", version.ref = "google-dagger" }
google-dagger-android-processor = { group = "com.google.dagger", name = "dagger-android-processor", version.ref = "google-dagger" }
google-dagger-android-support = { group = "com.google.dagger", name = "dagger-android-support", version.ref = "google-dagger" }
google-dagger-compiler = { module = "com.google.dagger:dagger-compiler", version.ref = "google-dagger" }
google-dagger-hilt-android-compiler = { group = "com.google.dagger", name = "hilt-android-compiler", version.ref = "google-dagger" }
google-dagger-hilt-android-main = { group = "com.google.dagger", name = "hilt-android", version.ref = "google-dagger" }
google-dagger-hilt-android-testing = { group = "com.google.dagger", name = "hilt-android-testing", version.ref = "google-dagger" }
Expand Down Expand Up @@ -222,16 +246,24 @@ kotlinx-coroutines-android = { group = "org.jetbrains.kotlinx", name = "kotlinx-
kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-play-services = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-play-services", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "kotlinx-coroutines" }
mockito-inline = { group = "org.mockito", name = "mockito-inline", version.ref = "mockito-inline" }
mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito" }
mockito-kotlin = { group = "org.mockito.kotlin", name = "mockito-kotlin", version.ref = "mockito-kotlin" }
mpandroidchart = { group = "com.github.PhilJay", name = "MPAndroidChart", version.ref = "mpandroidchart" }
photoview = { group = "com.github.chrisbanes", name = "PhotoView", version.ref = "photoview" }
robolectric = { module = "org.robolectric:robolectric", version.ref = "robolectric" }
squareup-javapoet = { module = "com.squareup:javapoet", version.ref = "squareup-javapoet" }
squareup-leakcanary-android = { group = "com.squareup.leakcanary", name = "leakcanary-android", version.ref = "squareup-leakcanary" }
squareup-okhttp3 = { module = "com.squareup.okhttp3:okhttp", version.ref = "squareup-okhttp3" }
squareup-okhttp3-urlconnection = { module = "com.squareup.okhttp3:okhttp-urlconnection", version.ref = "squareup-okhttp3" }
stripe-terminal-localmobile = { group = "com.stripe", name = "stripeterminal-localmobile", version.ref = "stripe-terminal" }
stripe-terminal-core = { group = "com.stripe", name = "stripeterminal-core", version.ref = "stripe-terminal" }
tinder-statemachine = { group = "com.tinder.statemachine", name = "statemachine", version.ref = "tinder-statemachine" }
volley = { module = "com.android.volley:volley", version.ref = "volley" }
wellsql = { module = "org.wordpress:wellsql", version.ref = "wellsql" }
wellsql-processor = { module = "org.wordpress.wellsql:wellsql-processor", version.ref = "wellsql" }
wiremock = { group = "com.github.tomakehurst", name = "wiremock", version.ref = "wiremock" }
wordpress-libaddressinput-common = { group = "org.wordpress", name = "libaddressinput.common", version.ref = "wordpress-libaddressinput" }
wordpress-lint = { module = "org.wordpress:lint", version.ref = "wordpress-lint" }
wordpress-aztec-main = { group = "org.wordpress", name = "aztec", version.ref = "wordpress-aztec" }
wordpress-aztec-glide-loader = { group = "org.wordpress.aztec", name = "glide-loader", version.ref = "wordpress-aztec" }
wordpress-utils = { group = "org.wordpress", name = "utils", version.ref = "wordpress-utils" }
Expand All @@ -252,5 +284,6 @@ google-services = { id = "com.google.gms.google-services", version.ref = "google
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
sentry = { id = "io.sentry.android.gradle", version.ref = "sentry" }
6 changes: 1 addition & 5 deletions libs/apifaker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ dependencies {
implementation(libs.androidx.compose.material.icons.extended)
debugImplementation(libs.androidx.compose.ui.tooling.main)

implementation("${gradle.ext.fluxCBinaryPath}:${libs.versions.wordpress.fluxc.get()}") {
exclude group: "com.android.support"
exclude group: "org.wordpress", module: "utils"
}
implementation(project(":libs:fluxc"))

implementation(libs.androidx.room.runtime)
implementation(libs.androidx.room.ktx)
Expand All @@ -55,5 +52,4 @@ dependencies {

testImplementation(libs.junit)
testImplementation(libs.mockito.kotlin)
testImplementation(libs.mockito.inline)
}
1 change: 0 additions & 1 deletion libs/cardreader/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ dependencies {
implementation(libs.kotlinx.coroutines.android)

testImplementation(libs.mockito.kotlin)
testImplementation(libs.mockito.inline)
testImplementation(libs.kotlin.test.junit)
testImplementation(libs.assertj.core)
testImplementation(libs.kotlinx.coroutines.test)
Expand Down
19 changes: 2 additions & 17 deletions libs/fluxc-annotations/build.gradle
Original file line number Diff line number Diff line change
@@ -1,26 +1,11 @@
plugins {
id "java"
alias(sharedLibs.plugins.automattic.publishToS3)
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility libs.versions.java.get()
targetCompatibility libs.versions.java.get()

withSourcesJar()
withJavadocJar()
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor (🔍): Consider removing this configuration above.

PS: Same applies for the fluxc-processor module.

}

project.afterEvaluate {
publishing {
publications {
FluxCAnnotationsPublication(MavenPublication) {
from components.java

groupId "org.wordpress.fluxc"
artifactId "fluxc-annotations"
// version is set by 'publish-to-s3' plugin
}
}
}
}
Loading
Loading