Splunk AppDynamics

Android Proguard mapping files are not found when using product flavour & build type combinations

Pablo_Coberly
Explorer

Android agent plugin version: 

com.appdynamics:appdynamics-gradle-plugin:20.10.0

Using the Android Gradle plugin and calling an assembly task for a particular Android product flavour & build type puts the mapping files in an output folder that the AppDynamics Android plugin cannot find.

For example, where "test" is the product flavour and "prod" is the build type.

./gradlew assembleTestProd

Gives the output:

> Task :app:appDynamicsUploadProguardMappingTestProd
<UploadProguardMappingFileTask_Decorated> Proguard is enabled but mapping file was not generated. Please check your build configuration.

Gradle puts the mapping file in:

build/outputs/mapping/testProd/

But the Appdynamics plugin seems to expect the mapping file to be in

build/outputs/mapping/test/

Expectation:

AppDynamics plugin should create tasks that upload the mapping file from the same output location as the specific product flavour and build type that was assembled.

Labels (1)
Tags (2)
0 Karma

Pablo_Coberly
Explorer

I raised a support ticket with AppDynamics support and they were able to reproduce the issue. The dev team are working on a resolution.

0 Karma

Pablo_Coberly
Explorer

Appdynamics says "Developers confirmed that this issue will be fixed for the next Agent update, which should come out next month."

Boggles my mind that I have to give these updates in this forum and not Appdynamics people themselves.

Pablo_Coberly
Explorer

I've tried specifying the mapping file location in the proguard-rules.pro:

-printmapping build/outputs/mapping/test/mapping.txt

But again, it seems the task appDynamicsUploadProguardMappingTestProd is looking for the mapping files before they are there. 

I've also tried hooking into the task to add a dependency: 

// Put the proguard mapping files where appd expects them.
task copyProguardMappingFiles(type: Copy) {
from "$buildDir/outputs/mapping/testProd"
include "*.*"
into "$buildDir/outputs/mapping/test"
} 
tasks.matching { it.name == 'appDynamicsUploadProguardMappingTestProd' }.all { Task task ->
task.dependsOn 'copyProguardMappingFiles'
}

Now if I run the task twice in succession, the second run doesn't warn about not finding the mapping files, because it seems to be uploading the files that were copied to the expected location the first time.

0 Karma

Pablo_Coberly
Explorer

FYI, I've updated the Gradle plugin and run time versions to the latest versions:

// App dynamics Plugin
classpath "com.appdynamics:appdynamics-gradle-plugin:21.2.1"
implementation 'com.appdynamics:appdynamics-runtime:21.2.1'

 And the same thing happens.

0 Karma
Get Updates on the Splunk Community!

What the End of Support for Splunk Add-on Builder Means for You

Hello Splunk Community! We want to share an important update regarding the future of the Splunk Add-on Builder ...

Solve, Learn, Repeat: New Puzzle Channel Now Live

Welcome to the Splunk Puzzle PlaygroundIf you are anything like me, you love to solve problems, and what ...

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...