Skip to content

Commit bc699f8

Browse files
authored
Merge pull request #13304 from woocommerce/adjust_fluxc_login_vendor
Use vendored `fluxc` and `login`
2 parents a456713 + 5195fd8 commit bc699f8

File tree

40 files changed

+344
-661
lines changed

40 files changed

+344
-661
lines changed

WooCommerce-Wear/build.gradle

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,8 @@ android {
124124
dependencies {
125125
// Project
126126
implementation project(":libs:commons")
127-
implementation("${gradle.ext.fluxCBinaryPath}:${libs.versions.wordpress.fluxc.get()}") {
128-
exclude group: "com.android.support"
129-
exclude group: "org.wordpress", module: "utils"
130-
}
131-
implementation("${gradle.ext.fluxCWooCommercePluginBinaryPath}:${libs.versions.wordpress.fluxc.get()}") {
132-
exclude group: "com.android.support"
133-
exclude group: "org.wordpress", module: "utils"
134-
}
127+
implementation(project(":libs:fluxc"))
128+
implementation(project(":libs:fluxc-plugin"))
135129
implementation(libs.wordpress.utils) {
136130
exclude group: "com.mcxiaoke.volley"
137131
exclude group: "com.android.support"

WooCommerce/build.gradle

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -245,19 +245,9 @@ dependencies {
245245
implementation(libs.automattic.tracks.android)
246246
implementation(libs.automattic.tracks.crashlogging)
247247

248-
implementation("${gradle.ext.fluxCBinaryPath}:${libs.versions.wordpress.fluxc.get()}") {
249-
exclude group: "com.android.support"
250-
exclude group: "org.wordpress", module: "utils"
251-
}
252-
implementation("${gradle.ext.fluxCWooCommercePluginBinaryPath}:${libs.versions.wordpress.fluxc.get()}") {
253-
exclude group: "com.android.support"
254-
exclude group: "org.wordpress", module: "utils"
255-
}
256-
257-
implementation("$gradle.ext.loginFlowBinaryPath:${libs.versions.wordpress.login.get()}") {
258-
exclude group: "org.wordpress", module: "utils"
259-
exclude group: "org.wordpress", module: "fluxc"
260-
}
248+
implementation(project(":libs:fluxc"))
249+
implementation(project(":libs:fluxc-plugin"))
250+
implementation(project(":libs:login"))
261251

262252
implementation(libs.wordpress.aztec.main) {
263253
exclude group: "com.android.volley"

build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ plugins {
1212
alias(libs.plugins.kotlin.android) apply false
1313
alias(libs.plugins.kotlin.compose).apply(false)
1414
alias(libs.plugins.kotlin.parcelize) apply false
15+
alias(libs.plugins.kotlin.kapt) apply false
1516
alias(libs.plugins.google.dagger.hilt) apply false
1617
alias(libs.plugins.androidx.navigation.safeargs) apply false
1718
alias(libs.plugins.google.services) apply false
1819
alias(libs.plugins.ksp) apply false
20+
alias(libs.plugins.room) apply false
1921
}
2022

2123
ext {

config/detekt/detekt.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ complexity:
1515
formatting:
1616
active: true
1717
autoCorrect: true
18+
excludes: ['**/fluxc/**', '**/login/**']
1819
Indentation:
1920
active: true
2021
autoCorrect: true
@@ -27,6 +28,8 @@ style:
2728
active: true
2829
ignoreAnnotated: [ 'Module' ]
2930
MagicNumber:
31+
ignoreEnums: true
32+
ignorePropertyDeclaration: true
3033
ignoreAnnotated: [ 'Composable' ]
3134
UnusedPrivateMember:
3235
ignoreAnnotated: [ 'Preview', 'LightDarkThemePreviews', 'OrientationPreviews', 'FontScalePreviews', 'LayoutDirectionPreviews' ]

config/gradle/include_builds.gradle

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,6 @@ if (localBuilds.exists()) {
1212
https://docs.gradle.org/current/javadoc/org/gradle/api/initialization/ConfigurableIncludedBuild.html#dependencySubstitution-org.gradle.api.Action-
1313
*/
1414

15-
if (ext.has("localFluxCPath")) {
16-
includeBuild(ext.localFluxCPath) {
17-
dependencySubstitution {
18-
println "Substituting fluxc with the local build"
19-
substitute module(gradle.ext.fluxCBinaryPath) using project(':fluxc')
20-
substitute module(gradle.ext.fluxCWooCommercePluginBinaryPath) using project(':plugins:woocommerce')
21-
}
22-
}
23-
}
24-
25-
if (ext.has("localLoginFlowPath")) {
26-
includeBuild(ext.localLoginFlowPath) {
27-
dependencySubstitution {
28-
println "Substituting login-flow with the local build"
29-
substitute module("$gradle.ext.loginFlowBinaryPath") using project(':WordPressLoginFlow')
30-
}
31-
}
32-
}
33-
3415
if (ext.has("localMediaPickerPath")) {
3516
includeBuild(ext.localMediaPickerPath) {
3617
dependencySubstitution {

config/gradle/jacoco.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ rootProject.afterEvaluate {
1212
':WooCommerce:testJalapenoDebugUnitTest',
1313
':libs:cardreader:testDebugUnitTest',
1414
':WooCommerce-Wear:testJalapenoDebugUnitTest',
15+
':libs:fluxc:testDebugUnitTest',
16+
':libs:fluxc-plugin:testDebugUnitTest',
17+
':libs:fluxc-tests:testDebugUnitTest',
18+
':libs:login:testDebugUnitTest',
1519
)
1620

1721
group = "Reporting"
@@ -90,10 +94,6 @@ rootProject.afterEvaluate {
9094
sourceDirectories.setFrom(files([sources]))
9195
classDirectories.from = files([kotlinClasses])
9296

93-
executionData.from = files([
94-
"WooCommerce/build/outputs/unit_test_code_coverage/jalapenoDebugUnitTest/testJalapenoDebugUnitTest.exec",
95-
"libs/cardreader/build/outputs/unit_test_code_coverage/debugUnitTest/testDebugUnitTest.exec",
96-
"WooCommerce-Wear/build/outputs/unit_test_code_coverage/jalapenoDebugUnitTest/testJalapenoDebugUnitTest.exec",
97-
])
97+
executionData fileTree(project.rootDir.absolutePath).include("**/build/**/*.exec")
9898
}
9999
}

gradle/libs.versions.toml

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ agp = '8.5.1'
33
android-billingclient = '5.0.0'
44
android-desugar = '2.1.3'
55
android-security-lint = '1.0.1'
6-
androidx-appcompat = '1.4.2'
6+
androidx-appcompat = '1.6.1'
77
androidx-arch-core = '2.1.0'
88
androidx-browser = '1.5.0'
99
androidx-camera = '1.2.3'
@@ -13,15 +13,19 @@ androidx-constraintlayout-compose = '1.0.1'
1313
androidx-constraintlayout-main = '2.1.4'
1414
androidx-core-main = '1.13.1'
1515
androidx-core-splashscreen = '1.0.1'
16+
androidx-credentials = '1.2.0'
1617
androidx-datastore = '1.0.0' # Higher versions of the DataStore library are presenting crashes, refer to peaMlT-XN before upgrading it.
18+
androidx-exifinterface = "1.0.0"
1719
androidx-fragment = '1.8.5'
1820
androidx-hilt = '1.2.0'
1921
androidx-lifecycle = '2.8.7'
2022
androidx-navigation = '2.7.7'
23+
androidx-paging-runtime = "2.1.2"
2124
androidx-preference = '1.2.1'
2225
androidx-recyclerview-main = '1.3.2'
2326
androidx-recyclerview-selection = '1.1.0'
2427
androidx-room = "2.6.1"
28+
androidx-security-crypto = "1.0.0"
2529
androidx-test-espresso = '3.4.0'
2630
androidx-test-ext = '1.1.5'
2731
androidx-test-main = '1.4.0'
@@ -44,11 +48,14 @@ coil = '2.1.0'
4448
commons-fileupload = '1.5'
4549
dependency-analysis = '1.28.0'
4650
detekt = '1.23.5'
51+
eventbus = "3.3.1"
4752
facebook-flipper = '0.176.1'
4853
facebook-shimmer = '0.5.0'
4954
facebook-soloader = '0.10.4'
5055
fastlane-screengrab = '2.1.1'
5156
fladle = '0.17.5'
57+
glassfish-javax-annotation = "10.0-b28"
58+
google-autoService = "1.0-rc4"
5259
google-dagger = "2.55"
5360
google-firebase-bom = '32.7.1'
5461
google-gson = '2.10.1'
@@ -70,24 +77,31 @@ gravatar = '0.2.0'
7077
jackson-databind = '2.12.7.1'
7178
java = '11'
7279
jetty-webapp = '9.4.51.v20230217'
80+
jna = '5.5.0@aar'
7381
json-path = '2.9.0'
7482
junit = '4.13.2'
7583
lottie = '5.2.0'
7684
kotlin = '2.1.10'
7785
kotlinx-coroutines = '1.8.1'
7886
ksp = '2.0.21-1.0.27'
7987
mockito-kotlin = '5.4.0'
88+
mockito = '4.6.1'
8089
mpandroidchart = 'v3.1.0'
8190
photoview = '2.3.0'
91+
robolectric = "4.11"
8292
sentry = '4.10.0'
93+
squareup-javapoet = "1.7.0"
8394
squareup-leakcanary = '2.14'
95+
squareup-okhttp3 = "4.9.0"
8496
stripe-terminal = '3.7.1'
97+
terl-lazysodium-android = '5.0.2@aar'
8598
tinder-statemachine = '0.2.0'
99+
volley = "1.1.1"
100+
wellsql = "2.0.0"
86101
wiremock = '2.26.3'
87102
wordpress-aztec = 'v2.1.4'
88-
wordpress-fluxc = '2.103.0'
89-
wordpress-login = '1.21.0'
90103
wordpress-libaddressinput = '0.0.2'
104+
wordpress-lint = "2.1.0"
91105
wordpress-mediapicker = 'trunk-d6daa7a662b48d9cd9af5d18d2258d39b0a44901'
92106
wordpress-utils = '3.15.0'
93107
zendesk = '5.0.8'
@@ -119,8 +133,11 @@ androidx-constraintlayout-compose = { group = "androidx.constraintlayout", name
119133
androidx-constraintlayout-main = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "androidx-constraintlayout-main" }
120134
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "androidx-core-main" }
121135
androidx-core-splashscreen = { group = "androidx.core", name = "core-splashscreen", version.ref = "androidx-core-splashscreen" }
136+
androidx-credentials-main = { module = "androidx.credentials:credentials", version.ref = "androidx-credentials" }
137+
androidx-credentials-play-service-auth = { module = "androidx.credentials:credentials-play-services-auth", version.ref = "androidx-credentials" }
122138
androidx-datastore-main = { group = "androidx.datastore", name = "datastore", version.ref = "androidx-datastore" }
123139
androidx-datastore-preferences = { group = "androidx.datastore", name = "datastore-preferences", version.ref = "androidx-datastore" }
140+
androidx-exifinterface = { module = "androidx.exifinterface:exifinterface", version.ref = "androidx-exifinterface" }
124141
androidx-fragment-ktx = { group = "androidx.fragment", name = "fragment-ktx", version.ref = "androidx-fragment" }
125142
androidx-hilt-common = { group = "androidx.hilt", name = "hilt-common", version.ref = "androidx-hilt" }
126143
androidx-hilt-compiler = { group = "androidx.hilt", name = "hilt-compiler", version.ref = "androidx-hilt" }
@@ -137,13 +154,16 @@ androidx-navigation-compose = { group = "androidx.navigation", name = "navigatio
137154
androidx-navigation-fragment = { group = "androidx.navigation", name = "navigation-fragment", version.ref = "androidx-navigation" }
138155
androidx-navigation-runtime = { group = "androidx.navigation", name = "navigation-runtime", version.ref = "androidx-navigation" }
139156
androidx-navigation-ui = { group = "androidx.navigation", name = "navigation-ui", version.ref = "androidx-navigation" }
157+
androidx-paging-runtime = { module = "androidx.paging:paging-runtime", version.ref = "androidx-paging-runtime" }
140158
androidx-preference-main = { group = "androidx.preference", name = "preference", version.ref = "androidx-preference" }
141159
androidx-preference-ktx = { group = "androidx.preference", name = "preference-ktx", version.ref = "androidx-preference" }
142160
androidx-recyclerview-main = { group = "androidx.recyclerview", name = "recyclerview", version.ref = "androidx-recyclerview-main" }
143161
androidx-recyclerview-selection = { group = "androidx.recyclerview", name = "recyclerview-selection", version.ref = "androidx-recyclerview-selection" }
144162
androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "androidx-room" }
145163
androidx-room-ktx = { module = "androidx.room:room-ktx", version.ref = "androidx-room" }
146164
androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "androidx-room" }
165+
androidx-room-testing = { module = "androidx.room:room-testing", version.ref = "androidx-room" }
166+
androidx-security-crypto = { module = "androidx.security:security-crypto", version.ref = "androidx-security-crypto" }
147167
androidx-test-espresso-contrib = { group = "androidx.test.espresso", name = "espresso-contrib", version.ref = "androidx-test-espresso" }
148168
androidx-test-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "androidx-test-espresso" }
149169
androidx-test-ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "androidx-test-ext" }
@@ -168,20 +188,27 @@ automattic-tracks-experimentation = { group = "com.automattic.tracks", name = "e
168188
automattic-tracks-crashlogging = { group = "com.automattic.tracks", name = "crashlogging", version.ref = "automattic-tracks" }
169189
bumptech-glide-main = { group = "com.github.bumptech.glide", name = "glide", version.ref = "bumptech-glide" }
170190
bumptech-glide-compiler = { group = "com.github.bumptech.glide", name = "compiler", version.ref = "bumptech-glide" }
191+
bumptech-glide-ksp = { group = "com.github.bumptech.glide", name = "ksp", version.ref = "bumptech-glide" }
171192
bumptech-glide-volley-integration = { group = "com.github.bumptech.glide", name = "volley-integration", version.ref = "bumptech-glide" }
172193
bumptech-glide-avif-integration = { group = "com.github.bumptech.glide", name = "avif-integration", version.ref = "bumptech-glide" }
173194
cashapp-turbine = { group = "app.cash.turbine", name = "turbine", version.ref = "cashapp-turbine" }
174195
coil-compose = { group = "io.coil-kt", name = "coil-compose", version.ref = "coil" }
175196
coil-svg = { group = "io.coil-kt", name = "coil-svg", version.ref = "coil" }
176197
commons-fileupload = { group = "commons-fileupload", name = "commons-fileupload", version.ref = "commons-fileupload" }
177198
detekt-formatting = { group = "io.gitlab.arturbosch.detekt", name = "detekt-formatting", version.ref = "detekt" }
199+
eventbus-android = { module = "org.greenrobot:eventbus", version.ref = "eventbus" }
200+
eventbus-java = {group = "org.greenrobot", name = "eventbus-java", version.ref = "eventbus" }
178201
facebook-flipper-main = { group = "com.facebook.flipper", name = "flipper", version.ref = "facebook-flipper" }
179202
facebook-flipper-network-plugin = { group = "com.facebook.flipper", name = "flipper-network-plugin", version.ref = "facebook-flipper" }
180203
facebook-shimmer = { group = "com.facebook.shimmer", name = "shimmer", version.ref = "facebook-shimmer" }
181204
facebook-soloader = { group = "com.facebook.soloader", name = "soloader", version.ref = "facebook-soloader" }
182205
fastlane-screengrab = { group = "tools.fastlane", name = "screengrab", version.ref = "fastlane-screengrab" }
206+
glassfish-javax-annotation = { module = "org.glassfish:javax.annotation", version.ref = "glassfish-javax-annotation" }
207+
google-autoService = { module = "com.google.auto.service:auto-service", version.ref = "google-autoService" }
208+
google-dagger = { module = "com.google.dagger:dagger", version.ref = "google-dagger" }
183209
google-dagger-android-processor = { group = "com.google.dagger", name = "dagger-android-processor", version.ref = "google-dagger" }
184210
google-dagger-android-support = { group = "com.google.dagger", name = "dagger-android-support", version.ref = "google-dagger" }
211+
google-dagger-compiler = { module = "com.google.dagger:dagger-compiler", version.ref = "google-dagger" }
185212
google-dagger-hilt-android-compiler = { group = "com.google.dagger", name = "hilt-android-compiler", version.ref = "google-dagger" }
186213
google-dagger-hilt-android-main = { group = "com.google.dagger", name = "hilt-android", version.ref = "google-dagger" }
187214
google-dagger-hilt-android-testing = { group = "com.google.dagger", name = "hilt-android-testing", version.ref = "google-dagger" }
@@ -212,6 +239,7 @@ google-zxing-core = { group = "com.google.zxing", name = "core", version.ref = "
212239
gravatar = { group = "com.gravatar", name = "gravatar", version.ref = "gravatar" }
213240
jackson-databind = { group = "com.fasterxml.jackson.core", name = "jackson-databind", version.ref = "jackson-databind" }
214241
jetty-webapp = { group = "org.eclipse.jetty", name = "jetty-webapp", version.ref = "jetty-webapp" }
242+
jna = { module = "net.java.dev.jna:jna", version.ref = "jna" }
215243
json-path = { group = "com.jayway.jsonpath", name = "json-path", version.ref = "json-path" }
216244
junit = { group = "junit", name = "junit", version.ref = "junit" }
217245
lottie-compose = { group = "com.airbnb.android", name = "lottie-compose", version.ref = "lottie" }
@@ -223,12 +251,21 @@ kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-cor
223251
mockito-kotlin = { group = "org.mockito.kotlin", name = "mockito-kotlin", version.ref = "mockito-kotlin" }
224252
mpandroidchart = { group = "com.github.PhilJay", name = "MPAndroidChart", version.ref = "mpandroidchart" }
225253
photoview = { group = "com.github.chrisbanes", name = "PhotoView", version.ref = "photoview" }
254+
robolectric = { module = "org.robolectric:robolectric", version.ref = "robolectric" }
255+
squareup-javapoet = { module = "com.squareup:javapoet", version.ref = "squareup-javapoet" }
226256
squareup-leakcanary-android = { group = "com.squareup.leakcanary", name = "leakcanary-android", version.ref = "squareup-leakcanary" }
257+
squareup-okhttp3 = { module = "com.squareup.okhttp3:okhttp", version.ref = "squareup-okhttp3" }
258+
squareup-okhttp3-urlconnection = { module = "com.squareup.okhttp3:okhttp-urlconnection", version.ref = "squareup-okhttp3" }
227259
stripe-terminal-localmobile = { group = "com.stripe", name = "stripeterminal-localmobile", version.ref = "stripe-terminal" }
228260
stripe-terminal-core = { group = "com.stripe", name = "stripeterminal-core", version.ref = "stripe-terminal" }
261+
terl-lazysodium-android = { module = "com.goterl:lazysodium-android", version.ref = "terl-lazysodium-android" }
229262
tinder-statemachine = { group = "com.tinder.statemachine", name = "statemachine", version.ref = "tinder-statemachine" }
263+
volley = { module = "com.android.volley:volley", version.ref = "volley" }
264+
wellsql = { module = "org.wordpress:wellsql", version.ref = "wellsql" }
265+
wellsql-processor = { module = "org.wordpress.wellsql:wellsql-processor", version.ref = "wellsql" }
230266
wiremock = { group = "com.github.tomakehurst", name = "wiremock", version.ref = "wiremock" }
231267
wordpress-libaddressinput-common = { group = "org.wordpress", name = "libaddressinput.common", version.ref = "wordpress-libaddressinput" }
268+
wordpress-lint = { module = "org.wordpress:lint", version.ref = "wordpress-lint" }
232269
wordpress-aztec-main = { group = "org.wordpress", name = "aztec", version.ref = "wordpress-aztec" }
233270
wordpress-aztec-glide-loader = { group = "org.wordpress.aztec", name = "glide-loader", version.ref = "wordpress-aztec" }
234271
wordpress-utils = { group = "org.wordpress", name = "utils", version.ref = "wordpress-utils" }
@@ -249,5 +286,7 @@ google-services = { id = "com.google.gms.google-services", version.ref = "google
249286
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
250287
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
251288
kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
289+
kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
252290
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
253291
sentry = { id = "io.sentry.android.gradle", version.ref = "sentry" }
292+
room = { id = "androidx.room", version.ref = "androidx-room" }

libs/apifaker/build.gradle

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,7 @@ dependencies {
4040
implementation(libs.androidx.compose.material.icons.extended)
4141
debugImplementation(libs.androidx.compose.ui.tooling.main)
4242

43-
implementation("${gradle.ext.fluxCBinaryPath}:${libs.versions.wordpress.fluxc.get()}") {
44-
exclude group: "com.android.support"
45-
exclude group: "org.wordpress", module: "utils"
46-
}
43+
implementation(project(":libs:fluxc"))
4744

4845
implementation(libs.androidx.room.runtime)
4946
implementation(libs.androidx.room.ktx)
Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,8 @@
11
plugins {
22
id "java"
3-
alias(sharedLibs.plugins.automattic.publishToS3)
43
}
54

65
java {
7-
sourceCompatibility = JavaVersion.VERSION_1_8
8-
targetCompatibility = JavaVersion.VERSION_1_8
9-
10-
withSourcesJar()
11-
withJavadocJar()
12-
}
13-
14-
project.afterEvaluate {
15-
publishing {
16-
publications {
17-
FluxCAnnotationsPublication(MavenPublication) {
18-
from components.java
19-
20-
groupId "org.wordpress.fluxc"
21-
artifactId "fluxc-annotations"
22-
// version is set by 'publish-to-s3' plugin
23-
}
24-
}
25-
}
6+
sourceCompatibility libs.versions.java.get()
7+
targetCompatibility libs.versions.java.get()
268
}

0 commit comments

Comments
 (0)