2
0
MasterPassword/platform-android/build.gradle
2018-06-25 10:34:56 -04:00

66 lines
2.0 KiB
Groovy

apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '27.0.3'
defaultConfig {
applicationId 'com.lyndir.masterpassword'
minSdkVersion 19
targetSdkVersion 25
versionCode 20701
versionName '2.7.1'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
externalNativeBuild {
cmake {
path 'CMakeLists.txt'
}
}
sourceSets {
main {
jniLibs.srcDirs "$projectDir/../lib/libsodium/build-android~/out/lib",
"$projectDir/../lib/libjson-c/build-android~/out/lib"
}
}
// release with: STORE_PW=$(mpw masterpassword.keystore) KEY_PW_ANDROID=$(mpw masterpassword-android) gradle masterpassword-android:assembleRelease
signingConfigs {
release {
storeFile file( 'masterpassword.keystore' )
storePassword System.getenv( 'STORE_PW' )
keyAlias 'masterpassword-android'
keyPassword System.getenv( 'KEY_PW_ANDROID' )
}
}
buildTypes {
release {
if (System.getenv( 'KEY_PW_ANDROID' ) != null)
signingConfig signingConfigs.release
}
}
}
dependencies {
api project( ':masterpassword-algorithm' )
implementation group: 'com.lyndir.lhunath.opal', name: 'opal-system', version: '1.7-p2'
implementation group: 'org.slf4j', name: 'slf4j-android', version: '1.7.13-underscore'
implementation group: 'com.jakewharton', name: 'butterknife', version: '8.5.1'
annotationProcessor group: 'com.jakewharton', name: 'butterknife-compiler', version: '8.5.1'
}
preBuild {
dependsOn task( type: Exec, 'buildLibSodium', {
commandLine 'bash', "$rootDir/../lib/bin/build_libsodium-android"
} )
dependsOn task( type: Exec, 'buildLibJson-c', {
commandLine 'bash', "$rootDir/../lib/bin/build_libjson-c-android"
} )
}