yubioath-flutter/android/app/build.gradle

112 lines
3.0 KiB
Groovy
Raw Normal View History

plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlinx-serialization'
id 'dev.flutter.flutter-gradle-plugin'
id 'com.google.android.gms.oss-licenses-plugin'
}
2022-03-04 14:20:01 +03:00
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
android {
2022-04-04 18:02:06 +03:00
2023-01-24 11:28:31 +03:00
namespace 'com.yubico.authenticator'
2023-05-23 12:56:28 +03:00
compileSdk project.compileSdkVersion
2022-03-04 14:20:01 +03:00
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
2022-09-09 12:44:19 +03:00
applicationId "com.yubico.yubioath"
2022-03-04 14:20:01 +03:00
minSdkVersion project.minSdkVersion
2023-10-31 16:42:30 +03:00
targetSdk project.targetSdkVersion
2022-05-13 11:46:36 +03:00
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
2022-03-04 14:20:01 +03:00
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
2023-09-06 15:17:12 +03:00
buildFeatures {
buildConfig true
}
2022-03-22 18:43:48 +03:00
lint {
2022-03-04 14:20:01 +03:00
abortOnError false
}
2022-03-22 18:43:48 +03:00
2022-09-19 12:51:09 +03:00
applicationVariants.all { variant ->
variant.outputs.each { output ->
def abiCodes = ['armeabi-v7a': 1, 'arm64-v8a': 2, x86: 3, x86_64: 4]
def abiCode = abiCodes.get(output.getFilter(com.android.build.OutputFile.ABI))
2022-09-19 12:51:09 +03:00
output.versionCodeOverride = variant.versionCode * 10 + (abiCode != null ? abiCode : 0)
}
}
2022-03-04 14:20:01 +03:00
}
2022-04-05 09:38:57 +03:00
apply from: "signing.gradle"
2022-08-31 16:49:43 +03:00
apply from: "collect_licenses.gradle"
2022-04-05 09:38:57 +03:00
2022-03-04 14:20:01 +03:00
flutter {
source '../..'
}
dependencies {
api "com.yubico.yubikit:android:$project.yubiKitVersion"
api "com.yubico.yubikit:management:$project.yubiKitVersion"
api "com.yubico.yubikit:oath:$project.yubiKitVersion"
2023-09-28 09:52:02 +03:00
api "com.yubico.yubikit:fido:$project.yubiKitVersion"
api "com.yubico.yubikit:support:$project.yubiKitVersion"
2022-03-04 14:20:01 +03:00
2024-03-05 13:19:29 +03:00
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3'
2022-03-04 14:20:01 +03:00
// Lifecycle
2024-02-05 17:03:08 +03:00
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0'
2022-03-04 14:20:01 +03:00
2023-10-04 10:12:02 +03:00
implementation "androidx.core:core-ktx:1.12.0"
2023-11-15 10:01:54 +03:00
implementation 'androidx.fragment:fragment-ktx:1.6.2'
2023-08-21 16:06:16 +03:00
implementation 'androidx.preference:preference-ktx:1.2.1'
2022-03-18 18:16:12 +03:00
2024-01-02 19:52:35 +03:00
implementation 'com.google.android.material:material:1.11.0'
2022-08-31 16:49:43 +03:00
2023-05-30 18:47:13 +03:00
implementation 'com.github.tony19:logback-android:3.0.0'
2022-03-18 18:16:12 +03:00
// testing dependencies
testImplementation "junit:junit:$project.junitVersion"
testImplementation "org.mockito:mockito-core:$project.mockitoVersion"
testImplementation 'android.arch.core:core-testing:1.1.1'
2022-03-04 14:20:01 +03:00
}