mirror of
https://github.com/wger-project/flutter.git
synced 2026-11-28 17:08:29 +01:00
89 lines
2.5 KiB
Groovy
89 lines
2.5 KiB
Groovy
plugins {
|
|
id "com.android.application"
|
|
id "dev.flutter.flutter-gradle-plugin"
|
|
}
|
|
|
|
def localProperties = new Properties()
|
|
def localPropertiesFile = rootProject.file('local.properties')
|
|
if (localPropertiesFile.exists()) {
|
|
localPropertiesFile.withReader('UTF-8') { reader ->
|
|
localProperties.load(reader)
|
|
}
|
|
}
|
|
|
|
|
|
// Keys for the android play store
|
|
def keystoreProperties = new Properties()
|
|
def keystorePropertiesFile = rootProject.file('../fastlane/metadata/envfiles/key.properties')
|
|
if (keystorePropertiesFile.exists()) {
|
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
|
}
|
|
|
|
|
|
android {
|
|
namespace = "de.wger.flutter"
|
|
compileSdk = 37
|
|
compileSdkMinor = 0
|
|
ndkVersion "28.2.13676358"
|
|
|
|
buildFeatures {
|
|
resValues = true
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_17
|
|
targetCompatibility JavaVersion.VERSION_17
|
|
// Required by flutter_local_notifications
|
|
coreLibraryDesugaringEnabled true
|
|
}
|
|
|
|
|
|
defaultConfig {
|
|
// Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
|
applicationId "de.wger.flutter"
|
|
minSdkVersion 26
|
|
targetSdk = flutter.targetSdkVersion
|
|
versionCode = flutter.versionCode
|
|
versionName = flutter.versionName
|
|
|
|
// Overridden by the debug build type. Set here rather than per build
|
|
// type so the profile variant has it as well
|
|
resValue "string", "app_name", "wger"
|
|
}
|
|
|
|
signingConfigs {
|
|
release {
|
|
keyAlias keystoreProperties['keyAlias']
|
|
keyPassword keystoreProperties['keyPassword']
|
|
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
|
|
storePassword keystoreProperties['storePassword']
|
|
}
|
|
}
|
|
buildTypes {
|
|
release {
|
|
signingConfig signingConfigs.release
|
|
}
|
|
debug {
|
|
// Own application id and name, so a debug build can sit next to the
|
|
// installed release one on the same device. The launcher icon keeps
|
|
// the wger logo on a different background, see src/debug/res
|
|
applicationIdSuffix ".debug"
|
|
resValue "string", "app_name", "wger - debug"
|
|
}
|
|
}
|
|
}
|
|
|
|
kotlin {
|
|
compilerOptions {
|
|
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
|
|
}
|
|
}
|
|
|
|
flutter {
|
|
source '../..'
|
|
}
|
|
|
|
dependencies {
|
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.4'
|
|
}
|