diff --git a/gradle/depend.gradle b/gradle/depend.gradle index be193c498..54017e5ac 100644 --- a/gradle/depend.gradle +++ b/gradle/depend.gradle @@ -4,6 +4,8 @@ ext { ghp_registry_name = 'GitHubPackages' ghp_registry_name_third = 'GitHubPackages-Third' urbiGroupId = 'co.urbi.android' + urbiGroupTelepassId = 'co.urbi.telepass' + urbiGroupThirdId = 'co.urbi.third' telepassGroupId = 'com.telepass.urbi' urbi_ghp_registry_url = 'https://maven.pkg.github.com/urbi-mobility/android-urbi-framework' telepass_ghp_registry_url = 'https://maven.pkg.github.com/wise-emotions/android-urbi-unica-framework' @@ -40,35 +42,41 @@ ext { telepassLibId = 'telepasslib' //---Module Version---// - utilityVersion = '2.8.16-j17' - designsystemVersion = '1.4.22-j17' - modelVersion = '2.13.28-j17' - coreVersion = '2.16.29-j17' - payVersion = '1.13.29-j17' - ticketVersion = '0.10.3-j17' - searchVersion = '1.1.6-j17' - taxiVersion = '1.1.29-j17' - scanVersion = '1.3.10-j17' - transpoVersion = '1.9.32-j17' - evchargingVersion = '1.8.8-j17' - tripoVersion = '1.8.36-j17-hotfix' - mobilitySharingVersion = '2.17.36-j17' - commonStateVersion = '0.2.30-j17' - commonViewVersion = '0.3.34-j17' - composeNavigationVersion = '0.3.5-j17' - composeDsVersion = '0.3.28-j17' - historyVersion = '0.3.0' - mapVersion = '0.3.2' - profileVersion = '0.3.1' - shopVersion = '0.3.0' - loginVersion = '0.3.11-j17' + utilityVersion = '2.9.6' + designsystemVersion = '1.5.7' + modelVersion = '2.14.12' + coreVersion = '2.17.10' + payVersion = '1.14.5' + ticketVersion = '0.11.2' + searchVersion = '1.2.3' + taxiVersion = '1.2.5' + scanVersion = '1.4.3' + transpoVersion = '1.10.9' + evchargingVersion = '1.9.6' + tripoVersion = '1.9.11' + mobilitySharingVersion = '2.18.11' + commonStateVersion = '0.3.8' + commonViewVersion = '0.4.8' + composeNavigationVersion = '0.5.1' + composeDsVersion = '0.4.4' + historyVersion = '0.4.0' + mapVersion = '0.4.0' + profileVersion = '0.4.0' + shopVersion = '0.4.0' + loginVersion = '0.4.3' telepassModelVersion = '2.7.0' telepassNetworkVersion = '2.10.0' telepassLibCode = '7' telepassLibVersion = '2.13.' + telepassLibCode //---End---// - atacVersion = '2.1.8' + atacVersion = '2.2.2' + urbiBomId = 'bom' + urbiBomTelepassId = 'bomtelepass' + urbiBomThirdId = 'bomthird' + urbiBomVersion = '2025.07.08' + urbiTelepassBomVersion = "$urbiBomVersion" + urbiThirdBomVersion = "$urbiBomVersion" // Android android_version_array = ["utility", utilityVersion, "designsystem", designsystemVersion, "modelVersion", modelVersion, "coreVersion", coreVersion, "pay", payVersion, "ticket", ticketVersion, "search", searchVersion, "taxi", taxiVersion, "taxi", taxiVersion, "scan", scanVersion, "transpo", transpoVersion, "evcharging", evchargingVersion, "tripo", tripoVersion, "mobilitySharing", mobilitySharingVersion, "commonState", commonStateVersion, "commonView", commonViewVersion, @@ -82,19 +90,33 @@ ext { atac = "$urbiGroupId:$atacId:$atacVersion@aar" // URBI - designsystemdep = "$urbiGroupId:$designsystemId:$designsystemVersion" - designsystemdep_third = "$urbiGroupId:$designsystemId$suffixArtifactId:$designsystemVersion" - utilitylibdep = "$urbiGroupId:$utilityId:$utilityVersion" - utilitylibdep_third = "$urbiGroupId:$utilityId$suffixArtifactId:$utilityVersion" - urbimodeldep = "$urbiGroupId:$modelId:$modelVersion" - urbimodeldep_third = "$urbiGroupId:$modelId$suffixArtifactId:$modelVersion" - composenavigationdep = "$urbiGroupId:$composeNavigationId:$composeNavigationVersion" - composenavigationdep_third = "$urbiGroupId:$composeNavigationId$suffixArtifactId:$composeNavigationVersion" + urbi_bom = "$urbiGroupId:$urbiBomId:$urbiBomVersion" + urbi_bom_telepass = "$urbiGroupTelepassId:$urbiBomTelepassId:$urbiBomVersion" + urbi_bom_third = "$urbiGroupThirdId:$urbiBomThirdId:$urbiBomVersion" + + designsystem = "$urbiGroupId:$designsystemId" + designsystem_third = "$urbiGroupId:$designsystemId$suffixArtifactId" + designsystemdep = "$designsystem:$designsystemVersion" + designsystemdep_third = "$designsystem_third:$designsystemVersion" + utility = "$urbiGroupId:$utilityId" + utility_third = "$urbiGroupId:$utilityId$suffixArtifactId" + utilitylibdep = "$utility:$utilityVersion" + utilitylibdep_third = "$utility_third:$utilityVersion" + model_dep = "$urbiGroupId:$modelId" //non possiamo usare "model" perchè Gradle da errore al sync + model_dep_third = "$urbiGroupId:$modelId$suffixArtifactId" + urbimodeldep = "$model_dep:$modelVersion" + urbimodeldep_third = "$model_dep_third:$modelVersion" urbimodeldep_exclude = dependencies.create(urbimodeldep, { exclude module: "$utilityId" }) - urbicoredep = "$urbiGroupId:$coreId:$coreVersion" - urbicoredep_third = "$urbiGroupId:$coreId$suffixArtifactId:$coreVersion" + composenavigation = "$urbiGroupId:$composeNavigationId" + composenavigation_third = "$urbiGroupId:$composeNavigationId$suffixArtifactId" + composenavigationdep = "$composenavigation:$composeNavigationVersion" + composenavigationdep_third = "$composenavigation_third:$composeNavigationVersion" + core = "$urbiGroupId:$coreId" + core_third = "$urbiGroupId:$coreId$suffixArtifactId" + urbicoredep = "$core:$coreVersion" + urbicoredep_third = "$core_third:$coreVersion" urbicoredep_exclude = dependencies.create(urbicoredep, { exclude group: 'com.android.support' exclude group: 'com.google.dagger' @@ -102,8 +124,10 @@ ext { exclude module: "$modelId" exclude module: "$utilityId" }) - ticketlibdep = "$urbiGroupId:$ticketId:$ticketVersion" - ticketlibdep_third = "$urbiGroupId:$ticketId$suffixArtifactId:$ticketVersion" + ticket = "$urbiGroupId:$ticketId" + ticket_third = "$urbiGroupId:$ticketId$suffixArtifactId" + ticketlibdep = "$ticket:$ticketVersion" + ticketlibdep_third = "$ticket_third:$ticketVersion" ticketlibdep_exclude = dependencies.create(ticketlibdep, { exclude group: 'com.google.dagger:dagger' exclude module: "$coreId" @@ -111,8 +135,10 @@ ext { exclude module: "$utilityId" exclude module: "$designsystemId" }) - urbipaydep = "$urbiGroupId:$payId:$payVersion" - urbipaydep_third = "$urbiGroupId:$payId$suffixArtifactId:$payVersion" + pay = "$urbiGroupId:$payId" + pay_third = "$urbiGroupId:$payId$suffixArtifactId" + urbipaydep = "$pay:$payVersion" + urbipaydep_third = "$pay_third:$payVersion" urbipaydep_exclude = dependencies.create(urbipaydep, { exclude group: 'com.google.dagger:dagger' exclude module: "$coreId" @@ -120,7 +146,8 @@ ext { exclude module: "$utilityId" exclude module: "$designsystemId" }) - transpodep = "$urbiGroupId:$transpoId:$transpoVersion" + transpo = "$urbiGroupId:$transpoId" + transpodep = "$transpo:$transpoVersion" transpodep_exclude = dependencies.create(transpodep, { exclude group: 'com.google.dagger:dagger' exclude module: "$coreId" @@ -131,8 +158,10 @@ ext { exclude module: "$composeDsId" exclude module: "$commonStateId" }) - tripodep = "$urbiGroupId:$tripoId:$tripoVersion" - tripodep_third = "$urbiGroupId:$tripoId$suffixArtifactId:$tripoVersion" + tripo = "$urbiGroupId:$tripoId" + tripo_third = "$urbiGroupId:$tripoId$suffixArtifactId" + tripodep = "$tripo:$tripoVersion" + tripodep_third = "$tripo_third:$tripoVersion" tripodep_exclude = dependencies.create(tripodep, { exclude group: 'com.google.dagger:dagger' exclude module: "$coreId" @@ -144,21 +173,25 @@ ext { exclude module: "$composeDsId" exclude module: "$commonStateId" }) - urbisearchdep = "$urbiGroupId:$searchId:$searchVersion" + search = "$urbiGroupId:$searchId" + urbisearchdep = "$search:$searchVersion" urbisearchdep_exclude = dependencies.create(urbisearchdep, { exclude module: "$coreId" exclude module: "$modelId" exclude module: "$utilityId" exclude module: "$designsystemId" }) - urbiscandep = "$urbiGroupId:$scanId:$scanVersion" - urbiscandep_third = "$urbiGroupId:$scanId$suffixArtifactId:$scanVersion" + scan = "$urbiGroupId:$scanId" + scan_third = "$urbiGroupId:$scanId$suffixArtifactId" + urbiscandep = "$scan:$scanVersion" + urbiscandep_third = "$scan_third:$scanVersion" urbiscandep_exclude = dependencies.create(urbiscandep, { exclude module: "$designsystemId" exclude module: "$utilityId" }) - urbitaxidep = "$urbiGroupId:$taxiId:$taxiVersion" + taxi = "$urbiGroupId:$taxiId" + urbitaxidep = "$taxi:$taxiVersion" urbitaxidep_exclude = dependencies.create(urbitaxidep, { exclude module: "$searchId" exclude module: "$coreId" @@ -167,7 +200,8 @@ ext { exclude module: "$designsystemId" }) - evchargingdep = "$urbiGroupId:$evchargingId:$evchargingVersion" + evcharging = "$urbiGroupId:$evchargingId" + evchargingdep = "$evcharging:$evchargingVersion" evchargingdep_exclude = dependencies.create(evchargingdep, { exclude module: "$coreId" exclude module: "$modelId" @@ -175,7 +209,8 @@ ext { exclude module: "$designsystemId" }) - mobilitylibdep = "$urbiGroupId:$mobilitySharingId:$mobilitySharingVersion" + mobilitysharing = "$urbiGroupId:$mobilitySharingId" + mobilitylibdep = "$mobilitysharing:$mobilitySharingVersion" mobilitylibdep_exclude = dependencies.create(mobilitylibdep, { exclude module: "$coreId" exclude module: "$modelId" @@ -190,46 +225,12 @@ ext { exclude module: "$utilityId" }) - tpaylibdep = "$telepassGroupId:$telepassLibId:$telepassLibVersion" - tpaylibdep_exclude = dependencies.create(tpaylibdep, { - exclude module: "$coreId" - exclude module: "$modelId" - exclude module: "$designsystemId" - exclude module: "$searchId" - exclude module: "$tripoId" - exclude module: "$transpoId" - exclude module: "$evchargingId" - exclude module: "$taxiId" - exclude module: "$ticketId" - exclude module: "$scanId" - exclude module: "$mobilitySharingId" - exclude module: "$telepassModelId" - exclude module: "$telepassNetworkId" - exclude module: "$utilityId" - }) - - telepasspaymodeldep = "$telepassGroupId:$telepassModelId:$telepassModelVersion" - - telepasspaymodeldep_exclude = dependencies.create(telepasspaymodeldep, { - exclude module: "$utilityId" - }) - - telepasspaynetworkdep = dependencies.create("$telepassGroupId:$telepassNetworkId:$telepassNetworkVersion", { - exclude module: 'play-services-stats' - exclude module: 'firebase-measurement-connector-impl' - }) - - telepasspaynetworkdep_exclude = dependencies.create(telepasspaynetworkdep, { - exclude module: 'play-services-stats' - exclude module: 'firebase-measurement-connector-impl' - exclude module: "$utilityId" - exclude module: "$telepassModelId" - }) - - composedsdep = dependencies.create("$urbiGroupId:$composeDsId:$composeDsVersion") - composedsdep_third = dependencies.create("$urbiGroupId:$composeDsId$suffixArtifactId:$composeDsVersion") + composeds = "$urbiGroupId:$composeDsId" + composeds_third = "$urbiGroupId:$composeDsId$suffixArtifactId" + composedsdep = dependencies.create("$composeds:$composeDsVersion") + composedsdep_third = dependencies.create("$composeds_third:$composeDsVersion") - composedsdep_exclude = dependencies.create("$urbiGroupId:$composeDsId:$composeDsVersion", { + composedsdep_exclude = dependencies.create("$composeds:$composeDsVersion", { exclude module: "$composeNavigationId" exclude module: "$utilityId" exclude module: "$coreId" @@ -237,10 +238,12 @@ ext { exclude module: "$designsystemId" }) - composestatedep = dependencies.create("$urbiGroupId:$commonStateId:$commonStateVersion") - composestatedep_third = dependencies.create("$urbiGroupId:$commonStateId$suffixArtifactId:$commonStateVersion") + composestate = "$urbiGroupId:$commonStateId" + composestate_third = "$urbiGroupId:$commonStateId$suffixArtifactId" + composestatedep = dependencies.create("$composestate:$commonStateVersion") + composestatedep_third = dependencies.create("$composestate_third:$commonStateVersion") - composestatedep_exclude = dependencies.create("$urbiGroupId:$commonStateId:$commonStateVersion", { + composestatedep_exclude = dependencies.create("$composestate:$commonStateVersion", { exclude module: "$composeNavigationId" exclude module: "$composeDsId" exclude module: "$utilityId" @@ -249,9 +252,11 @@ ext { exclude module: "$designsystemId" }) - logindep = dependencies.create("$urbiGroupId:$loginId:$loginVersion") - logindep_third = "$urbiGroupId:$loginId$suffixArtifactId:$loginVersion" - logindep_exclude = dependencies.create("$urbiGroupId:$loginId:$loginVersion", { + login = "$urbiGroupId:$loginId" + login_third = "$urbiGroupId:$loginId$suffixArtifactId" + logindep = dependencies.create("$login:$loginVersion") + logindep_third = "$login_third:$loginVersion" + logindep_exclude = dependencies.create("$login:$loginVersion", { exclude module: "$composeNavigationId" exclude module: "$commonStateId" exclude module: "$composeDsId" @@ -261,9 +266,11 @@ ext { exclude module: "$designsystemId" }) + commonview = "$urbiGroupId:$commonViewId" + commonview_third = "$urbiGroupId:$commonViewId$suffixArtifactId" commonviewdep = dependencies.create("$urbiGroupId:$commonViewId:$commonViewVersion") - commonviewdep_third = "$urbiGroupId:$commonViewId$suffixArtifactId:$commonViewVersion" - commonviewdep_exclude = dependencies.create("$urbiGroupId:$commonViewId:$commonViewVersion", { + commonviewdep_third = "$commonview_third:$commonViewVersion" + commonviewdep_exclude = dependencies.create("$commonviewdep:$commonViewVersion", { exclude module: "$composeNavigationId" exclude module: "$composeDsId" exclude module: "$commonStateId" diff --git a/gradle/libs-urbi.versions.toml b/gradle/libs-urbi.versions.toml index ecbf5ed19..2634dd0b2 100644 --- a/gradle/libs-urbi.versions.toml +++ b/gradle/libs-urbi.versions.toml @@ -1,28 +1,28 @@ [versions] accompanist_compose = "0.34.0" adapter-delegates4 = "4.3.0" -android-gradle-plugin = "8.6.1" -android-material = "1.11.0" +android-gradle-plugin = "8.9.0" +android-material = "1.12.0" android-places = "3.5.0" -androidx-activity = "1.9.1" +androidx-activity = "1.9.3" androidx-camera = "1.3.3" androidx-camera-view = "1.3.3" -androidx-compose-bom = "2024.05.00" -androidx-fragment = "1.8.2" +androidx-compose-bom = "2025.01.00" +androidx-fragment = "1.8.5" androidx-appcompat = "1.7.0" androidx-biometric = "1.1.0" androidx-biometric-ktx = "1.2.0-alpha05" androidx-constraintlayout = "2.1.4" androidx-constraintlayout-compose = "1.1.0-alpha13" -androidx-core-ktx = "1.13.1" +androidx-core-ktx = "1.15.0" androidx-core-testing = "2.2.0" androidx-gridlayout = "1.0.0" androidx-hilt-navigation-compose = "1.2.0" androidx-legacy-support = "1.0.0" -androidx-lifecycle = "2.7.0" +androidx-lifecycle = "2.8.7" androidx-navigation = "2.7.7" -androidx-preference = "1.1.0" -androidx-security-crypto = "1.1.0-alpha06" +androidx-preference = "1.2.1" +androidx-security-crypto = "1.1.0-alpha07" androidx-splashscreen = "1.0.1" androidx-sqlite = "2.2.0" androidx-swiperefreshlayout-version = "1.1.0" @@ -32,22 +32,22 @@ androidx-test-ext-junit = "1.2.1" androidx-test-ext-truth = "1.6.0" androidx-test-runner = "1.6.2" androidx-work-manager = "2.8.1" -androidx-web-kit = "1.8.0" +androidx-web-kit = "1.12.1" commons-codec = "1.15" dagger = "2.52" dependencyGuard = "0.5.0" facebook = "latest.release" -firebase-bom = "33.1.0" -firebase-app-distribution-plugin = "5.0.0" -firebase-crashlytics-plugin = "3.0.1" +firebase-bom = "33.8.0" +firebase-app-distribution-plugin = "5.1.1" +firebase-crashlytics-plugin = "3.0.2" firebase-ui-auth = "8.0.2" flow-layout = "1.3.3" glide = "4.16.0" glide-compose = "1.0.0-alpha.5" -gson = "2.10.1" -google-maps-compose = "6.1.1" +gson = "2.11.0" +google-maps-compose = "6.4.2" google-maps-secrets = "2.0.1" -google-maps-utils = "3.8.2" +google-maps-utils = "3.10.0" google-mlkit-barcode-scanning = "17.0.2" google-play-services-ads = "18.0.1" google-play-services-appset = "16.0.2" @@ -60,13 +60,12 @@ google-play-services-mlkit-text-recognition = "19.0.0" google-play-services-pay = "16.5.0" google-play-services-plugin = "4.4.2" google-play-services-wallet = "19.4.0" -instabug = "14.1.0" json-test = "20250107" jmrtd = "0.7.18" junit = "4.13.2" jwt = "0.11.3" kotlin = "2.0.20" -kotlinx-coroutines = "1.8.1" # Cannot update this until we remove the Tempo library +kotlinx-coroutines = "1.10.2" kotlinter = "4.3.0" kustomer = "3.3.1" ksp-plugin = "2.0.20-1.0.25" @@ -79,22 +78,22 @@ mockk = "1.13.16" okhttp = "4.12.0" onfido = "22.8.0" photoview = "2.3.0" -retrofit = "2.9.0" -retrofit-adapter-rxjava = "2.9.0" -retrofit-converter-gson = "2.9.0" +retrofit = "2.11.0" rx-android = "2.1.1" rx-binding = "3.0.0" rx-redux = "1.0.1" rx-relay = "2.1.0" scuba = "0.0.20" shared-preferences-mock = "1.2.4" -sql-cipher = "4.4.3" +sql-cipher = "4.9.0" stripe-android = "20.51.0" subsampling-scale-image = "3.10.0" -tempo = "1.3.0-alpha01" -triplet-play = "3.8.1" -turbine = "0.13.0" +true-time = "4.0.0.alpha" +triplet-play = "3.10.1" +turbine = "1.2.0" zxing = "3.4.1" +rootbeer = "0.1.1" +urbi-bom = "2025.07.08" [libraries] adapterdelegates4-kotlin = { group = "com.hannesdorfmann", name = "adapterdelegates4-kotlin-dsl", version.ref = "adapter-delegates4" } @@ -171,6 +170,8 @@ google-firebase-auth = { group = "com.google.firebase", name = "firebase-auth" } google-firebase-bom = { group = "com.google.firebase", name = "firebase-bom", version.ref = "firebase-bom" } google-firebase-crashlytics = { group = "com.google.firebase", name = "firebase-crashlytics" } google-firebase-messaging = { group = "com.google.firebase", name = "firebase-messaging" } +google-firebase-appcheck-playintegrity = { group = "com.google.firebase", name = "firebase-appcheck-playintegrity" } +google-firebase-appcheck-debug = { group = "com.google.firebase", name = "firebase-appcheck-debug" } google-gson = { group = "com.google.code.gson", name = "gson", version.ref = "gson" } google-maps-compose = { group = "com.google.maps.android", name = "maps-compose", version.ref = "google-maps-compose" } google-maps-utils = { group = "com.google.maps.android", name = "android-maps-utils", version.ref = "google-maps-utils" } @@ -189,8 +190,6 @@ google-zxing = { group = "com.google.zxing", name = "core", version.ref = "zxing hilt-android = { group = "com.google.dagger", name = "hilt-android", version.ref = "dagger" } hilt-androidtesting = { group = "com.google.dagger", name = "hilt-android-testing", version.ref = "dagger" } hilt-compiler = { group = "com.google.dagger", name = "hilt-compiler", version.ref = "dagger" } -instabug-instabug = { group = "com.instabug.library", name = "instabug", version.ref = "instabug" } -instabug-okhttp = { group = "com.instabug.library", name = "instabug-with-okhttp-interceptor", version.ref = "instabug" } json-test = { group = "org.json", name = "json", version.ref = "json-test" } jmrtd = { group = "org.jmrtd", name = "jmrtd", version.ref = "jmrtd" } junit = { group = "junit", name = "junit", version.ref = "junit" } @@ -212,22 +211,94 @@ mockk-android = { group = "io.mockk", name = "mockk-android", version.ref = "moc okhttp-logging-interceptor = { group = "com.squareup.okhttp3", name = "logging-interceptor", version.ref = "okhttp" } onfido = { group = "com.onfido.sdk.capture", name = "onfido-capture-sdk", version.ref = "onfido" } photoview = { group = "com.github.chrisbanes", name = "PhotoView", version.ref = "photoview" } -retrofit-retrofit = { group = "com.squareup.retrofit2", name = "retrofit", version.ref = "retrofit" } -retrofit-adapter-rxjava = { group = "com.squareup.retrofit2", name = "adapter-rxjava2", version.ref = "retrofit-adapter-rxjava" } -retrofit-converter-gson = { group = "com.squareup.retrofit2", name = "converter-gson", version.ref = "retrofit-converter-gson" } +retrofit-retrofit-bom = { group = "com.squareup.retrofit2", name = "retrofit-bom", version.ref = "retrofit" } +retrofit-retrofit = { group = "com.squareup.retrofit2", name = "retrofit" } +retrofit-adapter-rxjava = { group = "com.squareup.retrofit2", name = "adapter-rxjava2" } +retrofit-converter-gson = { group = "com.squareup.retrofit2", name = "converter-gson" } rx-binding = { group = "com.jakewharton.rxbinding3", name = "rxbinding", version.ref = "rx-binding" } rx-redux = { group = "com.freeletics.rxredux", name = "rxredux", version.ref = "rx-redux" } rx-relay = { group = "com.jakewharton.rxrelay2", name = "rxrelay", version.ref = "rx-relay" } rxjava-android = { group = "io.reactivex.rxjava2", name = "rxandroid", version.ref = "rx-android" } scuba = { group = "net.sf.scuba", name = "scuba-sc-android", version.ref = "scuba" } shared-preferences-mock = { group = "io.github.ivanshafran", name = "shared-preferences-mock", version.ref = "shared-preferences-mock" } -sql-cipher = { group = "net.zetetic", name = "android-database-sqlcipher", version.ref = "sql-cipher" } +sql-cipher = { group = "net.zetetic", name = "sqlcipher-android", version.ref = "sql-cipher" } stripe-android = { group = "com.stripe", name = "stripe-android", version.ref = "stripe-android" } subsampling-sample-image = { group = "com.davemorrissey.labs", name = "subsampling-scale-image-view-androidx", version.ref = "subsampling-scale-image" } -tempo = { group = "com.github.AllanHasegawa.Tempo", name = "tempo", version.ref = "tempo" } +true-time = { group = "com.github.instacart", name = "truetime-android", version.ref = "true-time" } turbine = { group = "app.cash.turbine", name = "turbine", version.ref = "turbine" } +rootbeer = { group = "com.scottyab", name = "rootbeer-lib", version.ref = "rootbeer" } + +urbi-bom = { group = "co.urbi.android", name = "bom", version.ref = "urbi-bom" } +urbi-bom-third = { group = "co.urbi.third", name = "bomthird", version.ref = "urbi-bom" } +urbi-common-state = { module = "co.urbi.android:commonstate"} +urbi-common-view = { module = "co.urbi.android:commonview"} +urbi-compose-ds = { module = "co.urbi.android:composeds"} +urbi-compose-navigation = { module = "co.urbi.android:composenavigation"} +urbi-core = { module = "co.urbi.android:core"} +urbi-login = { module = "co.urbi.android:login"} +urbi-designsystem = { module = "co.urbi.android:designsystem"} +urbi-evcharging = { module = "co.urbi.android:evcharging"} +urbi-mobilitysharing = { module = "co.urbi.android:mobilitysharing"} +urbi-model = { module = "co.urbi.android:model"} +urbi-pay = { module = "co.urbi.android:pay"} +urbi-scan = { module = "co.urbi.android:scan"} +urbi-search = { module = "co.urbi.android:search"} +urbi-taxi = { module = "co.urbi.android:taxi"} +urbi-ticket = { module = "co.urbi.android:ticket"} +urbi-transpo = { module = "co.urbi.android:transpo"} +urbi-tripo = { module = "co.urbi.android:tripo"} +urbi-utility = { module = "co.urbi.android:utility"} + +urbi-common-state-third = { group = "co.urbi.android", name = "commonstatethird"} +urbi-common-view-third = { group = "co.urbi.android", name = "commonviewthird"} +urbi-compose-ds-third = { group = "co.urbi.android", name = "composedsthird"} +urbi-compose-navigation-third = { group = "co.urbi.android", name = "composenavigationthird"} +urbi-core-third = { group = "co.urbi.android", name = "corethird"} +urbi-login-third = { group = "co.urbi.android", name = "loginthird"} +urbi-designsystem-third = { group = "co.urbi.android", name = "designsystemthird"} +urbi-model-third = { group = "co.urbi.android", name = "modelthird"} +urbi-pay-third = { group = "co.urbi.android", name = "paythird"} +urbi-scan-third = { group = "co.urbi.android", name = "scanthird"} +urbi-ticket-third = { group = "co.urbi.android", name = "ticketthird"} +urbi-tripo-third = { group = "co.urbi.android", name = "tripothird"} +urbi-utility-third = { group = "co.urbi.android", name = "utilitythird"} [bundles] +urbi = [ + "urbi-core", + "urbi-designsystem", + "urbi-evcharging", + "urbi-mobilitysharing", + "urbi-model", + "urbi-login", + "urbi-pay", + "urbi-scan", + "urbi-search", + "urbi-taxi", + "urbi-ticket", + "urbi-transpo", + "urbi-tripo", + "urbi-utility", + "urbi-compose-navigation", + "urbi-compose-ds", + "urbi-common-view", + "urbi-common-state" +] +urbithird = [ + "urbi-core-third", + "urbi-designsystem-third", + "urbi-model-third", + "urbi-login-third", + "urbi-pay-third", + "urbi-scan-third", + "urbi-ticket-third", + "urbi-tripo-third", + "urbi-utility-third", + "urbi-compose-navigation-third", + "urbi-compose-ds-third", + "urbi-common-view-third", + "urbi-common-state-third" +] accompanist = [ "google-accompanist-navigation-animation", "google-accompanist-pager", diff --git a/scripts/build.gradle.kts b/scripts/build.gradle.kts index 43080eeb4..0794ad572 100644 --- a/scripts/build.gradle.kts +++ b/scripts/build.gradle.kts @@ -283,18 +283,53 @@ fun writeChangelog( val avoidPublishTpay = project.properties["avoidPublishTpay"].toString() if (haveToWriteFile) { println("Update lib $key..........") - ByteArrayOutputStream().use { os -> + if(avoidPublishTpay.toBoolean()){ + ByteArrayOutputStream().use { os -> + val result = exec { + commandLine( + "./gradlew", + "$key:clean", + "$key:publishReleasePublicationToGitHubPackagesRepository", + ) + standardOutput = os + } + println(os.toString()) + } + } + else if(haveModuleTPay(key)){ + ByteArrayOutputStream().use { os -> + val result = exec { + commandLine( + "./gradlew", + "$key:clean", + "$key:publishReleasePublicationToGitHubPackagesRepository", + "$key:publishReleasePublicationToGitHubPackages2Repository" + ) + standardOutput = os + } + println(os.toString()) + } + } else { + ByteArrayOutputStream().use { os -> + val result = exec { + commandLine( + "./gradlew", + "$key:clean", + "$key:publishReleasePublicationToGitHubPackagesRepository", + ) + standardOutput = os + } + println(os.toString()) + } + } + if(haveModuleThird(key)) + ByteArrayOutputStream().use { os -> val result = exec { - commandLine( - "./gradlew", - "$key:clean", - "$key:publishReleasePublicationToGitHubPackages2Repository", - ) + commandLine("./gradlew", "$key:publishThirdPublicationToGitHubPackages-ThirdRepository") standardOutput = os + } + println(os.toString()) } - println(os.toString()) - } - println("Updating Changelog $pathFile..........") changelog.printWriter().use { out -> newChangelog.forEach { @@ -373,7 +408,108 @@ fun forcePullServiceFileAndCopy() { } /** - * This scripts read depend.gradle file where libs version are and update that if there is some change in their changelog + * This scripts read depend.gradle file where libs version are and upgrade patch version + * if there is some change in their changelog. Then upload a new BoM with new versions (you have to manually + * upgrade BoM version) and the upload libs. + */ +tasks.register("upgrade-lib-patch-version") { + doLast { + val mapVersionUrbi = getVersionKeyFromModule() + val mapVersionUrbiInverse = mapVersionUrbi.inverseMap() + val keyToChangeVersion: HashSet = HashSet() + println("Start to scan Changelog files.......") +//// Read Changelog Utility on Gradle file + mapVersionUrbi.forEach mapFor@{ map -> + var lastIsUnrelase = false + val pathFile = "${map.key}/changelog.md" + try { + val changelog = + if (File(pathFile).exists()) File(pathFile) else File("$rootDir/android-urbi-framework/$pathFile") + changelog.readLines().forEach { line -> + if (line.startsWith("## [Unreleased]", true)) { + lastIsUnrelase = true + } else if (lastIsUnrelase && line.startsWith("##")) { + return@mapFor + } else if (lastIsUnrelase && line.startsWith("-")) { + lastIsUnrelase = false + keyToChangeVersion.add(map.key) + } + } + }catch (e: Exception){ + println("Error for file $pathFile ${e.message}") + } + } + if(keyToChangeVersion.isNotEmpty()){ + val newGradleDeep = arrayListOf() + val gradle = if(File("android-scripts/gradle/depend.gradle").exists()) File("android-scripts/gradle/depend.gradle") else File("$rootDir/android-urbi-framework/android-scripts/gradle/depend.gradle") + var readVersion = false + println("Reading /gradle/depend.gradle file for version......") + gradle.forEachLine { line -> + if (line.equals("//---End---//", true)) { + readVersion = false + newGradleDeep.add(line) + } + else if (readVersion) { + line.replace("\\s".toRegex(), "").let { lineW -> + lineW.split("=").let { it -> + if(it.size > 1 && mapVersionUrbiInverse.containsKey(it[0]) && keyToChangeVersion.contains(mapVersionUrbiInverse[it[0]])) { + val versionArray = it[1].replace("\'".toRegex(), "").split(".") + var mirrorVersion = versionArray[2] + var extraMirrorVersion = "" + if(!mirrorVersion.all { it.isDigit() } ){ + val arrMirror= mirrorVersion.split("-") + mirrorVersion = arrMirror[0] + extraMirrorVersion = arrMirror[1] + } + mirrorVersion = "${mirrorVersion.toInt()+1}" + var newVersionApp = "${versionArray[0]}.${versionArray[1]}.${mirrorVersion}" + if(extraMirrorVersion.isNotEmpty()) + newVersionApp = "$newVersionApp-$extraMirrorVersion" + newGradleDeep.add(line.replace(it[1].replace("\'".toRegex(), ""),newVersionApp)) + } + else + newGradleDeep.add(line) + } + } + } + else if (line.equals("//---Module Version---//", true)) { + readVersion = true + newGradleDeep.add(line) + } + else + newGradleDeep.add(line) + } + println("Update dep file") + gradle.printWriter().use { out -> + newGradleDeep.forEach { + out.println(it) + } + } + println("Upload BoM") + ByteArrayOutputStream().use { os -> + val result = exec { + commandLine("./gradlew", "bom:publishAllBom") + standardOutput = os + } + println(os.toString()) + println("Upload BoM: $result") + } + ByteArrayOutputStream().use { os -> + val result = exec { + commandLine("./gradlew", "uploadlib", "-Pargs=skipService") + standardOutput = os + } + println(os.toString()) + println("Upload Libs RESULT$result") + } + } + else + println("No Version have updated") + } +} + +/** + * This scripts read depend.gradle file where libs version are and upgrade patch versionif there is some change in their changelog, and then upload new libs */ tasks.register("update-version-lib") { doLast {