From 882875ee9573fce007bab3559a24b86e5f244da3 Mon Sep 17 00:00:00 2001 From: James Ketrenos Date: Thu, 19 Dec 2024 13:41:51 -0800 Subject: [PATCH] Working Signed-off-by: James Ketrenos --- .gitignore | 2 ++ GradleUser/.keep | 0 LICENSE | 1 + README.md | 28 ++++++++++++++++++++++++++++ debug.sh | 1 + develop.sh | 1 + env.sh | 1 + launch.sh | 1 + shell.sh | 3 ++- 9 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 GradleUser/.keep diff --git a/.gitignore b/.gitignore index 3358261..b060934 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ AndroidSDK +AndroidUser +GradleUser */node_modules */build repos diff --git a/GradleUser/.keep b/GradleUser/.keep new file mode 100644 index 0000000..e69de29 diff --git a/LICENSE b/LICENSE index 05d1894..7e5c81f 100644 --- a/LICENSE +++ b/LICENSE @@ -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. diff --git a/README.md b/README.md index a3b2a55..72ec27d 100644 --- a/README.md +++ b/README.md @@ -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 ``` \ No newline at end of file diff --git a/debug.sh b/debug.sh index 462bac5..2a127f1 100755 --- a/debug.sh +++ b/debug.sh @@ -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 diff --git a/develop.sh b/develop.sh index 8eb146b..10dfa2b 100755 --- a/develop.sh +++ b/develop.sh @@ -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 -- \ diff --git a/env.sh b/env.sh index d9fd8f1..f4f7624 100644 --- a/env.sh +++ b/env.sh @@ -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 diff --git a/launch.sh b/launch.sh index 093ae03..52302e4 100755 --- a/launch.sh +++ b/launch.sh @@ -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 diff --git a/shell.sh b/shell.sh index a05f78a..81b5fab 100755 --- a/shell.sh +++ b/shell.sh @@ -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