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)
[ ] Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
[ ] Make sure you discussed the feature or bugfix with the maintaining team in an Issue
[ ] Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)
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 usingProviderFactory#gradleProperty
, which is available since Gradle 6.2 (but we are using alreadyExecOperations
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 theDdMappingFileUploadTaskTest
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)