Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"version": "0.2.0",
"configurations": [
{
"name": "Launch development",
"name": "Debug mode (development flavor)",
"request": "launch",
"type": "dart",
"program": "lib/main.dart",
Expand All @@ -17,18 +17,17 @@
]
},
{
"name": "Launch staging",
"name": "Release mode (development flavor)",
"request": "launch",
"type": "dart",
"program": "lib/main.dart",
"args": ["--flavor", "staging", "--target", "lib/main.dart"]
},
{
"name": "Launch production (release)",
"request": "launch",
"type": "dart",
"program": "lib/main.dart",
"args": ["--release", "--flavor", "production", "--target", "lib/main.dart"]
"args": [
"--release",
"--flavor",
"development",
"--target",
"lib/main.dart"
]
}
]
}
}
17 changes: 5 additions & 12 deletions android/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import java.util.Properties
import java.io.FileInputStream
import java.util.Properties

plugins {
id("com.android.application")
Expand All @@ -10,6 +10,7 @@ plugins {

val keystoreProperties = Properties()
val keystorePropertiesFile = rootProject.file("key.properties")

if (keystorePropertiesFile.exists()) {
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
}
Expand All @@ -24,9 +25,7 @@ android {
targetCompatibility = JavaVersion.VERSION_11
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
kotlinOptions { jvmTarget = JavaVersion.VERSION_11.toString() }

defaultConfig {
applicationId = "dk.cafeanalog.cafe_analog_app"
Expand All @@ -45,7 +44,6 @@ android {
keyAlias = System.getenv("ANDROID_KEYSTORE_ALIAS")
keyPassword = System.getenv("ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD")
storePassword = System.getenv("ANDROID_KEYSTORE_PASSWORD")

} else {
keyAlias = keystoreProperties["keyAlias"] as String?
keyPassword = keystoreProperties["keyPassword"] as String?
Expand All @@ -60,17 +58,12 @@ android {
create("production") {
dimension = "default"
applicationIdSuffix = ""
manifestPlaceholders["appName"] = "Router Test App"
}
create("staging") {
dimension = "default"
applicationIdSuffix = ".stg"
manifestPlaceholders["appName"] = "[STG] Router Test App"
manifestPlaceholders["appName"] = "Analog"
}
create("development") {
dimension = "default"
applicationIdSuffix = ".dev"
manifestPlaceholders["appName"] = "[DEV] Router Test App"
manifestPlaceholders["appName"] = "[DEV] Analog"
}
}

Expand Down
3 changes: 2 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data android:scheme="cafeanalog" />
<data android:scheme="${deepLinkScheme}" />
<data android:host="cafeanalog.dk" />

<data android:pathPrefix="/login/" />
<data android:pathPrefix="/claim-voucher/" />
<data android:pathPrefix="/verify-mobilepay/" />
</intent-filter>
Expand Down
2 changes: 2 additions & 0 deletions ios/Flutter/Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
#include "Flavors.xcconfig"
19 changes: 19 additions & 0 deletions ios/Flutter/Flavors.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Flavor-specific settings
// This file is included from Debug.xcconfig and Release.xcconfig
// and uses conditional variable expansion based on FLAVOR

// Default values (production)
DEEP_LINK_SCHEME = cafeanalog
FLAVOR_APP_NAME = Analog

// Override for development
DEEP_LINK_SCHEME[config=Debug-development] = cafeanalog-dev
DEEP_LINK_SCHEME[config=Release-development] = cafeanalog-dev
FLAVOR_APP_NAME[config=Debug-development] = [DEV] Analog
FLAVOR_APP_NAME[config=Release-development] = [DEV] Analog

// Override for production
DEEP_LINK_SCHEME[config=Debug-production] = cafeanalog
DEEP_LINK_SCHEME[config=Release-production] = cafeanalog
FLAVOR_APP_NAME[config=Debug-production] = Analog
FLAVOR_APP_NAME[config=Release-production] = Analog
2 changes: 2 additions & 0 deletions ios/Flutter/Release.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
#include "Flavors.xcconfig"
43 changes: 43 additions & 0 deletions ios/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '13.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}

def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end

File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
use_frameworks!

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end

post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
23 changes: 23 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
PODS:
- Flutter (1.0.0)
- flutter_secure_storage_darwin (10.0.0):
- Flutter
- FlutterMacOS

DEPENDENCIES:
- Flutter (from `Flutter`)
- flutter_secure_storage_darwin (from `.symlinks/plugins/flutter_secure_storage_darwin/darwin`)

EXTERNAL SOURCES:
Flutter:
:path: Flutter
flutter_secure_storage_darwin:
:path: ".symlinks/plugins/flutter_secure_storage_darwin/darwin"

SPEC CHECKSUMS:
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
flutter_secure_storage_darwin: acdb3f316ed05a3e68f856e0353b133eec373a23

PODFILE CHECKSUM: 3c63482e143d1b91d2d2560aee9fb04ecc74ac7e

COCOAPODS: 1.16.2
Loading