apply plugin: 'com.android.application' android { compileSdkVersion 29 defaultConfig { applicationId "org.strongswan.android" minSdkVersion 15 targetSdkVersion 29 versionCode 74 versionName "2.3.2" } sourceSets.main { jni.srcDirs = [] // disables the default ndk-build call (with on-the-fly Android.mk files) jniLibs.srcDir 'src/main/libs' } task buildNative(type: Exec) { workingDir 'src/main/jni' commandLine "${android.ndkDirectory}/ndk-build", '-j', Runtime.runtime.availableProcessors() } task cleanNative(type: Exec) { workingDir 'src/main/jni' commandLine "${android.ndkDirectory}/ndk-build", 'clean' } tasks.withType(JavaCompile) { compileTask -> compileTask.dependsOn buildNative options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" } clean.dependsOn 'cleanNative' buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } } compileOptions { targetCompatibility 1.8 sourceCompatibility 1.8 } } dependencies { implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'androidx.preference:preference:1.1.1' implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'com.google.android.material:material:1.2.1' testImplementation 'junit:junit:4.12' testImplementation 'org.mockito:mockito-core:2.28.2' testImplementation 'org.powermock:powermock-core:2.0.2' testImplementation 'org.powermock:powermock-module-junit4:2.0.2' testImplementation 'org.powermock:powermock-api-mockito2:2.0.2' }