fix: build Android against the devbox-managed JDK and NDK
This commit is contained in:
parent
8426818712
commit
ac998b394d
5 changed files with 35 additions and 2 deletions
|
|
@ -2,6 +2,7 @@
|
|||
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/main/schema/schemas/devbox.schema.json",
|
||||
"packages": {
|
||||
"flutter@3.41.9-sdk-links": {},
|
||||
"nixpkgs#openjdk17": {},
|
||||
"path:./nix-android-sdk#android-sdk": {},
|
||||
"gtk3": {},
|
||||
"clang": {},
|
||||
|
|
@ -10,10 +11,15 @@
|
|||
"pkg-config": {},
|
||||
"patchelf": {}
|
||||
},
|
||||
"env": {
|
||||
"ANDROID_HOME": "$DEVBOX_PACKAGES_DIR/share/android-sdk",
|
||||
"ANDROID_SDK_ROOT": "$DEVBOX_PACKAGES_DIR/share/android-sdk"
|
||||
},
|
||||
"shell": {
|
||||
"init_hook": [
|
||||
"export PKG_CONFIG_PATH=\"$PWD/.devbox/nix/profile/default/lib/pkgconfig:$PKG_CONFIG_PATH\"",
|
||||
"export LD_LIBRARY_PATH=\"$PWD/.devbox/nix/profile/default/lib:$LD_LIBRARY_PATH\""
|
||||
"export LD_LIBRARY_PATH=\"$PWD/.devbox/nix/profile/default/lib:$LD_LIBRARY_PATH\"",
|
||||
"flutter config --jdk-dir \"$(dirname \"$(dirname \"$(command -v java)\")\")\" > /dev/null"
|
||||
],
|
||||
"scripts": {
|
||||
"analyze": "cd app && flutter analyze",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue