Files
GitJournal/android/app/build.gradle
Vishesh Handa 3e6c05a552 Revert "Revert "android: Move to new gradle setup""
This reverts commit 8a870911762fce95f3d2de0d8b81c0f163e191cf.
2024-09-06 09:59:56 +02:00

92 lines
2.4 KiB
Groovy

// SPDX-FileCopyrightText: 2019-2021 Vishesh Handa <me@vhanda.in>
//
// SPDX-License-Identifier: Apache-2.0
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('secrets/key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
if (!keystoreProperties.containsKey('keyAlias')) {
// to simplify local development
keystoreProperties['keyAlias'] = 'local'
keystoreProperties['keyPassword'] = 'local'
keystoreProperties['storeFile'] = 'local'
keystoreProperties['storePassword'] = 'local'
}
android {
compileSdkVersion flutter.compileSdkVersion
lintOptions {
disable 'InvalidPackage'
checkReleaseBuilds false
}
defaultConfig {
applicationId "io.gitjournal.gitjournal"
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutter.versionCode
versionName flutter.versionName
// testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
flavorDimensions "app"
productFlavors {
prod {
dimension "app"
}
dev {
dimension "app"
applicationIdSuffix ".dev"
versionNameSuffix "-dev"
}
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
ndk {
abiFilters 'arm64-v8a', 'armeabi-v7a'
}
}
debug {
ndk {
abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86', 'x86_64'
}
}
}
dexOptions {
preDexLibraries true
jumboMode true
javaMaxHeapSize "12g"
}
}
flutter {
source '../..'
}
// Are these required?
// dependencies {
// testImplementation 'junit:junit:4.12'
// androidTestImplementation 'androidx.test:runner:1.1.0'
// androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
// }