3

Is there any documentation on converting a application.mk/android.mk file to a gradle based build.gradle file?

pka
  • 351
  • 4
  • 8
  • With AS 2.2 officially released, you can use the full power of ndk-build (based on gnumake) or even of CMake, and still have full support for cpp navigation and debugging. – Alex Cohn Oct 08 '16 at 18:56

2 Answers2

1

good links, QArea. Thanks a lot!

At this moment NDK support in Gradle are very limited. If you need to assemble something that gradle not provides that function I do like this. I collect the old-fashioned, but to .so-patches automatically picks up the Gradle-plugin: ndk-build -j4 NDK_LIBS_OUT=src/main/jniLibs

Otherwise, you must wait for next version of gradle 0.13. Devs promise that NDK will fix integration with NDK.

DMan
  • 258
  • 3
  • 22
1

I made a script tool to convert android.mk building system to gradle building system, because I wanted to test the demo source codes in: https://android.googlesource.com/platform/development/+/05523fb0b48280a5364908b00768ec71edb847a2/samples

But after searching whole internet, I found no one did it yet. So I created this tool by myself. But even with this tool, we couldn't ensure all projects in AndroidSamples could be built and executed successfully because of the API versions and features mismatch. So I created my own projects for https://android.googlesource.com/platform/development/+/05523fb0b48280a5364908b00768ec71edb847a2/samples And I want to convert those demo projects one by one. Now the whole source codes are here: https://github.com/clockzhong/AndroidSamples I already successfully converted some samples into gradle building system and executed them correctly on my android phones. But I still have some version mismatch issues, anyway, I'll mentioned it in the project check-in comments.

Clock ZHONG
  • 875
  • 9
  • 23