android-ndk-swig-example icon indicating copy to clipboard operation
android-ndk-swig-example copied to clipboard

AS3 example on AS only works after being built from the command line

Open dschmitt007 opened this issue 6 years ago • 1 comments

With Android Studio: 3.1.3 And the android build plugin: com.android.tools.build:gradle:3.1.3 With Kotlin 1.2.30

project.afterEvaluate { javaPreCompileDebug.dependsOn externalNativeBuildDebug }

doesn't get triggered when loading the project after pulling from revision control.

It looks like AS is doing something with generateJsonModelDebug to make the list of files it wants to look at, using that to decide what it hammers on, and can't run the externalNativeBuildDebug without the JsonModel.

dschmitt007 avatar Jul 13 '18 15:07 dschmitt007

It feels like moving the SWIG generation code outside the library CMakelist.txt would give gradle a fighting chance to not have some loop dependency. (I'm thinking 2nd CMakelist.txt, special gradle task that just does the swig part that AS won't care about to avoid the loop.)

dschmitt007 avatar Jul 13 '18 15:07 dschmitt007