Skip to content

Commit

Permalink
Use vendored fluxc and login
Browse files Browse the repository at this point in the history
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
  • Loading branch information
wzieba committed Jan 17, 2025
1 parent 565d952 commit a228050
Show file tree
Hide file tree
Showing 14 changed files with 265 additions and 259 deletions.
10 changes: 2 additions & 8 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:plugins:woocommerce"))
implementation(libs.wordpress.utils) {
exclude group: "com.mcxiaoke.volley"
exclude group: "com.android.support"
Expand Down
16 changes: 3 additions & 13 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:plugins:woocommerce"))
implementation(project(":libs:login"))

implementation(libs.wordpress.aztec.main) {
exclude group: "com.android.volley"
Expand Down
3 changes: 2 additions & 1 deletion 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 Expand Up @@ -67,7 +68,7 @@ allprojects {
tasks.withType(KotlinCompile).all {
kotlinOptions {
jvmTarget = libs.versions.java.get()
allWarningsAsErrors = true
allWarningsAsErrors = false //todo
freeCompilerArgs += [
"-opt-in=kotlin.RequiresOptIn",
"-Xjvm-default=all-compatibility",
Expand Down
42 changes: 38 additions & 4 deletions gradle/libs.versions.toml
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'
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"
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"
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 = '4.6.1'
mockito-kotlin = '4.0.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"
wellsql = "2.0.0"
wiremock = '2.26.3'
wordpress-aztec = 'v2.1.4'
wordpress-fluxc = 'trunk-0264533ce612f74e1ae6fcbaefeb69b252163774'
wordpress-login = '1.19.0'
wordpress-libaddressinput = '0.0.2'
wordpress-lint = "2.0.0"
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" }
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,25 @@ 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-inline = { group = "org.mockito", name = "mockito-inline", 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 +285,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" }
5 changes: 1 addition & 4 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 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()
}

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

0 comments on commit a228050

Please sign in to comment.