Skip to content

Commit

Permalink
Update dependencies and configuration files
Browse files Browse the repository at this point in the history
  • Loading branch information
gaetschwartz committed Dec 20, 2023
1 parent 94d6d0b commit ab8f2d1
Show file tree
Hide file tree
Showing 16 changed files with 809 additions and 607 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_STORE
app/metrics
app/.fvm/flutter_sdk
.puro
29 changes: 29 additions & 0 deletions .idea/libraries/Dart_SDK.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions .idea/libraries/Dart_SDK.xml.bak

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

529 changes: 266 additions & 263 deletions .idea/swift_travel.iml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"terminal.integrated.cwd": "app/",
"build-runner.commandToUse": "flutter",
"dart.flutterSdkPath": "/Users/gaetan/.puro/envs/beta/flutter",
"dart.sdkPath": "/Users/gaetan/.puro/envs/beta/flutter/bin/cache/dart-sdk"
}
"dart.flutterSdkPath": ".puro/",
"dart.sdkPath": ".puro/"
}
6 changes: 6 additions & 0 deletions .vscode/settings.json.tmp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"terminal.integrated.cwd": "app/",
"build-runner.commandToUse": "flutter",
"dart.flutterSdkPath": ".puro/",
"dart.sdkPath": ".puro/"
}
38 changes: 38 additions & 0 deletions CI/use.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
APP_DIR=$(dirname "$SCRIPT_DIR")
# first arg is the version
VERSION=$1

# ccheck if $PURO_ROOT is not set or not valid
if [ -z "$PURO_ROOT" ] || [ ! -d "$PURO_ROOT" ]; then
echo "PURO_ROOT not set or not valid: \"$PURO_ROOT\", falling back to looking for puro executable"
PURO_EXE=$(command -v puro)
if [ -z "$PURO_EXE" ]; then
echo "puro not found"
exit 1
fi
PURO_ROOT=$(dirname "$(dirname "$PURO_EXE")")
fi

ln -s -f "$PURO_ROOT" "$APP_DIR/.puro"
if [ $? -ne 0 ]; then
echo "Failed to create symlink"
exit 1
fi
echo "Created symlink to $PURO_ROOT at $APP_DIR/.puro"

# if provided, use puro use <version>
if [ -n "$VERSION" ]; then
"$PURO_ROOT/.puro/bin/puro" use "$VERSION" --project "$APP_DIR"
fi

# update .vscode/settings.json to replace PURO_ROOT with $APP_DIR/.puro using jq in dart.flutterSdkPath and dart.sdkPath
NEW_SETTINGS=$(jq --arg PURO_ROOT ".puro/" '.["dart.flutterSdkPath"] = $PURO_ROOT | .["dart.sdkPath"] = $PURO_ROOT' "$APP_DIR/.vscode/settings.json")
# print changes using git diff with color without header (tail)
echo "$NEW_SETTINGS" | git diff --no-index --color=always --no-prefix -- "$APP_DIR/.vscode/settings.json" - | tail -n +6
# write changes to settings.json
echo "$NEW_SETTINGS" > "$APP_DIR/.vscode/settings.json"



10 changes: 8 additions & 2 deletions app/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
PODS:
- blurhash (0.0.1):
- Flutter
- contacts_service (0.2.2):
- Flutter
- Flutter (1.0.0)
Expand Down Expand Up @@ -31,6 +33,7 @@ PODS:
- Flutter

DEPENDENCIES:
- blurhash (from `.symlinks/plugins/blurhash/ios`)
- contacts_service (from `.symlinks/plugins/contacts_service/ios`)
- Flutter (from `Flutter`)
- geolocator_apple (from `.symlinks/plugins/geolocator_apple/ios`)
Expand All @@ -47,6 +50,8 @@ DEPENDENCIES:
- vibration (from `.symlinks/plugins/vibration/ios`)

EXTERNAL SOURCES:
blurhash:
:path: ".symlinks/plugins/blurhash/ios"
contacts_service:
:path: ".symlinks/plugins/contacts_service/ios"
Flutter:
Expand Down Expand Up @@ -77,6 +82,7 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/vibration/ios"

SPEC CHECKSUMS:
blurhash: 7f29ee116e0c2674e0a765b5df1f9767239bc279
contacts_service: 849e1f84281804c8bfbec1b4c3eedcb23c5d3eca
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
geolocator_apple: cc556e6844d508c95df1e87e3ea6fa4e58c50401
Expand All @@ -89,9 +95,9 @@ SPEC CHECKSUMS:
quick_actions_ios: 9e80dcfadfbc5d47d9cf8f47bcf428b11cf383d4
share_plus: c3fef564749587fc939ef86ffb283ceac0baf9f5
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
url_launcher_ios: bf5ce03e0e2088bad9cc378ea97fa0ed5b49673b
vibration: 08bf1a7e0b797d662a5027a161404fdcbe3ba168

PODFILE CHECKSUM: c2f5eab10adc40802bef95ae8af627252e1ac283

COCOAPODS: 1.13.0
COCOAPODS: 1.14.3
14 changes: 6 additions & 8 deletions app/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,12 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1240;
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1430;
ORGANIZATIONNAME = "The Chromium Authors";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1;
DevelopmentTeam = Y2PPW6ETTC;
LastSwiftMigration = 1100;
ProvisioningStyle = Automatic;
};
};
};
Expand Down Expand Up @@ -221,6 +219,7 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/blurhash/blurhash.framework",
"${BUILT_PRODUCTS_DIR}/contacts_service/contacts_service.framework",
"${BUILT_PRODUCTS_DIR}/geolocator_apple/geolocator_apple.framework",
"${BUILT_PRODUCTS_DIR}/in_app_purchase_storekit/in_app_purchase_storekit.framework",
Expand All @@ -236,6 +235,7 @@
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/blurhash.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/contacts_service.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/geolocator_apple.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/in_app_purchase_storekit.framework",
Expand Down Expand Up @@ -577,11 +577,10 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = Y2PPW6ETTC;
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = Y2PPW6ETTC;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -600,8 +599,7 @@
MARKETING_VERSION = 1.0.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.gaetanschwartz.swift-travel";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "Swift Travel v4.2";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "Swift Travel v5.2";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
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
18 changes: 8 additions & 10 deletions app/lib/logic/location/location.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,15 @@ class GeoLocationEngine {

if (lastKnown != null) {
final timestamp = lastKnown.timestamp;
if (timestamp != null) {
final now = DateTime.now();
final seconds = now.difference(timestamp).inSeconds;
final condition = seconds < 60;
log.log(
"Obtained last known position which was ${seconds}s ago which is ${condition ? 'valid' : 'too old'}.",
);
final now = DateTime.now();
final seconds = now.difference(timestamp).inSeconds;
final condition = seconds < 60;
log.log(
"Obtained last known position which was ${seconds}s ago which is ${condition ? 'valid' : 'too old'}.",
);

if (condition) {
return GeoLocation.fromPosition(lastKnown);
}
if (condition) {
return GeoLocation.fromPosition(lastKnown);
}
}

Expand Down
Loading

0 comments on commit ab8f2d1

Please sign in to comment.