VitalyD
VitalyD

Reputation: 289

how to compile Android NDK with gradle that contain ARM assembly optimizaions

I have an Android NDK project that has arm assembly optimizations files (.S), gradle compiles src c files (.c) but not .S , how to "tell" gradle to compile the .S files too?

I'm using:

Thanks!

Upvotes: 4

Views: 796

Answers (1)

ph0b
ph0b

Reputation: 14463

I don't think these are supported yet by AS and the experimental plugin.

What you can do is to switch to use ndk-build yourself with standard Android.mk/Application.mk files.

Set this inside your build.gradle, so it will not try to compile your code, and it will get your .so files from src/main/libs/:

android.sources{
    main.jni {
        source {
            srcDirs = ['src/main/none'] // [] could be set instead but will disable even symbol resolution inside the editor
        }
    }
    main.jniLibs {
        source {
            srcDirs = ['src/main/libs']
        }
    }
}

Upvotes: 1

Related Questions