DataDog / dd-sdk-android-gradle-plugin

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

Using DATADOG_API_KEY as gradle property name doesn't work #184

Closed jamesbluecrow closed 1 year ago

jamesbluecrow commented 1 year ago

Describe what happened Running ./gradlew uploadMappingRelease fails as if the key property was not declared unless renamed to DD_API_KEY.

Error message:

* What went wrong:
Execution failed for task ':app:uploadMappingRelease'.
> Make sure you define an API KEY to upload your mapping files to Datadog. Create a DD_API_KEY or DATADOG_API_KEY environment variable, gradle property or define it in datadog-ci.json file.

Steps to reproduce the issue: Declare DATADOG_API_KEY=XXX in your .gradle/gradle.properties file Run ./gradlew uploadMappingRelease

Describe what you expected: The task should succeed but it fails.

xgouchet commented 1 year ago

Hi @jamesbluecrow and thanks for opening this issue.

Indeed, the message is misleading as DATADOG_API_KEY only works as an environment variable for now. We'll update or plugin to take into account gradle properties too.