Description
When syncing any Android project on RV2IDE with Gradle 9.6.1, the following deprecation warning is emitted during the Configure project :app phase:
Using a Project object as a dependency notation has been deprecated.
This will fail with an error in Gradle 10.
Please use project(String) or createProjectDependency(String).
Investigation & Root Cause
Through reverse engineering (smali analysis), I traced the source of this warning. It is not caused by the project's build.gradle.kts nor the Gradle core itself.
The issue originates from the IDE's internal model building logic:
- During the Gradle Tooling API sync phase, RV2IDE constructs a dependency list for the module.
- Inside
ModuleGradleConfigBuilder.addDependency(Object), the IDE passes an instance of org.gradle.api.Project directly into the dependency handler.
- Gradle 9.x correctly identifies this legacy usage and emits the deprecation warning before the dependency is even resolved (evidenced by
Forced resolution of 0 dependencies).
Why this is critical
- This warning is not a false positive; it indicates an incorrect internal API usage within the IDE.
- Since the object is passed during the Configure phase, it cannot be suppressed by standard Gradle properties or smali patches targeting the Writer classes alone.
- This will become a hard error in Gradle 10, breaking all RV2IDE projects using Gradle 9+.
Suggested Fix
In ModuleGradleConfigBuilder, please replace the direct passing of the Project object with a string-based notation (e.g., "project(':app')") or use the official DependencyFactory.createProjectDependency() API provided by Gradle.
Environment
- RV2IDE Version: 1.0.0+gh.r04(1025)
- Gradle Version: 9.6.1
- AGP Version: 9.2.1
- Android SDK: 36
Thanks for the amazing tool! Looking forward to the fix.
Description
When syncing any Android project on RV2IDE with Gradle 9.6.1, the following deprecation warning is emitted during the
Configure project :appphase:Using a Project object as a dependency notation has been deprecated.
This will fail with an error in Gradle 10.
Please use project(String) or createProjectDependency(String).
Investigation & Root Cause
Through reverse engineering (
smalianalysis), I traced the source of this warning. It is not caused by the project'sbuild.gradle.ktsnor the Gradle core itself.The issue originates from the IDE's internal model building logic:
ModuleGradleConfigBuilder.addDependency(Object), the IDE passes an instance oforg.gradle.api.Projectdirectly into the dependency handler.Forced resolution of 0 dependencies).Why this is critical
Suggested Fix
In
ModuleGradleConfigBuilder, please replace the direct passing of theProjectobject with a string-based notation (e.g.,"project(':app')") or use the officialDependencyFactory.createProjectDependency()API provided by Gradle.Environment
Thanks for the amazing tool! Looking forward to the fix.