Skip to content

Commit

Permalink
Merge pull request #21353 from wordpress-mobile/post_fluxc_merge_buil…
Browse files Browse the repository at this point in the history
…d_improvements

Post FluxC vendor improvements: remove unused Wiremock files, migrate to local version catalog
  • Loading branch information
wzieba authored Oct 29, 2024
2 parents 8a2723a + cfa1d78 commit bb38297
Show file tree
Hide file tree
Showing 53 changed files with 81 additions and 11,239 deletions.
55 changes: 41 additions & 14 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,28 @@ androidx-cardview = '1.0.0'
androidx-compose-bom = '2024.08.00'
androidx-compose-compiler = '1.5.15'
androidx-compose-material3 = '1.2.1'
androidx-constraintlayout-main = '2.1.4'
androidx-constraintlayout-compose = '1.0.1'
androidx-constraintlayout-main = '2.1.4'
androidx-core = '1.13.1'
androidx-exifinterface = '1.0.0'
androidx-fragment = '1.8.4'
androidx-lifecycle = '2.8.5'
androidx-navigation = '2.7.7'
androidx-paging-runtime = '2.1.2'
androidx-percentlayout = '1.0.0'
androidx-preference = '1.2.1'
androidx-recyclerview = '1.3.2'
androidx-room = '2.6.1'
androidx-security-crypto = '1.0.0'
androidx-swiperefreshlayout = '1.1.0'
androidx-test-core = '1.4.0'
androidx-test-espresso = '3.4.0'
androidx-test-ext = '1.2.1'
androidx-test-main = '1.5.0'
androidx-test-uiautomator = '2.3.0'
androidx-viewpager2 = '1.1.0'
androidx-webkit = '1.12.1'
androidx-work = "2.9.1"
androidx-work = '2.9.1'
apache-commons-text = '1.12.0'
apache-http-client-android = '4.3.5.1'
assertj = '3.26.3'
Expand All @@ -49,11 +54,12 @@ facebook-react = '0.73.3'
facebook-shimmer = '0.5.0'
fastlane-screengrab = '2.1.1'
fladle = '0.17.5'
google-dagger = "2.50"
google-autoservice = '1.0-rc4'
google-dagger = '2.50'
google-exoplayer = '2.13.3'
google-flexboxlayout = '3.0.0'
google-firebase-bom = '33.5.1'
google-firebase-iid = '21.1.0'
google-flexboxlayout = '3.0.0'
google-gson = '2.11.0'
google-material = '1.12.0'
google-mlkit-barcode-scanning-common = '17.0.0'
Expand All @@ -73,19 +79,23 @@ jetty-webapp = '9.4.51.v20230217'
json-path = '2.9.0'
jsoup = '1.18.1'
junit = '4.13.2'
kotlin-compile-testing = '1.5.0'
kotlin-main = '1.9.25'
kotlin-compile-testing = "1.5.0"
kotlinx-coroutines = '1.8.1'
kotlinx-kover = '0.7.6'
ksp = '1.9.25-1.0.20'
mockito-android = '5.14.2'
mockito-kotlin = '4.1.0'
mpandroidchart = 'v3.1.0'
photoview = '2.3.0'
robolectric = '4.11'
sentry = '4.12.0'
squareup-java-poet = '1.7.0'
squareup-kotlin-poet = '1.18.1'
squareup-okhttp3 = '4.9.0'
squareup-retrofit = '2.11.0'
violation-comments = '1.70.0'
wellsql = '2.0.0'
wiremock = '2.26.3'
wordpress-aztec = 'v2.1.4'
wordpress-lint = '2.1.0'
Expand All @@ -96,8 +106,8 @@ yalantis-ucrop = '2.2.9'
zendesk = '5.1.2'

[libraries]
airbnb-lottie-main = { group = "com.airbnb.android", name = "lottie", version.ref = "airbnb-lottie" }
airbnb-lottie-compose = { group = "com.airbnb.android", name = "lottie-compose", version.ref = "airbnb-lottie" }
airbnb-lottie-main = { group = "com.airbnb.android", name = "lottie", version.ref = "airbnb-lottie" }
android-desugar = { group = "com.android.tools", name = "desugar_jdk_libs", version.ref = "android-desugar" }
android-installreferrer = { group = "com.android.installreferrer", name = "installreferrer", version.ref = "android-installreferrer" }
android-security-lint = { group = "com.android.security.lint", name = "lint", version.ref = "android-security-lint" }
Expand All @@ -108,9 +118,13 @@ androidx-annotation = { group = "androidx.annotation", name = "annotation", vers
androidx-appcompat-main = { group = "androidx.appcompat", name = "appcompat", version.ref = "androidx-appcompat" }
androidx-appcompat-resources = { group = "androidx.appcompat", name = "appcompat-resources", version.ref = "androidx-appcompat" }
androidx-arch-core-testing = { group = "androidx.arch.core", name = "core-testing", version.ref = "androidx-arch-core" }
androidx-camera-camera2 = { group = "androidx.camera", name = "camera-camera2", version.ref = "androidx-camera" }
androidx-camera-lifecycle = { group = "androidx.camera", name = "camera-lifecycle", version.ref = "androidx-camera" }
androidx-camera-view = { group = "androidx.camera", name = "camera-view", version.ref = "androidx-camera" }
androidx-cardview = { group = "androidx.cardview", name = "cardview", version.ref = "androidx-cardview" }
androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "androidx-compose-bom" }
androidx-compose-foundation-main = { group = "androidx.compose.foundation", name = "foundation" }
androidx-compose-foundation-layout = { group = "androidx.compose.foundation", name = "foundation-layout" }
androidx-compose-foundation-main = { group = "androidx.compose.foundation", name = "foundation" }
androidx-compose-material = { group = "androidx.compose.material", name = "material" }
androidx-compose-material3 = { group = "androidx.compose.material3", name = "material3", version.ref = "androidx-compose-material3" }
androidx-compose-runtime-livedata = { group = "androidx.compose.runtime", name = "runtime-livedata" }
Expand All @@ -125,12 +139,9 @@ androidx-compose-ui-tooling-preview = { group = "androidx.compose.ui", name = "u
androidx-compose-ui-unit = { group = "androidx.compose.ui", name = "ui-unit" }
androidx-constraintlayout-compose = { group = "androidx.constraintlayout", name = "constraintlayout-compose", version.ref = "androidx-constraintlayout-compose" }
androidx-constraintlayout-main = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "androidx-constraintlayout-main" }
androidx-camera-camera2 = { group = "androidx.camera", name = "camera-camera2", version.ref = "androidx-camera" }
androidx-camera-lifecycle = { group = "androidx.camera", name = "camera-lifecycle", version.ref = "androidx-camera" }
androidx-camera-view = { group = "androidx.camera", name = "camera-view", version.ref = "androidx-camera" }
androidx-cardview = { group = "androidx.cardview", name = "cardview", version.ref = "androidx-cardview" }
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "androidx-core" }
androidx-core-main = { group = "androidx.core", name = "core", version.ref = "androidx-core" }
androidx-exifinterface = { module = "androidx.exifinterface:exifinterface", version.ref = "androidx-exifinterface" }
androidx-fragment-ktx = { group = "androidx.fragment", name = "fragment-ktx", version.ref = "androidx-fragment" }
androidx-fragment-main = { group = "androidx.fragment", name = "fragment", version.ref = "androidx-fragment" }
androidx-lifecycle-common = { group = "androidx.lifecycle", name = "lifecycle-common", version.ref = "androidx-lifecycle" }
Expand All @@ -144,10 +155,16 @@ androidx-lifecycle-viewmodel-savedstate = { group = "androidx.lifecycle", name =
androidx-navigation-compose = { group = "androidx.navigation", name = "navigation-compose", version.ref = "androidx-navigation" }
androidx-navigation-fragment = { group = "androidx.navigation", name = "navigation-fragment", 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-percentlayout = { group = "androidx.percentlayout", name = "percentlayout", version.ref = "androidx-percentlayout" }
androidx-preference = { group = "androidx.preference", name = "preference", version.ref = "androidx-preference" }
androidx-recyclerview = { group = "androidx.recyclerview", name = "recyclerview", version.ref = "androidx-recyclerview" }
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-security-crypto = { module = "androidx.security:security-crypto", version.ref = "androidx-security-crypto" }
androidx-swiperefreshlayout = { group = "androidx.swiperefreshlayout", name = "swiperefreshlayout", version.ref = "androidx-swiperefreshlayout" }
androidx-test-core = { module = "androidx.test:core", version.ref = "androidx-test-core" }
androidx-test-espresso-accessibility = { group = "androidx.test.espresso", name = "espresso-accessibility", version.ref = "androidx-test-espresso" }
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" }
Expand All @@ -165,8 +182,8 @@ assertj-core = { group = "org.assertj", name = "assertj-core", version.ref = "as
automattic-rest = { group = "com.automattic", name = "rest", version.ref = "automattic-rest" }
automattic-tracks-android = { group = "com.automattic", name = "Automattic-Tracks-Android", version.ref = "automattic-tracks" }
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-ksp = { group = "com.github.bumptech.glide", name = "ksp", version.ref = "bumptech-glide" }
bumptech-glide-main = { group = "com.github.bumptech.glide", name = "glide", version.ref = "bumptech-glide" }
bumptech-glide-volley-integration = { group = "com.github.bumptech.glide", name = "volley-integration", version.ref = "bumptech-glide" }
cascade-compose = { group = "me.saket.cascade", name = "cascade-compose", version.ref = "cascade" }
coil-compose = { group = "io.coil-kt", name = "coil-compose", version.ref = "coil" }
Expand All @@ -177,17 +194,20 @@ facebook-react-android-hermes = { group = "com.facebook.react", name = "hermes-a
facebook-react-android-main = { group = "com.facebook.react", name = "react-android", version.ref = "facebook-react" }
facebook-shimmer = { group = "com.facebook.shimmer", name = "shimmer", version.ref = "facebook-shimmer" }
fastlane-screengrab = { group = "tools.fastlane", name = "screengrab", version.ref = "fastlane-screengrab" }
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" }
google-dagger-hilt-compiler = { group = "com.google.dagger", name = "hilt-compiler", version.ref = "google-dagger" }
google-exoplayer = { group = "com.google.android.exoplayer", name = "exoplayer", version.ref = "google-exoplayer" }
google-flexboxlayout = { group = "com.google.android.flexbox", name = "flexbox", version.ref = "google-flexboxlayout" }
google-firebase-bom = { group = "com.google.firebase", name = "firebase-bom", version.ref = "google-firebase-bom" }
google-firebase-iid = { group = "com.google.firebase", name = "firebase-iid", version.ref = "google-firebase-iid" }
google-firebase-messaging = { group = "com.google.firebase", name = "firebase-messaging" }
google-flexboxlayout = { group = "com.google.android.flexbox", name = "flexbox", version.ref = "google-flexboxlayout" }
google-gson = { group = "com.google.code.gson", name = "gson", version.ref = "google-gson" }
google-material = { group = "com.google.android.material", name = "material", version.ref = "google-material" }
google-mlkit-barcode-scanning-common = { group = "com.google.mlkit", name = "barcode-scanning-common", version.ref = "google-mlkit-barcode-scanning-common" }
Expand All @@ -196,8 +216,8 @@ google-mlkit-text-recognition = { group = "com.google.mlkit", name = "text-recog
google-play-app-update = { group = "com.google.android.play", name = "app-update", version.ref = "google-play-app-update" }
google-play-review = { group = "com.google.android.play", name = "review", version.ref = "google-play-review" }
google-play-services-auth = { group = "com.google.android.gms", name = "play-services-auth", version.ref = "google-play-services-auth" }
greenrobot-eventbus-main = { group = "org.greenrobot", name = "eventbus", version.ref = "greenrobot-eventbus" }
greenrobot-eventbus-java = { group = "org.greenrobot", name = "eventbus-java", version.ref = "greenrobot-eventbus" }
greenrobot-eventbus-main = { group = "org.greenrobot", name = "eventbus", version.ref = "greenrobot-eventbus" }
indexos-media-for-mobile-android = { group = "com.github.indexos.media-for-mobile", name = "android", version.ref = "indexos-media-for-mobile" }
indexos-media-for-mobile-domain = { group = "com.github.indexos.media-for-mobile", name = "domain", version.ref = "indexos-media-for-mobile" }
jackson-databind = { group = "com.fasterxml.jackson.core", name = "jackson-databind", version.ref = "jackson-databind" }
Expand All @@ -214,12 +234,19 @@ kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-cor
kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "kotlinx-coroutines" }
ksp-api = { group = "com.google.devtools.ksp", name = "symbol-processing-api", version.ref = "ksp" }
mockito-android = { group = "org.mockito", name = "mockito-android", version.ref = "mockito-android" }
mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito-android" }
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-java-poet = { module = "com.squareup:javapoet", version.ref = "squareup-java-poet" }
squareup-kotlin-poet-ksp = { group = "com.squareup", name = "kotlinpoet-ksp", version.ref = "squareup-kotlin-poet" }
squareup-kotlin-poet-main = { group = "com.squareup", name = "kotlinpoet", version.ref = "squareup-kotlin-poet" }
squareup-okhttp3 = { module = "com.squareup.okhttp3:okhttp", version.ref = "squareup-okhttp3" }
squareup-okhttp3-urlconnection = { module = "com.squareup.okhttp3:okhttp-urlconnection", version.ref = "squareup-okhttp3" }
squareup-retrofit = { group = "com.squareup.retrofit2", name = "retrofit", version.ref = "squareup-retrofit" }
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-lint = { group = "org.wordpress", name = "lint", version.ref = "wordpress-lint" }
wordpress-persistent-edittext = { group = "org.wordpress", name = "persistentedittext", version.ref = "wordpress-persistent-edittext" }
Expand Down
6 changes: 3 additions & 3 deletions libs/fluxc-processor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ java {

dependencies {
implementation project(':libs:fluxc-annotations')
implementation sharedLibs.google.autoService
annotationProcessor sharedLibs.google.autoService
implementation sharedLibs.squareup.javapoet
implementation libs.google.autoservice
annotationProcessor libs.google.autoservice
implementation libs.squareup.java.poet
}
76 changes: 37 additions & 39 deletions libs/fluxc/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
alias(sharedLibs.plugins.android.library)
alias(sharedLibs.plugins.kotlin.android)
alias(sharedLibs.plugins.kotlin.parcelize)
alias(sharedLibs.plugins.kotlin.kapt)
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.parcelize)
alias(libs.plugins.kapt)
alias(libs.plugins.kotlinx.kover)
}

Expand Down Expand Up @@ -71,70 +71,68 @@ android.buildTypes.all { buildType ->
}

dependencies {
implementation sharedLibs.androidx.exifinterface
implementation sharedLibs.androidx.security.crypto
implementation libs.androidx.exifinterface
implementation libs.androidx.security.crypto

implementation(sharedLibs.wordpress.utils) {
implementation(libs.wordpress.utils) {
// Using official volley package
exclude group: "com.mcxiaoke.volley"
exclude group: "com.android.support"
}

// Custom WellSql version
api sharedLibs.wellsql
kapt sharedLibs.wellsql.processor
api libs.wellsql
kapt libs.wellsql.processor

// FluxC annotations
api project(":libs:fluxc-annotations")
kapt project(":libs:fluxc-processor")

// External libs
api sharedLibs.eventbus.android
api sharedLibs.eventbus.java
api sharedLibs.squareup.okhttp3
implementation sharedLibs.squareup.okhttp3.urlconnection
api sharedLibs.volley
implementation sharedLibs.google.gson

implementation sharedLibs.apache.commons.text
api sharedLibs.androidx.paging.runtime
implementation sharedLibs.androidx.room.runtime
kapt sharedLibs.androidx.room.compiler
implementation sharedLibs.androidx.room.ktx
api libs.greenrobot.eventbus.main
api libs.greenrobot.eventbus.java
api libs.squareup.okhttp3
implementation libs.squareup.okhttp3.urlconnection
api libs.android.volley
implementation libs.google.gson

implementation libs.apache.commons.text
api libs.androidx.paging.runtime
implementation libs.androidx.room.runtime
kapt libs.androidx.room.compiler
implementation libs.androidx.room.ktx

// Dagger
implementation sharedLibs.google.dagger
kapt sharedLibs.google.dagger.compiler
compileOnly sharedLibs.glassfish.javax.annotation
implementation libs.google.dagger
kapt libs.google.dagger.compiler

// Coroutines
implementation sharedLibs.kotlinx.coroutines.core
implementation sharedLibs.kotlinx.coroutines.android
implementation libs.kotlinx.coroutines.core
implementation libs.kotlinx.coroutines.android

// Encrypted Logging
api "com.goterl:lazysodium-android:5.0.2@aar"
api "net.java.dev.jna:jna:5.15.0@aar"

// Unit tests
testImplementation sharedLibs.junit
testImplementation sharedLibs.kotlin.test.junit
testImplementation sharedLibs.kotlinx.coroutines.test
testImplementation sharedLibs.androidx.test.core
testImplementation sharedLibs.robolectric
testImplementation sharedLibs.mockito.core
testImplementation sharedLibs.mockito.kotlin
testImplementation sharedLibs.mockito.inline
testImplementation sharedLibs.assertj.core
testImplementation sharedLibs.androidx.arch.core.testing

lintChecks sharedLibs.wordpress.lint
testImplementation libs.junit
testImplementation libs.kotlin.test.junit
testImplementation libs.kotlinx.coroutines.test
testImplementation libs.androidx.test.core
testImplementation libs.robolectric
testImplementation libs.mockito.core
testImplementation libs.mockito.kotlin
testImplementation libs.assertj.core
testImplementation libs.androidx.arch.core.testing

lintChecks libs.wordpress.lint
}

dependencyAnalysis {
issues {
onUnusedDependencies {
// This dependency is actually needed otherwise the app will crash with a runtime exception.
exclude(sharedLibs.eventbus.android.get().module.toString())
exclude(libs.greenrobot.eventbus.main.get().module.toString())
}
}
}
2 changes: 0 additions & 2 deletions libs/fluxc/gradle.properties-example
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
fluxc.ENABLE_WPAPI = false
wp.ENABLE_DATABASE_DOWNGRADE = true
android.useAndroidX=true
android.enableJetifier=true

This file was deleted.

Loading

0 comments on commit bb38297

Please sign in to comment.