mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-27 14:23:18 +03:00
95 lines
2.6 KiB
Groovy
95 lines
2.6 KiB
Groovy
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) {
|
|
flutterVersionCode = '1'
|
|
}
|
|
|
|
def flutterVersionName = localProperties.getProperty('flutter.versionName')
|
|
if (flutterVersionName == null) {
|
|
flutterVersionName = '1.0'
|
|
}
|
|
|
|
def authenticatorVersionCode = 59900
|
|
def authenticatorVersionName = "6.0.0-alpha.2"
|
|
|
|
apply plugin: 'com.android.application'
|
|
apply plugin: 'kotlin-android'
|
|
apply plugin: "org.jetbrains.kotlin.plugin.serialization"
|
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
|
|
|
android {
|
|
|
|
compileSdkVersion flutter.compileSdkVersion
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = '1.8'
|
|
}
|
|
|
|
sourceSets {
|
|
main.java.srcDirs += 'src/main/kotlin'
|
|
}
|
|
|
|
defaultConfig {
|
|
applicationId "com.yubico.yubioath"
|
|
minSdkVersion project.minSdkVersion
|
|
targetSdkVersion project.targetSdkVersion
|
|
versionCode authenticatorVersionCode
|
|
versionName authenticatorVersionName
|
|
}
|
|
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled true
|
|
shrinkResources true
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
lint {
|
|
abortOnError false
|
|
}
|
|
|
|
}
|
|
|
|
apply from: "signing.gradle"
|
|
|
|
flutter {
|
|
source '../..'
|
|
}
|
|
|
|
dependencies {
|
|
api "com.yubico.yubikit:android:$project.yubiKitVersion"
|
|
api "com.yubico.yubikit:management:$project.yubiKitVersion"
|
|
api "com.yubico.yubikit:oath:$project.yubiKitVersion"
|
|
api "com.yubico.yubikit:support:$project.yubiKitVersion"
|
|
|
|
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2'
|
|
|
|
// Lifecycle
|
|
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1"
|
|
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
|
|
|
|
implementation 'androidx.fragment:fragment-ktx:1.4.1'
|
|
|
|
// testing dependencies
|
|
testImplementation "junit:junit:$project.junitVersion"
|
|
testImplementation "org.mockito:mockito-core:$project.mockitoVersion"
|
|
}
|