2020-01-01 18:10:13 +00: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 GradleException ( "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'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2020-01-02 23:15:12 +00:00
def keystoreProperties = new Properties ( )
def keystorePropertiesFile = rootProject . file ( 'key.properties' )
if ( keystorePropertiesFile . exists ( ) ) {
keystoreProperties . load ( new FileInputStream ( keystorePropertiesFile ) )
}
2020-01-01 18:10:13 +00:00
android {
compileSdkVersion 28
sourceSets {
main . java . srcDirs + = 'src/main/kotlin'
}
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
applicationId "chat.fluffy.fluffychat"
2020-01-26 11:17:54 +00:00
minSdkVersion 18
2020-01-01 18:10:13 +00:00
targetSdkVersion 28
versionCode flutterVersionCode . toInteger ( )
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2020-02-19 16:23:03 +00:00
externalNativeBuild {
cmake {
arguments "-DOLM_TESTS=NO"
}
}
2020-01-01 18:10:13 +00:00
}
2020-01-02 23:15:12 +00:00
signingConfigs {
release {
2020-01-03 10:47:31 +00:00
if ( keystorePropertiesFile . exists ( ) ) {
keyAlias keystoreProperties [ 'keyAlias' ]
keyPassword keystoreProperties [ 'keyPassword' ]
storeFile file ( keystoreProperties [ 'storeFile' ] )
storePassword keystoreProperties [ 'storePassword' ]
}
2020-01-02 23:15:12 +00:00
}
}
2020-01-01 18:10:13 +00:00
buildTypes {
2020-01-03 10:47:31 +00:00
debug {
signingConfig signingConfigs . debug
}
2020-01-01 18:10:13 +00:00
release {
2020-01-02 23:15:12 +00:00
signingConfig signingConfigs . release
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile ( 'proguard-android.txt' ) , 'proguard-rules.pro'
2020-01-01 18:10:13 +00:00
}
}
2020-02-19 16:23:03 +00:00
externalNativeBuild {
// Encapsulates your CMake build configurations.
cmake {
// Provides a relative path to your CMake build script.
path "../../ios/olm/CMakeLists.txt"
version "3.10.2"
}
}
2020-01-01 18:10:13 +00:00
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
2020-05-09 06:42:01 +00:00
implementation 'com.google.firebase:firebase-messaging:19.0.1' // Workaround for https://github.com/microg/android_packages_apps_GmsCore/issues/313#issuecomment-617651698
2020-01-01 18:10:13 +00:00
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}
2020-01-03 16:23:40 +00:00
2020-05-09 06:42:01 +00:00
apply plugin: "com.google.gms.google-services"