2
0
mirror of synced 2025-02-24 07:18:15 +00:00
Vignesh Ramachandra f52077efd0 misc/androidstudio: ensure gomobile bind completes before java compilation
When there is no prior gradle cache (i.e .gradle/ directory isn't created yet) in your Android project and a gradle build command is executed (e.g ./gradlew build), the *.so files generated by the gobind android plugin is not packaged into the apk.
Successive builds work fine though.

This issue doesn't happen when using Android plugin version 2.x, but does using version 3.x.

The gomobile bind task, libTask, is only finalizing the java compile task which allows it to run in parallel with javaCompile. That is probably too late, so instead, make libTask a dependency of the compile task to make sure the output of gomobile bind (in particular, the *so libraries) are included in the final build product.

Fixes golang/go#23766

Change-Id: I62727bfa0ffd54d8158c3a2aa3d7303867fcbabc
Reviewed-on: https://go-review.googlesource.com/94835
Reviewed-by: Elias Naur <elias.naur@gmail.com>
2018-02-20 15:10:30 +00:00
..