Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obsolete android.registerTransform on Gradle 7.3.1 #17

Open
SunnyBe opened this issue Feb 1, 2023 · 3 comments
Open

Obsolete android.registerTransform on Gradle 7.3.1 #17

SunnyBe opened this issue Feb 1, 2023 · 3 comments

Comments

@SunnyBe
Copy link

SunnyBe commented Feb 1, 2023

I only get this warning when I apply the AGConnect plugin. I have tried to update to the latest version, even though no fix was specified in the change log.

The plugin: apply plugin: 'com.huawei.agconnect' If I build without this plugin, I don't get this warning.

This is the error I get:

API 'android.registerTransform' is obsolete.
It will be removed in version 8.0 of the Android Gradle plugin.
The Transform API is removed to improve build performance. Projects that use the
Transform API force the Android Gradle plugin to use a less optimized flow for the
build that can result in large regressions in build times. It’s also difficult to
use the Transform API and combine it with other Gradle features; the replacement
APIs aim to make it easier to extend the build without introducing performance or
correctness issues.

There is no single replacement for the Transform API—there are new, targeted
APIs for each use case. All the replacement APIs are in the
`androidComponents {}` block.

The Transform API uses incremental APIs deprecated since Gradle 7.5. Please add
`android.experimental.legacyTransform.forceNonIncremental=true` to
`gradle.properties` to fix this issue. Note that this will run transforms
non-incrementally and may have a build performance impact.
For more information, see https://developer.android.com/studio/releases/gradle-plugin-api-updates#transform-api.
To determine what is calling android.registerTransform, use -Pandroid.debug.obsoleteApi=true on the command line to display more information.
Affected Modules: app
@xuxiapu
Copy link

xuxiapu commented Feb 2, 2023

@SunnyBe Dear developer,
Thank you for your feedback. We will solve this problem in the updated version in March. If there is any news, we will notify you as soon as possible. Thank you for your understanding.

@peura-toni
Copy link

In Adding Build Dependencies Side I tested the implementation agconnect of both
old and new methods on gradle level 7.3.1

OLD METHOD (BUILD GRADLE APP LEVEL) :
Top of the page :

apply plugin: 'com.android.application'
apply plugin: 'com.huawei.agconnect'

NEW METHOD (BUILD GRADLE APP LEVEL) :
Top of the page :

plugins {
   id 'com.android.application'
   id 'com.huawei.agconnect'
}

ref : https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/android-integrating-sdk- 0000001050040084#section1205133333182410

and I did not encounter any errors.
Can you share the build gradle codes you applied?

@SunnyBe
Copy link
Author

SunnyBe commented Feb 28, 2023

In Adding Build Dependencies Side I tested the implementation agconnect of both old and new methods on gradle level 7.3.1

OLD METHOD (BUILD GRADLE APP LEVEL) : Top of the page :

apply plugin: 'com.android.application'
apply plugin: 'com.huawei.agconnect'

NEW METHOD (BUILD GRADLE APP LEVEL) : Top of the page :

plugins {
   id 'com.android.application'
   id 'com.huawei.agconnect'
}

ref : https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/android-integrating-sdk- 0000001050040084#section1205133333182410

and I did not encounter any errors. Can you share the build gradle codes you applied?

It is a deprecation warning in 7.3.1 but breaks on 8.0. Gradle expects that this warning be fixed by removing the Transform API being used before 8.0.
https://developer.android.com/studio/releases/gradle-plugin-api-updates#transform-removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants