Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DexGuard - generateBugsnagBrazil-releaseMapping disabled optimzations #413

Open
guilherme-pereira-ifood opened this issue Aug 5, 2021 · 2 comments
Labels
awaiting feedback Awaiting a response from a customer. Will be automatically closed after approximately 2 weeks.

Comments

@guilherme-pereira-ifood
Copy link

Describe the bug

We're adding the DexGuard to our project and we saw a warning when building release:

> Task :app:generateBugsnagBrazil-releaseMapping
Execution optimizations have been disabled for task ':app:generateBugsnagBrazil-releaseMapping' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '/Users/guilherme.pereira/Documents/Projects/xxx/app/build/outputs/dexguard/mapping/apk/brazil/release/mapping.txt'. Reason: Task ':app:generateBugsnagBrazil-releaseMapping' uses this output of task ':app:dexguardApkBrazilRelease' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.

Steps to reproduce

  1. We added apply plugin: 'dexguard' right before apply plugin: 'com.bugsnag.android.gradle' on app/build.gradle
  2. Added some DexGuard configuration on app/build.gradle:
dexguard {
  version = '9.1.9'
  license = '../config/dexguard-license.txt'
  configurations {
    release {
      defaultConfiguration 'dexguard-release.pro'
      configuration '../config/dexguard-config.txt'
    }
  }
}
  1. Ran ./gradlew app:assembleBrazilRelease
  2. Saw that optimizations for :app:generateBugsnagBrazil-releaseMapping was disabled

Environment

  • Android Studio version: Android Studio Arctic Fox | 2020.3.1
  • Gradle version: 7.1
  • Android Gradle Plugin (AGP) version: 4.2.1
  • Bugsnag Android Gradle Plugin version: 5.7.6
  • Bugsnag manifest section (if modified): (I'm not sure what is this)
  • DexGuard version: 9.1.9
@johnkiely1
Copy link
Member

Hi @guilherme-pereira-ifood.

Thanks for raising this, we are going to investigate and get back to you shortly.

@xljones
Copy link

xljones commented Sep 28, 2021

Hey @guilherme-pereira-ifood, upon closer inspection, this looks like a bug in the DexGuard plugin rather than within the bugsnag-android-gradle-plugin.

The error message states that the problem is with the dexguardJar task using a task output of Bugsnag, which originates from the DexGuard plugin:

> Task :generateBugsnagBar-releaseMapping
Execution optimizations have been disabled for task ':generateBugsnagBar-releaseMapping' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '/Users/name/DexGuard-9.1.15/samples/basic/KotlinHelloWorld/build/intermediates/bugsnag/jvmMappings/mappingForBar-release.gz'. Reason: Task ':dexguardJar' uses this output of task ':generateBugsnagBar-releaseMapping' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to  for more details about this problem
  - Gradle detected a problem with the following location: '/Users/name/DexGuard-9.1.15/samples/basic/KotlinHelloWorld/build/outputs/dexguard/mapping/apk/bar/release/mapping.txt'. Reason: Task ':generateBugsnagBar-releaseMapping' uses this output of task ':dexguardApkBarRelease' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to  for more details about this problem.

After decompiling that task, it uses the DexGuard home directory as a task input. In the DexGuard sample (and most apps) the DexGuard home directory is 3 directories above, which means the build directory (and all other files in the project) would be used as the input for the task.

Disabling Bugsnag entirely led to 58 similar warnings around the DexGuard plugin, which suggests it’s not an issue with this plugin.

@xljones xljones added the awaiting feedback Awaiting a response from a customer. Will be automatically closed after approximately 2 weeks. label Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting feedback Awaiting a response from a customer. Will be automatically closed after approximately 2 weeks.
Projects
None yet
Development

No branches or pull requests

3 participants