2017-02-06 16:16:04 +00:00
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
|
|
|
android {
|
|
|
|
compileSdkVersion 25
|
2018-06-10 19:22:37 +00:00
|
|
|
buildToolsVersion '27.0.3'
|
2017-02-10 03:59:22 +00:00
|
|
|
|
2017-02-06 16:16:04 +00:00
|
|
|
defaultConfig {
|
2017-03-10 16:31:22 +00:00
|
|
|
applicationId 'com.lyndir.masterpassword'
|
2017-02-06 16:16:04 +00:00
|
|
|
minSdkVersion 19
|
|
|
|
targetSdkVersion 25
|
2018-06-19 20:52:57 +00:00
|
|
|
versionCode 20701
|
|
|
|
versionName '2.7.1'
|
2017-02-06 16:16:04 +00:00
|
|
|
}
|
2018-06-17 05:11:16 +00:00
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
|
|
}
|
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
|
|
|
path 'CMakeLists.txt'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
sourceSets {
|
|
|
|
main {
|
2018-07-03 15:21:48 +00:00
|
|
|
jniLibs.srcDirs "$rootDir/../lib/libsodium/build-android~/out/lib",
|
|
|
|
"$rootDir/../lib/libjson-c/build-android~/out/lib"
|
2018-06-17 05:11:16 +00:00
|
|
|
}
|
|
|
|
}
|
2017-03-10 16:31:22 +00:00
|
|
|
|
2018-05-19 15:45:57 +00:00
|
|
|
// release with: STORE_PW=$(mpw masterpassword.keystore) KEY_PW_ANDROID=$(mpw masterpassword-android) gradle masterpassword-android:assembleRelease
|
2017-02-10 03:59:22 +00:00
|
|
|
signingConfigs {
|
2017-02-10 04:25:42 +00:00
|
|
|
release {
|
2017-03-10 16:31:22 +00:00
|
|
|
storeFile file( 'masterpassword.keystore' )
|
|
|
|
storePassword System.getenv( 'STORE_PW' )
|
2017-02-10 04:25:42 +00:00
|
|
|
|
|
|
|
keyAlias 'masterpassword-android'
|
2018-05-19 15:45:57 +00:00
|
|
|
keyPassword System.getenv( 'KEY_PW_ANDROID' )
|
2017-02-10 04:25:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
buildTypes {
|
|
|
|
release {
|
2018-05-19 15:45:57 +00:00
|
|
|
if (System.getenv( 'KEY_PW_ANDROID' ) != null)
|
2017-03-06 19:52:52 +00:00
|
|
|
signingConfig signingConfigs.release
|
2017-02-10 03:59:22 +00:00
|
|
|
}
|
2017-02-06 16:16:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2018-06-10 19:22:37 +00:00
|
|
|
api project( ':masterpassword-algorithm' )
|
|
|
|
implementation group: 'com.lyndir.lhunath.opal', name: 'opal-system', version: '1.7-p2'
|
2017-02-09 05:48:07 +00:00
|
|
|
|
2018-06-10 19:22:37 +00:00
|
|
|
implementation group: 'org.slf4j', name: 'slf4j-android', version: '1.7.13-underscore'
|
|
|
|
implementation group: 'com.jakewharton', name: 'butterknife', version: '8.5.1'
|
2018-04-26 17:05:45 +00:00
|
|
|
annotationProcessor group: 'com.jakewharton', name: 'butterknife-compiler', version: '8.5.1'
|
2017-02-06 16:16:04 +00:00
|
|
|
}
|
2018-06-17 05:11:16 +00:00
|
|
|
|
|
|
|
preBuild {
|
2018-06-30 15:56:33 +00:00
|
|
|
dependsOn task( type: Exec, 'build_libsodium-android', {
|
2018-06-25 14:34:56 +00:00
|
|
|
commandLine 'bash', "$rootDir/../lib/bin/build_libsodium-android"
|
2018-06-30 15:56:33 +00:00
|
|
|
environment 'ANDROID_NDK_HOME', android.ndkDirectory
|
2018-06-17 05:11:16 +00:00
|
|
|
} )
|
2018-06-30 15:56:33 +00:00
|
|
|
dependsOn task( type: Exec, 'build_libjson-c-android', {
|
2018-06-25 14:34:56 +00:00
|
|
|
commandLine 'bash', "$rootDir/../lib/bin/build_libjson-c-android"
|
2018-06-30 15:56:33 +00:00
|
|
|
environment 'ANDROID_NDK_HOME', android.ndkDirectory
|
2018-06-17 05:11:16 +00:00
|
|
|
} )
|
|
|
|
}
|
|
|
|
|
2018-07-03 15:21:48 +00:00
|
|
|
clean {
|
|
|
|
dependsOn task( type: Exec, 'clean_libsodium-android', {
|
|
|
|
commandLine 'bash', "$rootDir/../lib/bin/build_libsodium-android", 'clean'
|
|
|
|
environment 'ANDROID_NDK_HOME', android.ndkDirectory
|
|
|
|
} )
|
|
|
|
dependsOn task( type: Exec, 'clean_libjson-c-android', {
|
|
|
|
commandLine 'bash', "$rootDir/../lib/bin/build_libjson-c-android", 'clean'
|
|
|
|
environment 'ANDROID_NDK_HOME', android.ndkDirectory
|
|
|
|
} )
|
|
|
|
}
|