breautek commented on PR #1781: URL: https://github.com/apache/cordova-android/pull/1781#issuecomment-2669876360
To solve https://github.com/apache/cordova-android/issues/1760 I think what we should do is copy the generated `gradle`, `gradlew`, and `gradlew.bat` files up a directory on each gradle wrapper install into `platforms/android/`. If the wrapper files already exists, then it should be replaced. We could also experiment with creating a symlink to `tools/gradlew`, `tools/gradle`, and `tools/gradlew.bat` (but idk if Android Studio will follow symlinks or if that will play nicely on windows) We should also retain the tools/ gradle wrapper copy for future install commands. Like I mentioned, the `tools/` project is a dummy project with no dependencies, so it allows for the user to have a wide range of system gradle installed. On each build, the install command is issued, but if the wrapper is already installed at the desired version, it's nearly a no-operation, so it will help subsequent builds as well. Android Studio will use the wrapper installed at `platforms/android/`. The CLI could continue to use the wrapper in `platforms/android/tools/` or be updated to use the copied version at `platforms/android`, that's up to preference at this point. But the CLI should make sure that `platforms/android/` gradle install is identical to the one inside `platform/android/tools/`. I hope this makes sense. I know having a copy is not ideal, but it helps give us the best of both worlds: 1. Virtually any Gradle version can be used to install the gradle wrapper of the version needed by Cordova. 2. Installed gradle wrapper will be used by Android Studio if the project is opened in the IDE. If the symlink idea works, then that could be use to reduce the maintenance burden as well. -- 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