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 flutterRoot = localProperties.getProperty('flutter.sdk')
|
|
|
|
if (flutterRoot == null) {
|
|
|
|
throw new FileNotFoundException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
|
|
|
|
}
|
|
|
|
|
|
|
|
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
|
|
|
if (flutterVersionCode == null) {
|
2022-05-05 14:56:08 +03:00
|
|
|
//noinspection GroovyUnusedAssignment
|
2022-03-04 14:20:01 +03:00
|
|
|
flutterVersionCode = '1'
|
|
|
|
}
|
|
|
|
|
|
|
|
def flutterVersionName = localProperties.getProperty('flutter.versionName')
|
|
|
|
if (flutterVersionName == null) {
|
2022-05-05 14:56:08 +03:00
|
|
|
//noinspection GroovyUnusedAssignment
|
2022-03-04 14:20:01 +03:00
|
|
|
flutterVersionName = '1.0'
|
|
|
|
}
|
|
|
|
|
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
apply plugin: 'kotlin-android'
|
2022-05-05 14:56:08 +03:00
|
|
|
apply plugin: 'kotlinx-serialization'
|
2022-03-04 14:20:01 +03:00
|
|
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
|
|
|
|
|
|
|
android {
|
2022-04-04 18:02:06 +03:00
|
|
|
|
2022-08-03 16:21:39 +03:00
|
|
|
compileSdkVersion 32
|
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-08-04 09:23:07 +03:00
|
|
|
applicationId "com.yubico.yubioath.preview"
|
2022-03-04 14:20:01 +03:00
|
|
|
minSdkVersion project.minSdkVersion
|
|
|
|
targetSdkVersion project.targetSdkVersion
|
2022-05-13 11:46:36 +03:00
|
|
|
versionCode flutterVersionCode.toInteger()
|
|
|
|
versionName flutterVersionName
|
2022-03-04 14:20:01 +03:00
|
|
|
}
|
|
|
|
|
2022-04-08 15:21:09 +03:00
|
|
|
|
2022-03-04 14:20:01 +03:00
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
minifyEnabled true
|
|
|
|
shrinkResources true
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
|
|
}
|
|
|
|
}
|
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-03-04 14:20:01 +03:00
|
|
|
}
|
|
|
|
|
2022-04-05 09:38:57 +03:00
|
|
|
apply from: "signing.gradle"
|
|
|
|
|
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"
|
2022-03-16 17:54:09 +03:00
|
|
|
api "com.yubico.yubikit:support:$project.yubiKitVersion"
|
2022-03-04 14:20:01 +03:00
|
|
|
|
2022-05-05 18:16:38 +03:00
|
|
|
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-core:1.0.0-RC'
|
2022-03-04 14:20:01 +03:00
|
|
|
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2'
|
|
|
|
|
|
|
|
// Lifecycle
|
2022-08-03 16:21:39 +03:00
|
|
|
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
|
2022-05-05 18:16:38 +03:00
|
|
|
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
2022-03-04 14:20:01 +03:00
|
|
|
|
2022-08-19 10:36:45 +03:00
|
|
|
implementation 'androidx.fragment:fragment-ktx:1.5.2'
|
2022-08-03 16:21:39 +03:00
|
|
|
implementation 'androidx.preference:preference-ktx:1.2.0'
|
2022-03-18 18:16:12 +03:00
|
|
|
|
|
|
|
// testing dependencies
|
|
|
|
testImplementation "junit:junit:$project.junitVersion"
|
|
|
|
testImplementation "org.mockito:mockito-core:$project.mockitoVersion"
|
2022-08-19 10:36:45 +03:00
|
|
|
testImplementation 'android.arch.core:core-testing:1.1.1'
|
2022-03-04 14:20:01 +03:00
|
|
|
}
|