Skip to content

Commit

Permalink
Merge branch 'develop' into TestsRevisited
Browse files Browse the repository at this point in the history
  • Loading branch information
BicaniWolfie authored Dec 5, 2023
2 parents 3afe7be + eaa64d0 commit 7e68480
Show file tree
Hide file tree
Showing 140 changed files with 6,454 additions and 7,143 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/Flutter-Verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Flutter verification
on: [push]

env:
flutter_channel: 'stable'
flutter_version: '3.3.8'
java_version: '12.x'
flutter_channel: "stable"
flutter_version: "3.13.9"
java_version: "17.0.8+101"

jobs:
Android:
Expand All @@ -23,23 +23,23 @@ jobs:
flutter_path: '%USERPROFILE%\hostedtoolcache\flutter'

steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
with:
distribution: "temurin"
java-version: ${{ env.java_version }}
- name: Cache Flutter dependencies
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ${{ matrix.flutter_path }}
key: ${{ runner.os }}-flutter-${{ env.flutter_version }}
- uses: subosito/flutter-action@v1
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.flutter_version }}
channel: ${{ env.flutter_channel }}
path: ${{ matrix.flutter_path }}
- run: flutter pub get
name: Get dependencies

- run: flutter pub upgrade api_client
name: Update api_client

Expand All @@ -48,7 +48,7 @@ jobs:

- run: flutter analyze
name: Linter
- run: flutter test --coverage
- run: flutter test test/blocs test/exceptions test/models test/providers --coverage
name: Tests
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
29 changes: 15 additions & 14 deletions .github/workflows/flutter-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Flutter Android and iOS verification
on: [push]

env:
flutter_channel: 'stable'
flutter_version: '3.3.7'
java_version: '12.x'
flutter_channel: "stable"
flutter_version: "3.13.9"
java_version: "17.0.8+101"

jobs:
Android:
Expand All @@ -23,20 +23,20 @@ jobs:
flutter_path: '%USERPROFILE%\hostedtoolcache\flutter'

steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: ${{ env.java_version }}
- name: Cache Flutter dependencies
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ${{ matrix.flutter_path }}
key: ${{ runner.os }}-flutter-${{ env.flutter_version }}
- uses: subosito/flutter-action@v1
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.flutter_version }}
channel: ${{ env.flutter_channel }}
path: ${{ matrix.flutter_path }}
- run: flutter pub get
name: Get dependencies

Expand All @@ -48,23 +48,24 @@ jobs:
- run: flutter test --coverage
name: Tests
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3

iOS:
name: iOS on macos-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: ${{ env.java_version }}
- uses: subosito/flutter-action@v1
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.flutter_version }}
channel: ${{ env.flutter_channel }}
- name: Set XCode 11.4
- name: Set XCode 15.0.1
run: |
sudo xcode-select -s /Applications/Xcode_11.4.app/Contents/Developer
sudo xcode-select -s /Applications/Xcode_15.0.1.app/Contents/Developer
xcodebuild -version
- uses: Apple-Actions/import-codesign-certs@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# # Android Build and Upload
# build-and-test-android:
# name: Android on ${{ matrix.os }}67
63,95# runs-on: ${{ matrix.os }}
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [ubuntu-latest, windows-latest, macos-latest]
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# Miscellaneous
*.class
*.lock
!pubspec.lock
*.log
*.pyc
*.swp
Expand Down Expand Up @@ -32,6 +31,7 @@
.pub/
build/
coverage/
pubspec.lock

# Android related
**/android/**/gradle-wrapper.jar
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Weekplanner
This repository contains the frontend part of the weekplanner-app, which communicates with the api-client-repository to communicate with the backend (web-api-repository).

The frontend uses the Flutter framework to maintain the UI, it is currently running on Flutter version 3.3.8. The language used in this repository is Dart, which is the language the Flutter framework uses.
The frontend uses the Flutter framework to maintain the UI, it is currently running on Flutter version 3.13.9. The language used in this repository is Dart, which is the language the Flutter framework uses.

# Branches
This repository uses the scaled trunkbased branching strategy, as explained here: [Github setup](https://github.com/aau-giraf/.github/blob/main/wiki/about/github.md). In this repository the "trunk" is named develop, and this is the branch that all developers should branch from when solving an issue. The naming convention for these branches are:
Expand Down
5 changes: 1 addition & 4 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
# Android Studio, and the `flutter analyze` command.

analyzer:
strong-mode:
implicit-dynamic: false
errors:
# treat missing required parameters as a warning (not a hint)
missing_required_param: warning
Expand Down Expand Up @@ -97,12 +95,11 @@ linter:
- hash_and_equals
- implementation_imports
# - invariant_booleans # too many false positives: https://github.com/dart-lang/linter/issues/811
- iterable_contains_unrelated_type
- collection_methods_unrelated_type
# - join_return_with_assignment # not yet tested
- library_names
- library_prefixes
- lines_longer_than_80_chars # not yet tested
- list_remove_unrelated_type
# - literal_only_boolean_expressions # too many false positives: https://github.com/dart-lang/sdk/issues/34181
- no_adjacent_strings_in_list
- no_duplicate_case_values
Expand Down
4 changes: 2 additions & 2 deletions assets/environments.dev.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"SERVER_HOST": "https://srv.giraf.cs.aau.dk/DEV/API",
"SERVER_HOST": "http://127.0.0.1:5050",
"DEBUG": true,
"USERNAME": "Guardian-dev",
"PASSWORD": "password2"
"PASSWORD": "password"
}
19 changes: 11 additions & 8 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -165,7 +165,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1430;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -209,10 +209,12 @@
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
Expand All @@ -223,6 +225,7 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down Expand Up @@ -366,7 +369,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5;
DEVELOPMENT_TEAM = 3PDH9946T4;
DEVELOPMENT_TEAM = 8PBZ9JSKA9;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -381,7 +384,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = dk.girafsvenner.weekplanner;
PRODUCT_BUNDLE_IDENTIFIER = jcs.weekplanner;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
Expand Down Expand Up @@ -504,7 +507,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5;
DEVELOPMENT_TEAM = 3PDH9946T4;
DEVELOPMENT_TEAM = 8PBZ9JSKA9;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -519,7 +522,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = dk.girafsvenner.weekplanner;
PRODUCT_BUNDLE_IDENTIFIER = jcs.weekplanner;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand All @@ -538,7 +541,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5;
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = 8PBZ9JSKA9;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -553,7 +556,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = dk.girafsvenner.weekplanner;
PRODUCT_BUNDLE_IDENTIFIER = jcs.weekplanner;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
10 changes: 6 additions & 4 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
Expand All @@ -24,8 +26,12 @@
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSCameraUsageDescription</key>
<string>Appen kræver adgang til dit kamera for at oprette nye piktogrammer.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Appen kræver adgang til dit fotobibliotek for at oprette nye piktogrammer.</string>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
Expand All @@ -49,11 +55,7 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>NSCameraUsageDescription</key>
<string>Appen kræver adgang til dit kamera for at oprette nye piktogrammer.</string>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
</dict>
</plist>
5 changes: 1 addition & 4 deletions ios/Runner/Runner.entitlements
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
</dict>
<dict/>
</plist>
10 changes: 5 additions & 5 deletions lib/api/errorcode_translator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ApiErrorTranslator {
builder: (BuildContext context) {
return GirafNotifyDialog(
title: 'Fejl',
description: getErrorMessage(error),
description: getErrorMessage(error as ApiException),
key: const Key('ErrorMessageDialog'));
});
}
Expand All @@ -30,14 +30,14 @@ class ApiErrorTranslator {
// Undefined errors, the message is in english
// as we cant predict why it was cast
return 'message: ' +
error.errorMessage +
(error.errorMessage ?? 'No error message provided') +
'\nDetails: ' +
error.errorDetails;
(error.errorDetails ?? 'No error details provided');
default:
return 'Fejl: ' +
error.errorMessage +
(error.errorMessage ?? 'No error message provided') +
'\nDetails: ' +
error.errorDetails;
(error.errorDetails ?? 'No error details provided');
}
}
}
Loading

0 comments on commit 7e68480

Please sign in to comment.