hms-push-clientdemo-android icon indicating copy to clipboard operation
hms-push-clientdemo-android copied to clipboard

Redundant AMPS transform after applying plugin

Open nesterov-n opened this issue 3 years ago • 4 comments
trafficstars

Not sure if this issue fits here.

I've tried to follow this sample to integrate hms push lib into my app. apply plugin: 'com.huawei.agconnect' But I see in build log that this plugins apllies two additional plugins: com.huawei.agconnect:agconnect-apms-plugin (adds ':app:transformCalssesWithAPMSForDebug' task) com.huawei.agconnect:agconnect-crash-symbol-lib

I don't want to integrate APMS and Crash service into my app. How can I add only pushes?

nesterov-n avatar Dec 27 '21 09:12 nesterov-n

Please provide the specific link about integrate the code com.huawei.agconnect:agconnect-apms-plugin (adds ':app:transformCalssesWithAPMSForDebug' task) & com.huawei.agconnect:agconnect-crash-symbol-lib

Mike-mei avatar Dec 27 '21 10:12 Mike-mei

@Mike-mei Sorry for delay. Reproducing is simple:

  1. Checkout this repo.
  2. change the agcp plugin to newer version in root build.gradle:
dependencies {
        classpath 'com.android.tools.build:gradle:4.0.1'
        classpath 'com.huawei.agconnect:agcp:**1.6.0.300**'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
  1. run ./gradlew :kottlinapp:assembleDebug
  2. There is :kotlinapp:transformClassesWithAPMSPluginForDebug task in buildlog
  3. And in buildscans there extra build dependencies on com.huawei.agconnect:agconnect-apms-plugin and com.huawei.agconnect:agconnect-crash-symbol-lib (can't provide build scan link right now because Gradle build scans seems to be temporarily down )

nesterov-n avatar Jan 14 '22 15:01 nesterov-n

According to your description, we didn't find the two additional plugins. 8418BC5F-2882-49A5-9F9B-F3E52499EA19 e We recommend you recompile your app. If the problem can be reproduced, please provide the demo project compiled by you and the detailed reproduction procedure. Then we can reproduce and locate your problem.

Mike-mei avatar Jan 17 '22 06:01 Mike-mei

We've had the same issue in our large scale project. APM's transformations were applied unconditionally via (deprecated with AGP 7.2) Transform API. We've had to disable APM explicitly by setting apmsInstrumentationEnabled=false project property. Docs: Disabling APM Performance Monitoring

nevack avatar Jul 06 '22 09:07 nevack