DataDog / dd-sdk-android-gradle-plugin

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

Gradle Plugin is not honoring parameters while using Gradle KTS? #180

Closed ankushg closed 10 months ago

ankushg commented 1 year ago

Describe what happened My project is using Gradle KTS for our build scripts. We have multiple variants, but are not trying to set things differently per variant.

When I set

datadog {
  versionName = "my custom version"
}

The upload mapping task does not respect them. I can see the Gradle project output that it's uploading for a different version number than the one I specified

Uploading mapping file with tags `service:com.ankushg.myproject`, `version:1.0`, `variant:release` (site=datadoghq.com):

Workaround

If I instead configure the upload task specifically via

tasks.withType<DdMappingFileUploadTask>().configureEach {
  versionName = buildVersionCode.toString()
}

then things work just fine.

Describe what you expected:

I should be able to configure the versionName from the datadog configuration DSL as described int the library's readme

0xnm commented 1 year ago

Hello @ankushg. Thanks for opening the issue.

I cannot reproduce the problem you've encountered using the latest version of our Gradle Plugin with our sample app.

Can you please check that you are applying plugin and extension in the application module? Also please share the Gradle version you are using, Android Gradle Plugin version and version of Datadog Gradle Plugin as well.

0xnm commented 10 months ago

Closing this issue due to inactivity. Feel free to re-open it if needed.