DataDog / dd-sdk-android-gradle-plugin

The Datadog Gradle Plugin for Android
Apache License 2.0
14 stars 9 forks source link

RUMM-2952: Add Gzip support for mapping file upload #143

Closed 0xnm closed 1 year ago

0xnm commented 1 year ago

What does this PR do?

This change add Gzip support for mapping file upload by optionally (enabled by default) adding gzip encoding to the srcmap endpoint request.

There is a way to disable this behavior by using dd-disable-gzip Gradle property. This property is accessed using ProviderFactory#gradleProperty, which is available since Gradle 6.2 (but we are using already ExecOperations interface for a long time which is available since Gradle 6.0, so it should be ok to bump min Gradle version a bit).

Unfortunately it is not possible to test this property using unit tests (because org.gradle.testfixtures.ProjectBuilder used in the DdMappingFileUploadTaskTest is not capable of reading/setting Gradle properties), so I had to rely on the functional tests instead.

Review checklist (to be filled by reviewers)