Created
          January 5, 2019 10:19 
        
      - 
      
- 
        Save ryardley/1596aad949a726f3d9660e84e57ebb40 to your computer and use it in GitHub Desktop. 
    Alter build.gradle
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | android { | |
| // ... | |
| defaultConfig { | |
| // ... | |
| // the following configures ndk-build to build a "helloworld" module | |
| ndk { | |
| abiFilters "armeabi-v7a", "x86" | |
| moduleName "helloworld" | |
| ldLibs "log" | |
| } | |
| } | |
| // ... | |
| // Here we can add source code to our project | |
| sourceSets { | |
| main { | |
| // first our new Java code | |
| java.srcDirs = ["../../djinni/java", "src/main/java"] | |
| // second our JNI classes | |
| jni.srcDirs = ["../../djinni/jni"] | |
| } | |
| } | |
| externalNativeBuild { | |
| // This points ndk-build at our Android.mk file | |
| ndkBuild { | |
| path file('src/main/jni/Android.mk') | |
| } | |
| } | |
| //... | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment