breautek commented on issue #1760:
URL: 
https://github.com/apache/cordova-android/issues/1760#issuecomment-2593262202

   > However, i'm wondering why gradle is now moved to "tools" folder into the 
android project.
   
   The AGP (Android Gradle Plugin) is the thing that does the minimum supported 
gradle check. The problem is if you have a single gradle project, then using 
the `gradle wrapper` (or `gradlew`) command to update the gradle wrapper will 
fail due to... the minimum version check, because the wrapper task still loads 
AGP and AGP will complain.
   
   Part of this is because Gradle community recommends checking the gradle 
wrapper so that end users don't have to update their own gradle wrapper, so if 
there was a version bump it can be managed by a single person. However, that 
means checking in binary code into the repository and distributing that which 
is against Apache policies for security reasons.
   
   So in order to reduce reliance on a particular system gradle version, but 
still allow older gradle wrappers to update to a newer version, we have a 
"dummy" tools project that doesn't import the AGP and the CLI is configured to 
use the wrapper from the dummy project. Hence why this works from the cordova 
CLI.
   
   Android Studio will have it's own configurations and you'll need to 
configure gradle to use a compatible gradle version. This might also mean 
having to upgrade Android Studio if you're using an older version. Cordova 
Android 13 should work with Android Studio Ladybug out of the box, assuming 
default settings on both the Cordova Android project and Android Studio.
   
   Hopefully this answers your question?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to