native icon indicating copy to clipboard operation
native copied to clipboard

Improve detection of Android SDK and Dependencies.

Open mahesh-hegde opened this issue 2 years ago • 8 comments

  1. Finding Android SDK is done through ANDROID_SDK_ROOT environment variable but there's no guarantee it's set on all systems. Best method will be somehow obtain the config of Flutter SDK, but not sure it can be programmatically obtained, other than grepping the output of flutter doctor.

  2. Android's core library stubs are in android.jar and easy to find once we have SDK root. But other libraries including androidx are fetched by gradle and included in compile classpath. It would be nice to have a way to obtain compile classpath for android part of the flutter project. (The use case is writing some platform specific java code in android/ part of the flutter project and integrating it via jnigen.).

Alternatively it might be possible to copy dependency jars into temporary folder like we are doing with maven. I am still investigating it. It's important to not to tamper with any existing gradle config or leave trace of stub files created..

A point of friction is that Android gradle plugin does so many things differently and answers / guides related to standard java - gradle combination don't work anymore. :(

mahesh-hegde avatar Aug 27 '22 05:08 mahesh-hegde