Conflict description
mPaaS uses wire/okio for Remote Procedure Call (RPC) network connectivity. The okhttp library also references okio. A wire/okio conflict can occur if you use okhttp and mPaaS together.
Solution
Baseline 10.1.68
Remove the wire/okio dependency from mPaaS. Then, perform regression testing on the Mobile Gateway feature to ensure that it works correctly. The procedure is as follows:
Confirm the wire/okio versions that mPaaS uses.
'com.squareup.okio:okio:1.7.0@jar' 'com.squareup.wire:wire-lite-runtime:1.5.3.4@jar'Obtain the
group:artifactinformation for the mPaaS third-party SDK.'com.alipay.android.phone.thirdparty:wire-build'Remove the mPaaS library.
If you integrate mPaaS using the native AAR method, Gradle automatically resolves dependencies to the higher version, so no manual removal is required. The version provided by mPaaS is generally more stable and secure. We recommend that you use the mPaaS version. If the versions are inconsistent, test the mPaaS features before you publish to ensure stability.
If you integrate mPaaS using the component-based (Portal & Bundle) method, do the following:
mpaascomponents { excludeDependencies = [ "com.alipay.android.phone.thirdparty:wire-build" ] }
Add wire or okio back to your project. Use the public versions of these libraries. This step is not required for the native AAR integration method. Because mPaaS includes both wire and okio dependencies in the
com.alipay.android.phone.thirdparty:wire-buildlibrary, you must add them back selectively as needed.If there is only an okio conflict and no wire conflict, add wire.
implementation 'com.squareup.wire:wire-lite-runtime:1.5.3.4@jar'If there is only a wire conflict and no okio conflict, add okio.
'com.squareup.okio:okio:1.7.0@jar'
Baseline 10.2.3
Completely remove the mPaaS version dependencies and use the versions that your application requires. To resolve wire/okio conflicts, follow these steps:
Remove wire from mPaaS. mPaaS does not have a hard dependency on the wire library.
For native AAR projects, do the following:
configurations { all*.exclude group: 'com.alipay.android.phone.thirdparty', module: 'wire-build' }For component-based (Portal & Bundle) projects, do the following:
mpaascomponents { excludeDependencies = [ "com.alipay.android.phone.thirdparty:wire-build" ] }
Change all RPC protobuf classes in your application that inherit from
com.squareup.wire.Messageto inherit fromcom.mpaas.thirdparty.squareup.wire.Message.The following component features require regression testing: