devbox setup, dep upgrades, lint fixes, Android build fixes
- Add devbox.json pinning Flutter 3.35.7, Android SDK (Nix flake), openjdk17, just, openssl - Add android/nix-android-sdk/ Nix flake + flake.lock + Android Studio config script - Add justfile with build/get/upgrade/icons/analyze/rebuild recipes - flutter pub upgrade --major-versions: file_picker ^11, google_fonts ^8, permission_handler ^12, share_plus ^12, flutter_lints ^6 (+71 transitive) - Fix file_picker v11 API: FilePicker.platform → FilePicker.getDirectoryPath() - Fix all 37 analyzer issues: deprecated APIs (window, WillPopScope, Share, SvgPicture color), async BuildContext guards, key constructors, private createState() return types, unused locals, print → debugPrint, etc. - Hook _handleCommand into onSubmitted for : prefix commands - Android: Gradle 8.3→8.11.1, AGP 8.2.2→8.9.1, KGP 1.8.22→2.2.20, compileSdk/targetSdk 34→36, namespace auto-derivation for library modules, kotlin.compiler.execution.strategy=in-process Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
9dbd638fa8
commit
fc6c69db24
19 changed files with 1287 additions and 383 deletions
59
android/nix-android-sdk/android-studio-devbox-config.sh
Executable file
59
android/nix-android-sdk/android-studio-devbox-config.sh
Executable file
|
|
@ -0,0 +1,59 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd -- "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_DIR="$(cd -- "$SCRIPT_DIR/../.." && pwd)"
|
||||
IDEA_DIR="$PROJECT_DIR/.idea"
|
||||
LIBRARIES_DIR="$IDEA_DIR/libraries"
|
||||
FLUTTER_SDK="$PROJECT_DIR/.devbox/nix/profile/default"
|
||||
DART_SDK="$FLUTTER_SDK/bin/cache/dart-sdk"
|
||||
|
||||
mkdir -p "$IDEA_DIR"
|
||||
if [ ! -x "$FLUTTER_SDK/bin/flutter" ]; then
|
||||
echo "Flutter not found at $FLUTTER_SDK/bin/flutter. Run devbox install to download it." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "$DART_SDK" ]; then
|
||||
echo "Dart SDK not found at $DART_SDK. Run flutter doctor to populate the cache." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p "$LIBRARIES_DIR"
|
||||
|
||||
cat > "$IDEA_DIR/flutter.xml" <<'EOF'
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="FlutterSdkSettings">
|
||||
<option name="FLUTTER_SDK_PATH" value="$PROJECT_DIR$/.devbox/nix/profile/default" />
|
||||
</component>
|
||||
</project>
|
||||
EOF
|
||||
|
||||
cat > "$IDEA_DIR/dart.xml" <<'EOF'
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DartSdkGlobalLibSettings">
|
||||
<option name="dartSdkPath" value="$PROJECT_DIR$/.devbox/nix/profile/default/bin/cache/dart-sdk" />
|
||||
</component>
|
||||
</project>
|
||||
EOF
|
||||
|
||||
dart_libs=$(find "$DART_SDK/lib" -maxdepth 1 -mindepth 1 -type d -printf '%f\n' | sort)
|
||||
tmp_file=$(mktemp)
|
||||
{
|
||||
echo '<component name="libraryTable">'
|
||||
echo ' <library name="Dart SDK">'
|
||||
echo ' <CLASSES>'
|
||||
for lib in $dart_libs; do
|
||||
printf ' <root url="file://$PROJECT_DIR$/.devbox/nix/profile/default/bin/cache/dart-sdk/lib/%s" />\n' "$lib"
|
||||
done
|
||||
echo ' </CLASSES>'
|
||||
echo ' <JAVADOC />'
|
||||
echo ' <SOURCES />'
|
||||
echo ' </library>'
|
||||
echo '</component>'
|
||||
} > "$tmp_file"
|
||||
mv "$tmp_file" "$LIBRARIES_DIR/Dart_SDK.xml"
|
||||
|
||||
echo "Android Studio configured. Flutter SDK: $FLUTTER_SDK"
|
||||
Loading…
Add table
Add a link
Reference in a new issue