strongswan/src/frontends/android/app/build.gradle

59 lines
1.7 KiB
Groovy

apply plugin: 'com.android.application'
android {
compileSdkVersion 30
defaultConfig {
applicationId "org.strongswan.android"
minSdkVersion 15
targetSdkVersion 30
versionCode 75
versionName "2.3.3"
}
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.3.0'
implementation 'androidx.preference:preference:1.1.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.4.0'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:3.11.2'
testImplementation 'org.powermock:powermock-core:2.0.9'
testImplementation 'org.powermock:powermock-module-junit4:2.0.9'
testImplementation 'org.powermock:powermock-api-mockito2:2.0.9'
}