1
0
Signed-off-by: James Ketrenos <james.p.ketrenos@intel.com>
This commit is contained in:
James Ketrenos 2024-12-19 13:41:51 -08:00
parent 41aacd57c7
commit 882875ee95
9 changed files with 37 additions and 1 deletions

2
.gitignore vendored
View File

@ -1,4 +1,6 @@
AndroidSDK
AndroidUser
GradleUser
*/node_modules
*/build
repos

0
GradleUser/.keep Normal file
View File

View File

@ -188,6 +188,7 @@
Files: license_accepter.sh - Copyright 2016-2024 Jing Li from https://github.com/thyrlian/AndroidSDK
Files: * - Copyright 2024 James Ketrenos
Files: projects/** - not covered by this LICENSE file.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View File

@ -93,6 +93,14 @@ docker compose stop "${PROJECT}"
To use virtual devices:
## Build Eikona
```bash
./launch.sh eikona
./shell.sh eikona
./build.sh debug # release, or empty
```
## Install base image
```
@ -106,4 +114,24 @@ avdmanager create avd \
-n Pixel \
-d pixel_6a \
-k "system-images;android-35-ext14;google_apis_playstore;x86_64"
```
## Run the emulator
Launch the development container
```bash
./launch.sh eikona
```
Launch the emulator
```bash
./shell.sh eikona
./emulator.sh Pixel
```
Install the app
```bash
./install.sh debug # or release -- default debug
```

View File

@ -24,6 +24,7 @@ if ! docker compose run -it --rm \
-v $(pwd)/scripts:/scripts \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v $(pwd)/AndroidUser:/root/.android \
-v $(pwd)/GradleUser:/root/.gradle \
-v "${full_path}:/projects/${project}" \
android-dev-container -- \
shell; then

View File

@ -16,6 +16,7 @@ declare full_path=$(realpath "projects/${project}")
if ! docker compose run -it --rm \
--name "${project}-seed" \
-v $(pwd)/AndroidUser:/root/.android \
-v $(pwd)/GradleUser:/root/.gradle \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v "${full_path}:/projects/${project}" \
android-dev-container -- \

1
env.sh
View File

@ -1,4 +1,5 @@
ANDROID_HOME=$(pwd)/AndroidSDK
ANDROID_AVD_HOME=$(pwd)/AndroidUser/avd
ANDROID_USER_HOME=$(pwd)/AndroidUser
GRADLE_HOME=$(pwd)/GradleUser
PATH=$PATH:$ANDROID_HOME/cmdline-tools/tools/bin:$ANDROID_HOME/emulator

View File

@ -26,6 +26,7 @@ if [[ "${project_type}" == "expo" ]]; then
./scripts:/scripts:rw
/tmp/.X11-unix:/tmp/.X11-unix
$(pwd)/AndroidUser:/root/.android
$(pwd)/GradleUser:/root/.gradle
)
fi

View File

@ -14,7 +14,8 @@ fi
declare full_path=$(realpath "projects/${project}")
if ! docker exec -it \
-w "/projects/${project}" \
${project}-seed \
/bin/bash; then
/bin/bash; then
fail "Unable to launch shell in ${project}-seed"
fi