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
Draft
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
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
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/**']
Indentation:
active: true
autoCorrect: true
Expand All @@ -27,6 +28,8 @@ style:
active: true
ignoreAnnotated: [ 'Module' ]
MagicNumber:
ignoreEnums: true
ignorePropertyDeclaration: true
ignoreAnnotated: [ 'Composable' ]
UnusedPrivateMember:
ignoreAnnotated: [ 'Preview', 'LightDarkThemePreviews', 'OrientationPreviews', 'FontScalePreviews', 'LayoutDirectionPreviews' ]
Expand Down
43 changes: 38 additions & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,19 @@
androidx-constraintlayout-main = '2.1.4'
androidx-core-main = '1.13.1'
androidx-core-splashscreen = '1.0.1'
androidx-credentials = '1.2.0'

Check warning

Code scanning / Android Lint

Obsolete Gradle Dependency Warning

A newer version of androidx.credentials:credentials than 1.2.0 is available: 1.3.0

Check warning

Code scanning / Android Lint

Obsolete Gradle Dependency Warning

A newer version of androidx.credentials:credentials than 1.2.0 is available: 1.3.0

Check warning

Code scanning / Android Lint

Obsolete Gradle Dependency Warning

A newer version of androidx.credentials:credentials than 1.2.0 is available: 1.3.0

Check warning

Code scanning / Android Lint

Obsolete Gradle Dependency Warning

A newer version of androidx.credentials:credentials-play-services-auth than 1.2.0 is available: 1.3.0

Check warning

Code scanning / Android Lint

Obsolete Gradle Dependency Warning

A newer version of androidx.credentials:credentials-play-services-auth than 1.2.0 is available: 1.3.0

Check warning

Code scanning / Android Lint

Obsolete Gradle Dependency Warning

A newer version of androidx.credentials:credentials-play-services-auth than 1.2.0 is available: 1.3.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"

Check warning

Code scanning / Android Lint

Obsolete Gradle Dependency Warning

A newer version of androidx.paging:paging-runtime than 2.1.2 is available: 3.3.5

Check warning

Code scanning / Android Lint

Obsolete Gradle Dependency Warning

A newer version of androidx.paging:paging-runtime than 2.1.2 is available: 3.3.5

Check warning

Code scanning / Android Lint

Obsolete Gradle Dependency Warning

A newer version of androidx.paging:paging-runtime than 2.1.2 is available: 3.3.5
androidx-preference = '1.2.1'
androidx-recyclerview-main = '1.3.2'

Check warning

Code scanning / Android Lint

Obsolete Gradle Dependency Warning

A newer version of androidx.test.ext:junit than 1.1.5 is available: 1.2.1

Check warning

Code scanning / Android Lint

Obsolete Gradle Dependency Warning

A newer version of androidx.test.ext:junit than 1.1.5 is available: 1.2.1

Check warning

Code scanning / Android Lint

Obsolete Gradle Dependency Warning

A newer version of androidx.test.ext:junit than 1.1.5 is available: 1.2.1

Check warning

Code scanning / Android Lint

Obsolete Gradle Dependency Warning

A newer version of androidx.test.espresso:espresso-contrib than 3.4.0 is available: 3.6.1

Check warning

Code scanning / Android Lint

Obsolete Gradle Dependency Warning

A newer version of androidx.test.espresso:espresso-contrib than 3.4.0 is available: 3.6.1

Check warning

Code scanning / Android Lint

Obsolete Gradle Dependency Warning

A newer version of androidx.test.espresso:espresso-contrib than 3.4.0 is available: 3.6.1
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 @@
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"

Check warning

Code scanning / Android Lint

Obsolete Gradle Dependency Warning

A newer version of com.google.auto.service:auto-service than 1.0-rc4 is available: 1.0-rc6

Check warning

Code scanning / Android Lint

Obsolete Gradle Dependency Warning

A newer version of com.google.auto.service:auto-service than 1.0-rc4 is available: 1.0-rc6

Check warning

Code scanning / Android Lint

Obsolete Gradle Dependency Warning

A newer version of com.google.auto.service:auto-service than 1.0-rc4 is available: 1.0-rc6
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 @@
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'
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"

Check warning

Code scanning / Android Lint

Obsolete Gradle Dependency Warning

A newer version of com.squareup.okhttp3:okhttp than 4.9.0 is available: 4.12.0

Check warning

Code scanning / Android Lint

Obsolete Gradle Dependency Warning

A newer version of com.squareup.okhttp3:okhttp than 4.9.0 is available: 4.12.0

Check warning

Code scanning / Android Lint

Obsolete Gradle Dependency Warning

A newer version of com.squareup.okhttp3:okhttp than 4.9.0 is available: 4.12.0
stripe-terminal = '3.7.1'
tinder-statemachine = '0.2.0'
volley = "1.1.1"

Check warning

Code scanning / Android Lint

Obsolete Gradle Dependency Warning

A newer version of com.android.volley:volley than 1.1.1 is available: 1.2.1

Check warning

Code scanning / Android Lint

Obsolete Gradle Dependency Warning

A newer version of com.android.volley:volley than 1.1.1 is available: 1.2.1

Check warning

Code scanning / Android Lint

Obsolete Gradle Dependency Warning

A newer version of com.android.volley:volley than 1.1.1 is available: 1.2.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-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" }

Check warning

Code scanning / Android Lint

credentials-play-services-auth is Required Warning

In Android 13 or lower, credentials-play-services-auth is required when using androidx.credentials:credentials

Check warning

Code scanning / Android Lint

credentials-play-services-auth is Required Warning

In Android 13 or lower, credentials-play-services-auth is required when using androidx.credentials:credentials

Check warning

Code scanning / Android Lint

credentials-play-services-auth is Required Warning

In Android 13 or lower, credentials-play-services-auth is required when using androidx.credentials: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-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-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-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 @@
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()
}

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