Skip to content

Commit

Permalink
feat: das client durchstich (#117)
Browse files Browse the repository at this point in the history
Co-authored-by: u221711 <[email protected]>
  • Loading branch information
Grodien and Grodien authored Jul 16, 2024
1 parent f46d066 commit 62933d6
Show file tree
Hide file tree
Showing 147 changed files with 10,665 additions and 3,037 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/flutter_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
java-version: '17'
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.2'
flutter-version: '3.22.2'
- run: flutter pub get
- run: flutter pub run build_runner build --delete-conflicting-outputs
- run: flutter test
- run: flutter build apk
- run: flutter build appbundle
- run: flutter build ios --release --no-codesign
- run: flutter build apk --flavor dev -t lib/main_dev.dart
- run: flutter build appbundle --flavor dev -t lib/main_dev.dart
- run: flutter build ios --flavor dev -t lib/main_dev.dart --release --no-codesign
2 changes: 1 addition & 1 deletion das_client/.fvm/fvm_config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"flutterSdkVersion": "3.19.2",
"flutterSdkVersion": "3.22.2",
"flavors": {}
}
17 changes: 15 additions & 2 deletions das_client/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ if (flutterVersionName == null) {
}

android {
namespace "com.example.das_client"
namespace "ch.sbb.das"
compileSdk flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
//ndkVersion flutter.ndkVersion
ndkVersion "26.1.10909125"

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand All @@ -50,6 +51,18 @@ android {
versionName flutterVersionName
}

flavorDimensions = ['env']

productFlavors {
dev {
dimension 'env'
applicationIdSuffix '.dev'
manifestPlaceholders += [
'appAuthRedirectScheme': 'ch.sbb.das'
]
}
}

buildTypes {
release {
// TODO: Add your own signing config for the release build.
Expand Down
6 changes: 6 additions & 0 deletions das_client/android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-dontwarn com.google.errorprone.annotations.CanIgnoreReturnValue
-dontwarn com.google.errorprone.annotations.CheckReturnValue
-dontwarn com.google.errorprone.annotations.Immutable
-dontwarn com.google.errorprone.annotations.RestrictedApi
-dontwarn javax.annotation.Nullable
-dontwarn javax.annotation.concurrent.GuardedBy
2 changes: 1 addition & 1 deletion das_client/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:label="das_client"
android:label="DAS Client"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<activity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.das_client
package ch.sbb.das

import io.flutter.embedding.android.FlutterActivity

Expand Down
3 changes: 3 additions & 0 deletions das_client/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
org.gradle.jvmargs=-Xmx4G
android.useAndroidX=true
android.enableJetifier=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
2 changes: 1 addition & 1 deletion das_client/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pluginManagement {

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
id "com.android.application" version '8.4.0' apply false
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
}

Expand Down
1 change: 1 addition & 0 deletions das_client/ios/Flutter/Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
1 change: 1 addition & 0 deletions das_client/ios/Flutter/Release.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
44 changes: 44 additions & 0 deletions das_client/ios/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '12.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!
use_modular_headers!

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
53 changes: 53 additions & 0 deletions das_client/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
PODS:
- AppAuth (1.7.4):
- AppAuth/Core (= 1.7.4)
- AppAuth/ExternalUserAgent (= 1.7.4)
- AppAuth/Core (1.7.4)
- AppAuth/ExternalUserAgent (1.7.4):
- AppAuth/Core
- device_info_plus (0.0.1):
- Flutter
- Flutter (1.0.0)
- flutter_appauth (0.0.1):
- AppAuth (= 1.7.4)
- Flutter
- flutter_secure_storage (6.0.0):
- Flutter
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS

DEPENDENCIES:
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- Flutter (from `Flutter`)
- flutter_appauth (from `.symlinks/plugins/flutter_appauth/ios`)
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)

SPEC REPOS:
trunk:
- AppAuth

EXTERNAL SOURCES:
device_info_plus:
:path: ".symlinks/plugins/device_info_plus/ios"
Flutter:
:path: Flutter
flutter_appauth:
:path: ".symlinks/plugins/flutter_appauth/ios"
flutter_secure_storage:
:path: ".symlinks/plugins/flutter_secure_storage/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin"

SPEC CHECKSUMS:
AppAuth: 182c5b88630569df5acb672720534756c29b3358
device_info_plus: 97af1d7e84681a90d0693e63169a5d50e0839a0d
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_appauth: 1ce438877bc111c5d8f42da47729909290624886
flutter_secure_storage: d33dac7ae2ea08509be337e775f6b59f1ff45f12
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46

PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796

COCOAPODS: 1.13.0
Loading

0 comments on commit 62933d6

Please sign in to comment.