Skip to content

Commit 7f543b8

Browse files
committed
chore: update SDK constraints and dependencies across all packages to support Dart 3.5.0 and very_good_analysis 10.0.0.
Add workspace configuration in pubspec.yaml files and implement a new clean workspace script. Remove melos.yaml as it is no longer needed.
1 parent 2b84ebd commit 7f543b8

File tree

8 files changed

+123
-21
lines changed

8 files changed

+123
-21
lines changed

maplibre_gl/pubspec.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ description: A Flutter plugin for integrating MapLibre Maps inside a Flutter app
33
version: 0.22.0
44
repository: https://github.com/maplibre/flutter-maplibre-gl
55
issue_tracker: https://github.com/maplibre/flutter-maplibre-gl/issues
6+
resolution: workspace
67

78
environment:
8-
sdk: '>=3.4.0 <4.0.0'
9+
sdk: ">=3.5.0 <4.0.0"
910
flutter: '>=3.22.0'
1011

1112
dependencies:
@@ -15,7 +16,7 @@ dependencies:
1516
maplibre_gl_web: ^0.22.0
1617

1718
dev_dependencies:
18-
very_good_analysis: ^5.0.0
19+
very_good_analysis: ^10.0.0
1920

2021
flutter:
2122
plugin:

maplibre_gl_example/pubspec.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ publish_to: 'none'
44
version: 1.0.0+1
55
repository: https://github.com/maplibre/flutter-maplibre-gl
66
issue_tracker: https://github.com/maplibre/flutter-maplibre-gl/issues
7+
resolution: workspace
78

89
environment:
9-
sdk: '>=3.4.0 <4.0.0'
10+
sdk: ">=3.5.0 <4.0.0"
1011
flutter: '>=3.22.0'
1112

1213
dependencies:
@@ -24,7 +25,7 @@ dependencies:
2425
dev_dependencies:
2526
flutter_test:
2627
sdk: flutter
27-
very_good_analysis: ^5.0.0
28+
very_good_analysis: ^10.0.0
2829

2930
flutter:
3031
uses-material-design: true

maplibre_gl_platform_interface/pubspec.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ description: A common platform interface for the maplibre_gl plugin. This packag
33
version: 0.22.0
44
repository: https://github.com/maplibre/flutter-maplibre-gl
55
issue_tracker: https://github.com/maplibre/flutter-maplibre-gl/issues
6+
resolution: workspace
67

78
environment:
8-
sdk: '>=3.4.0 <4.0.0'
9+
sdk: ">=3.5.0 <4.0.0"
910
flutter: '>=3.22.0'
1011

1112
dependencies:
@@ -16,4 +17,4 @@ dependencies:
1617
dev_dependencies:
1718
flutter_test:
1819
sdk: flutter
19-
very_good_analysis: ^5.0.0
20+
very_good_analysis: ^10.0.0

maplibre_gl_web/pubspec.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ description: Web platform implementation of maplibre_gl. This package is only in
33
version: 0.22.0
44
repository: https://github.com/maplibre/flutter-maplibre-gl
55
issue_tracker: https://github.com/maplibre/flutter-maplibre-gl/issues
6+
resolution: workspace
67

78
environment:
8-
sdk: '>=3.4.0 <4.0.0'
9+
sdk: ">=3.5.0 <4.0.0"
910
flutter: '>=3.22.0'
1011

1112
flutter:
@@ -26,7 +27,7 @@ dependencies:
2627
meta: ^1.3.0
2728

2829
dev_dependencies:
29-
very_good_analysis: ^5.0.0
30+
very_good_analysis: ^10.0.0
3031

3132
platforms:
3233
web:

melos.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

pubspec.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,19 @@ repository: https://github.com/maplibre/flutter-maplibre-gl
44
issue_tracker: https://github.com/maplibre/flutter-maplibre-gl/issues
55

66
environment:
7-
sdk: '>=3.0.0 <4.0.0'
8-
7+
sdk: '>=3.5.0 <4.0.0'
8+
99
dev_dependencies:
1010
melos: ^7.1.1
1111
very_good_analysis: ^10.0.0
1212

13+
workspace:
14+
- scripts
15+
- maplibre_gl
16+
- maplibre_gl_web
17+
- maplibre_gl_example
18+
- maplibre_gl_platform_interface
19+
1320
melos:
1421
scripts:
1522
generate:

scripts/clean_workspace.sh

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
# Workspace root directory (directory of this script's parent)
5+
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. && pwd)"
6+
7+
# Colors
8+
YELLOW='\033[1;33m'
9+
GREEN='\033[0;32m'
10+
RED='\033[0;31m'
11+
NC='\033[0m'
12+
13+
warn() { echo -e "${YELLOW}[clean]${NC} $*"; }
14+
info() { echo -e "${GREEN}[clean]${NC} $*"; }
15+
err() { echo -e "${RED}[clean]${NC} $*" >&2; }
16+
17+
AGGRESSIVE=false
18+
KEEP_PUB_CACHE=false
19+
20+
usage() {
21+
cat <<EOF
22+
Clean Flutter MapLibre multi-package workspace.
23+
24+
Usage: $0 [--aggressive] [--keep-pub-cache]
25+
26+
Options:
27+
--aggressive Also delete generated code, lock files, pod caches and Gradle caches inside the repository.
28+
--keep-pub-cache Do not run 'dart pub cache clean' (saves time if you have limited bandwidth).
29+
-h, --help Show this help.
30+
31+
The script runs for every Flutter/Dart package:
32+
- flutter clean (if Flutter project)
33+
- rm -rf build/ .dart_tool/ .flutter-plugins .flutter-plugins-dependencies
34+
- removes example platform build artifacts (Pods/, DerivedData/) when aggressive.
35+
EOF
36+
}
37+
38+
while [[ $# -gt 0 ]]; do
39+
case "$1" in
40+
--aggressive) AGGRESSIVE=true; shift ;;
41+
--keep-pub-cache) KEEP_PUB_CACHE=true; shift ;;
42+
-h|--help) usage; exit 0 ;;
43+
*) err "Unknown argument: $1"; usage; exit 1 ;;
44+
esac
45+
done
46+
47+
cd "$ROOT_DIR"
48+
49+
PACKAGES=(scripts maplibre_gl maplibre_gl_platform_interface maplibre_gl_web maplibre_gl_example)
50+
51+
# Validate flutter is available
52+
if ! command -v flutter >/dev/null 2>&1; then
53+
err "flutter not found in PATH"; exit 1
54+
fi
55+
56+
if ! command -v dart >/dev/null 2>&1; then
57+
err "dart not found in PATH"; exit 1
58+
fi
59+
60+
for pkg in "${PACKAGES[@]}"; do
61+
if [[ ! -d "$pkg" ]]; then
62+
warn "Skipping missing package $pkg"; continue
63+
fi
64+
info "Cleaning $pkg"
65+
pushd "$pkg" >/dev/null
66+
67+
# Run flutter clean only if pubspec contains 'flutter:' section or directory has android/ or ios/
68+
if grep -q '^flutter:' pubspec.yaml 2>/dev/null || [[ -d android || -d ios || -d macos || -d web ]]; then
69+
(flutter clean || warn "flutter clean failed in $pkg (continuing)")
70+
fi
71+
72+
rm -rf build/ .dart_tool/ .package_config .packages pubspec.lock .flutter-plugins .flutter-plugins-dependencies
73+
74+
if $AGGRESSIVE; then
75+
rm -rf .idea *.iml ios/Pods ios/Podfile.lock macos/Pods macos/Podfile.lock
76+
rm -rf android/.gradle android/build
77+
# Generated Dart code (regenerate later with scripts)
78+
find lib -maxdepth 1 -type f -name "*.g.dart" -delete 2>/dev/null || true
79+
fi
80+
81+
popd >/dev/null
82+
done
83+
84+
if $AGGRESSIVE; then
85+
info "Aggressive clean: removing top-level lock & melos artifacts"
86+
rm -f pubspec.lock
87+
rm -rf .dart_tool/ build/
88+
fi
89+
90+
if ! $KEEP_PUB_CACHE; then
91+
info "Cleaning pub cache (this may take a while)"
92+
dart pub cache clean || warn "Failed to clean pub cache"
93+
fi
94+
95+
info "Done. You can now run: melos bootstrap"

scripts/pubspec.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
name: maplibre_code_gen
2-
description: code generation for flutter-mapbox-gl
2+
description: code generation for flutter-maplibre-gl
33
publish_to: 'none'
4+
resolution: workspace
45

5-
version: 0.0.1
6+
version: 0.22.0
67

78
environment:
8-
sdk: '>=2.12.0 <3.0.0'
9+
sdk: ">=3.5.0 <4.0.0"
910

1011
dependencies:
11-
mustache_template: ^2.0.0
12-
recase: ^4.0.0
12+
mustache_template: ^2.0.1
13+
recase: ^4.1.0
1314

1415
dev_dependencies:
15-
very_good_analysis: ^5.0.0
16+
very_good_analysis: ^10.0.0

0 commit comments

Comments
 (0)