mirror of
https://github.com/krawieck/lemmur/
synced 2024-12-25 07:41:32 +01:00
9f9cc52cf5
* Add logging package * Refresh linux files * Android flavor setup * Setup ios flavors * Setup release CI * Refactor CI * Remove debug prints * Create prod signingConfig only if exists * Store recent logs * Remove flavoring on desktop * Fix android signing * Fix release paths (except windows) * Quote secret var * debug * Fix env vars * Add log console * Add logs section in bug issue template * Add time to logs * Add changelog entry * Rename log console * Remove key * Change way of routing * Add title
108 lines
2.6 KiB
Groovy
108 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 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"
|
|
|
|
android {
|
|
compileSdkVersion 30
|
|
|
|
sourceSets {
|
|
main.java.srcDirs += 'src/main/kotlin'
|
|
}
|
|
|
|
lintOptions {
|
|
disable 'InvalidPackage'
|
|
}
|
|
|
|
defaultConfig {
|
|
applicationId "com.krawieck.lemmur"
|
|
minSdkVersion 16
|
|
targetSdkVersion 30
|
|
versionCode flutterVersionCode.toInteger()
|
|
versionName flutterVersionName
|
|
}
|
|
|
|
signingConfigs {
|
|
dev { }
|
|
|
|
if (System.getenv("ANDROID_STORE_PATH")) {
|
|
prod {
|
|
keyAlias System.getenv("ANDROID_KEY_ALIAS")
|
|
keyPassword System.getenv("ANDROID_KEY_PASSWORD")
|
|
storeFile file(System.getenv("ANDROID_STORE_PATH"))
|
|
storePassword System.getenv("ANDROID_STORE_PASSWORD")
|
|
}
|
|
} else {
|
|
prod { }
|
|
}
|
|
}
|
|
|
|
flavorDimensions "app"
|
|
|
|
productFlavors {
|
|
dev {
|
|
dimension "app"
|
|
applicationIdSuffix ".dev"
|
|
versionNameSuffix "-dev"
|
|
manifestPlaceholders = [
|
|
appName: "lemmur DEV"
|
|
]
|
|
signingConfig signingConfigs.debug
|
|
}
|
|
|
|
prod {
|
|
dimension "app"
|
|
manifestPlaceholders = [
|
|
appName: "lemmur"
|
|
]
|
|
signingConfig signingConfigs.prod
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
testCoverageEnabled true
|
|
debuggable true
|
|
minifyEnabled false
|
|
signingConfig null
|
|
}
|
|
|
|
release {
|
|
debuggable false
|
|
minifyEnabled true
|
|
shrinkResources false
|
|
zipAlignEnabled true
|
|
}
|
|
}
|
|
}
|
|
|
|
flutter {
|
|
source '../..'
|
|
}
|
|
|
|
dependencies {
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
|
}
|