1apply plugin: 'com.android.application' 2 3android { 4 compileSdkVersion 23 5 buildToolsVersion "23.0.3" 6 7 defaultConfig { 8 applicationId "org.libwebsockets.client" 9 minSdkVersion 17 10 targetSdkVersion 23 11 versionCode 1 12 versionName "1.0" 13 } 14 buildTypes { 15 release { 16 minifyEnabled false 17 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 } 19 } 20 sourceSets { 21 main { 22 jni.srcDirs = [] 23 } 24 } 25} 26 27dependencies { 28 compile fileTree(dir: 'libs', include: ['*.jar']) 29 testCompile 'junit:junit:4.12' 30 compile 'com.android.support:appcompat-v7:23.3.0' 31} 32 33task buildNativeLibs(type: Exec, description: "compile the native libraries") { 34 commandLine 'make', '-f', 'NativeLibs.mk', '-C', 'src/main/jni', 'all' 35} 36 37task cleanNativeLibs(type: Exec, description: "clean the native libraries source tree") { 38 commandLine 'make', '-f', 'NativeLibs.mk', '-C', 'src/main/jni', 'clean-ndk' 39} 40 41tasks.withType(JavaCompile) { compileTask -> compileTask.dependsOn buildNativeLibs } 42clean.dependsOn 'cleanNativeLibs' 43