cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Gradle Dynatrace Plugin compatible with Android Gradle Plugin 3.3 RCs

shane_raiteri
Newcomer


Hi all,


We're in the process of ensuring our apps will be compatible with Android Studio 3.3 (+ Android Gradle Plugin 3.3). In particular, we're targeting a build against the latest release candidate (
3.3.0-rc03).


https://mvnrepository.com/artifact/com.android.too...


Using the latest available Gradle Dynatrace Plugin (
https://mvnrepository.com/artifact/com.dynatrace.t...7.2.2.1233) it appears to utilise a few methods removed from AGP 3.3.0-rc03:


WARNING: API 'variant.getPreBuild()' is obsolete and has been replaced with 'variant.getPreBuildProvider()'.
It will be removed at the end of 2019.
For more information, see <a href="https://d.android.com/r/tools/task-configuration-...">https://d.android.com/r/tools/task-configuration-...</a>
To determine what is calling variant.getPreBuild(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace.
WARNING: API 'variantOutput.getPackageApplication()' is obsolete and has been replaced with 'variant.getPackageApplicationProvider()'.
It will be removed at the end of 2019.
For more information, see <a href="https://d.android.com/r/tools/task-configuration-...">https://d.android.com/r/tools/task-configuration-...</a>
To determine what is calling variantOutput.getPackageApplication(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Failed to notify project evaluation listener.
> java.lang.NoSuchMethodError: com.android.build.gradle.tasks.PackageApplication.getSigningConfig()Lcom/android/build/gradle/internal/dsl/CoreSigningConfig;
> Resolving this BuildableArtifact can only done during task execution.
com.dynatrace.tools.android.DynatraceAndroidPlugin$1.execute(DynatraceAndroidPlugin.java:78)
com.dynatrace.tools.android.DynatraceAndroidPlugin$1.execute(DynatraceAndroidPlugin.java:56)

If we roll AGP 3.3.0-beta04 (the final beta version) and keep Gradle Dynatrace Plugin at 7.2.2.1233, there are still deprecation warnings, but all required methods are still available in this version:


WARNING: API 'variant.getPreBuild()' is obsolete and has been replaced with 'variant.getPreBuildProvider()'.It will be removed at the end of 2019.For more information, see <a href="https://d.android.com/r/tools/task-configuration-...To">https://d.android.com/r/tools/task-configuration-...</a> determine what is calling variant.getPreBuild(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace.WARNING: API 'variantOutput.getPackageApplication()' is obsolete and has been replaced with 'variant.getPackageApplicationProvider()'.It will be removed at the end of 2019.For more information, see <a href="https://d.android.com/r/tools/task-configuration-...To">https://d.android.com/r/tools/task-configuration-...</a> determine what is calling variantOutput.getPackageApplication(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace.

Is there an expected ETA on when a version of the Gradle Dynatrace Plugin will be published that is compatible with AGP 3.3.0-rc03 and later?

Regards,
Shane.


4 REPLIES 4

I think you will have to wait for publishing stable version of AGP 3.3.0 + some time for testing (according to my experience).

Sebastian


Thomas_Wirth1
Dynatrace Pro
Dynatrace Pro

Hey @Shane R.,

The Dynatrace Gradle plugin 7.2.2.1233 only supports the beta version of the Android Gradle plugin 3.3. The Android Team applied some changes in the release candidate that broke our 3.3 support. We have already solved this problem and the patch will be shipped with the next update. The new version will be released this week.


shane_raiteri
Newcomer

Hi @Thomas W.,

Thanks very much for the prompt updates! We will be eagerly awaiting the next update release of the Dynatrace Plugin in the next week, and commence our upgrade efforts after it is released.

Regards,

Shane.


The Dynatrace Gradle plugin version 7.2.3.1251 was released last week and works with the Android Gradle plugin 3.3.0 (stable version).