« Previous | Next » 

Revision 58ff02a3

ID58ff02a3f4b7b43bc1c1d90e35bb45b94ae77753
Parent 728d1467
Child 92421bac

Added by pserwylo over 3 years ago

Build with dependency on support-appcompat-v7.

Thanks to the awesome work of mvdan, this was mostly ready to roll.
However, I had to wrestle for a while for two reasons:

1) I forgot to add the dependency in the build.gradle file (it was
already present in settings.gradle)
2) My IDE was unable to read the ANDROID_HOME env variable, and
despite my internet-search-fu, I couldn't figure out how to
make IntelliJ specify env variables for a gradle build. It took
a while to figure out, because it was failing silently in weird
ways.

After slaving away on a nice method to parse both the ANDROID_HOME
and the local.properties file (looking for sdk.dir), and then emmiting
nice error messages if neither were found or pointed to an invalid
location, I discovered it had already be done:

android.plugin.sdkDirectory ends up here:

https://android.googlesource.com/platform/tools/build/+/master/gradle/src/main/groovy/com/android/build/gradle/internal/Sdk.groovy#161

Which does exactly all that and more. So now sdkLoc is initialized to
the value of android.plugin.sdkDirectory.

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences