From 5fcf975166c8de78b737407eb2e06dc3d2aef41b Mon Sep 17 00:00:00 2001 From: Raunak Raj <71929976+bajrangCoder@users.noreply.github.com> Date: Fri, 16 Jan 2026 13:36:06 +0530 Subject: [PATCH 1/4] feat: improve DevContainer and Docker support for easier dev setup - Add comprehensive CONTRIBUTING.md with setup options - DockerFile - dev container stuffs --- .devcontainer/Dockerfile | 70 +++++++++++++ .devcontainer/devcontainer.json | 83 ++++++++------- .dockerignore | 24 +++++ CONTRIBUTING.md | 173 ++++++++++++++++++++++++++++++++ bun.lock | 1 + readme.md | 55 ++-------- 6 files changed, 323 insertions(+), 83 deletions(-) create mode 100644 .devcontainer/Dockerfile create mode 100644 .dockerignore create mode 100644 CONTRIBUTING.md diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000..3d3682838 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,70 @@ +# Acode Development Container (Manual Docker Build) + +FROM mcr.microsoft.com/devcontainers/base:ubuntu-22.04 + +ARG ANDROID_SDK_VERSION=35 +ARG ANDROID_BUILD_TOOLS_VERSION=35.0.0 +ARG NODE_MAJOR=22 + +ENV ANDROID_HOME=/opt/android-sdk +ENV ANDROID_SDK_ROOT=/opt/android-sdk +ENV PATH="${PATH}:${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/platform-tools:${ANDROID_HOME}/build-tools/${ANDROID_BUILD_TOOLS_VERSION}" + +# Install essential packages +RUN apt-get update && apt-get install -y --no-install-recommends \ + curl \ + wget \ + unzip \ + git \ + ca-certificates \ + gnupg \ + && rm -rf /var/lib/apt/lists/* + +# Install Java 21 (Temurin JDK) +RUN curl -fsSL https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor -o /usr/share/keyrings/adoptium.gpg \ + && echo "deb [signed-by=/usr/share/keyrings/adoptium.gpg] https://packages.adoptium.net/artifactory/deb $(lsb_release -cs) main" > /etc/apt/sources.list.d/adoptium.list \ + && apt-get update \ + && apt-get install -y --no-install-recommends temurin-21-jdk \ + && rm -rf /var/lib/apt/lists/* + +# Set JAVA_HOME dynamically based on installed JDK +RUN JAVA_DIR=$(dirname $(dirname $(readlink -f $(which java)))) \ + && echo "export JAVA_HOME=$JAVA_DIR" >> /etc/profile.d/java.sh \ + && echo "export JAVA_HOME=$JAVA_DIR" >> ~/.bashrc +ENV JAVA_HOME=/usr/lib/jvm/temurin-21-jdk-arm64 + +# Install Node.js via NodeSource +RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_MAJOR}.x | bash - \ + && apt-get install -y nodejs \ + && rm -rf /var/lib/apt/lists/* + +# Install pnpm +RUN npm install -g pnpm + +# Install Android SDK command-line tools +RUN mkdir -p ${ANDROID_HOME}/cmdline-tools \ + && cd ${ANDROID_HOME}/cmdline-tools \ + && wget -q https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -O cmdline-tools.zip \ + && unzip -q cmdline-tools.zip \ + && rm cmdline-tools.zip \ + && mv cmdline-tools latest + +# Accept Android SDK licenses and install required components +RUN yes | ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --licenses 2>/dev/null || true \ + && ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --update \ + && ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager \ + "platform-tools" \ + "platforms;android-${ANDROID_SDK_VERSION}" \ + "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" + +# Install Gradle +ARG GRADLE_VERSION=8.11 +RUN wget -q https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip -O /tmp/gradle.zip \ + && unzip -q /tmp/gradle.zip -d /opt \ + && rm /tmp/gradle.zip \ + && ln -s /opt/gradle-${GRADLE_VERSION}/bin/gradle /usr/local/bin/gradle + +WORKDIR /workspaces/acode + +LABEL maintainer="Acode Foundation" +LABEL description="Development environment for building Acode - Code Editor for Android" diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index d9ca0947b..5d54c6967 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,43 +1,58 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the // README at: https://github.com/devcontainers/templates/tree/main/src/java { - "name": "Java", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/java:1-21-bullseye", + "name": "Acode Development", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/java:1-21-bullseye", - "features": { - "ghcr.io/devcontainers/features/java:1": { - "installGradle": true, - "installGroovy": false, - "installMaven": false, - "installAnt": false, - "version": "21", - "jdkDistro": "ms", - "gradleVersion": "latest", - "mavenVersion": "none" - }, - "ghcr.io/nordcominc/devcontainer-features/android-sdk:1": { - "platform": "35", - "build_tools": "35.0.0" - }, - "ghcr.io/devcontainers/features/node:1": { - "nodeGypDependencies": false, - "installYarnUsingApt": false, - "version": "lts", - "pnpmVersion": "latest", - "nvmVersion": "latest" - } - } + "features": { + "ghcr.io/devcontainers/features/java:1": { + "installGradle": true, + "installGroovy": false, + "installMaven": false, + "installAnt": false, + "version": "21", + "jdkDistro": "ms", + "gradleVersion": "latest", + "mavenVersion": "none", + }, + "ghcr.io/nordcominc/devcontainer-features/android-sdk:1": { + "platform": "35", + "build_tools": "35.0.0", + }, + "ghcr.io/devcontainers/features/node:1": { + "nodeGypDependencies": false, + "installYarnUsingApt": false, + "version": "lts", + "pnpmVersion": "latest", + "nvmVersion": "latest", + }, + }, - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], + "postCreateCommand": "pnpm run setup", - // Use 'postCreateCommand' to run commands after the container is created. - // "postCreateCommand": "java -version", + "customizations": { + "vscode": { + "extensions": ["biomejs.biome", "redhat.java"], + "settings": { + "editor.formatOnSave": true, + "editor.defaultFormatter": "biomejs.biome", + "[java]": { + "editor.defaultFormatter": "redhat.java", + }, + }, + }, + }, - // Configure tool-specific properties. - // "customizations": {}, + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "java -version", + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" } diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..56e1f21c5 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,24 @@ +# Dependencies +node_modules/ +.pnpm-store/ + +# Build outputs +platforms/ +plugins/ +www/css/build/ +www/js/build/ + +# IDE +.vscode/ +.idea/ + +# Git +.git/ +.gitignore + +# Misc +*.log +*.apk +*.aab +.DS_Store +Thumbs.db diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..52e080657 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,173 @@ +# Contributing to Acode + +Thank you for your interest in contributing to Acode! This guide will help you get started with development. + +## Quick Start Options + +### Option 1: DevContainer (Recommended) + +1. Install the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) in VS Code or other editors that support DevContainers. + +2. Clone and open the repository: + ```bash + git clone https://github.com/Acode-Foundation/Acode.git + code Acode + ``` + +3. When VS Code prompts "Reopen in Container", click it + - Or use Command Palette (Cmd/Ctrl+Shift+P) → "Dev Containers: Reopen in Container" + +4. Wait for the container to build (~5-10 minutes first time, subsequent opens are instant) + +5. Once ready, build the APK: + ```bash + pnpm run build paid dev apk + ``` + + > Use any package manager (pnpm, bun, npm, yarn, etc.) + +### Option 2: Docker CLI (For Any Editor) + +If your editor doesn't support DevContainers, you can use Docker directly: + +```bash +# Clone the repository +git clone https://github.com/Acode-Foundation/Acode.git +cd Acode + +# Build the Docker image from our Dockerfile +docker build -t acode-dev .devcontainer/ + +# Run the container with your code mounted +docker run -it --rm \ + -v "$(pwd):/workspaces/acode" \ + -w /workspaces/acode \ + acode-dev \ + bash + +# Inside the container, run setup and build +# bun run setup && bun run build paid dev apk +pnpm run setup +pnpm run build paid dev apk # or pnpm run build p d +``` + +**Keep container running for repeated use:** +```bash +# Start container in background +docker run -d --name acode-dev \ + -v "$(pwd):/workspaces/acode" \ + -w /workspaces/acode \ + acode-dev \ + sleep infinity + +# Execute commands in the running container +docker exec -it acode-dev bash -c "pnpm run setup" +docker exec -it acode-dev pnpm run build paid dev apk + +# Stop and remove when done +docker stop acode-dev && docker rm acode-dev +``` + +--- + +## 🛠️ Manual Setup (Without Docker) + +If you prefer not to use Docker at all: + +### Prerequisites + +| Requirement | Version | +|------------|---------| +| **Node.js** | 18+ (22 recommended) | +| **pnpm** or **bun** | Latest | +| **Java JDK** | 17+ (21 recommended) | +| **Android SDK** | API 35 | +| **Gradle** | 8.x | + +### Environment Setup + +Add these to your shell profile (`~/.bashrc`, `~/.zshrc`, or `~/.config/fish/config.fish`): + +**macOS:** +```bash +export ANDROID_HOME="$HOME/Library/Android/sdk" +export PATH="$PATH:$ANDROID_HOME/platform-tools:$ANDROID_HOME/cmdline-tools/latest/bin" +``` + +**Linux:** +```bash +export ANDROID_HOME="$HOME/Android/Sdk" +export PATH="$PATH:$ANDROID_HOME/platform-tools:$ANDROID_HOME/cmdline-tools/latest/bin" +``` + +Some more environment variables, check [cordova docs](https://cordova.apache.org/docs/en/latest/guide/platforms/android/index.html). + +### Build Steps + +```bash +# Clone the repository +git clone https://github.com/Acode-Foundation/Acode.git +cd Acode + +# Install dependencies and set up Cordova +pnpm run setup + +# Build the APK +pnpm run build paid dev apk # or pnpm run build p d +``` + +The APK will be at: `platforms/android/app/build/outputs/apk/debug/app-debug.apk` + + +## 📝 Contribution Guidelines + +### Before Submitting a PR + +1. **Fork** the repository and create a branch from `main` +2. **Make changes** - keep commits focused and atomic +3. **Check code quality:** + ```bash + pnpm run check + ``` +4. **Test** on a device or emulator if possible + +### Pull Request Checklist + +- [ ] Clear description of changes +- [ ] Reference to related issue (if applicable) +- [ ] Screenshots/GIFs for UI changes +- [ ] Passing CI checks + +### Code Style + +We use [Biome](https://biomejs.dev/) for linting and formatting: +- Run `pnpm run check` before committing +- Install the Biome VS Code extension for auto-formatting + +### Commit Messages + +Use clear, descriptive messages: +``` +feat: add dark mode toggle to settings +fix: resolve crash when opening large files +docs: update build instructions +refactor: simplify file loading logic +``` + +## 🌍 Adding Translations + +1. Create a JSON file in `src/lang/` (e.g., `fr-fr.json` for French) +2. Add it to `src/lib/lang.js` +3. Use the translation utilities: + ```bash + pnpm run lang add # Add new string + pnpm run lang remove # Remove string + pnpm run lang search # Search strings + pnpm run lang update # Update translations + ``` + +## 🔌 Plugin Development + +To create plugins for Acode: +- [Plugin Starter Repository](https://github.com/Acode-Foundation/acode-plugin) +- [Plugin Documentation](https://docs.acode.app/) diff --git a/bun.lock b/bun.lock index 894453012..aeb4d6a11 100644 --- a/bun.lock +++ b/bun.lock @@ -1,5 +1,6 @@ { "lockfileVersion": 1, + "configVersion": 0, "workspaces": { "": { "name": "com.foxdebug.acode", diff --git a/readme.md b/readme.md index a9028f036..f95dad8c3 100644 --- a/readme.md +++ b/readme.md @@ -41,58 +41,15 @@ Acode/ Enhance Acode's capabilities by adding new languages easily. Just create a file with the language code (e.g., en-us for English) in [`src/lang/`](https://github.com/Acode-Foundation/Acode/tree/main/src/lang) and include it in [`src/lib/lang.js`](https://github.com/Acode-Foundation/Acode/blob/main/src/lib/lang.js). Manage strings across languages effortlessly using utility commands: ```shell -yarn lang add -yarn lang remove -yarn lang search -yarn lang update +pnpm run lang add +pnpm run lang remove +pnpm run lang search +pnpm run lang update ``` -## • Building the Application +## • Contributing & Building the Application -To build the APK, ensure you have Node.js, NPM, and Apache Cordova installed on your device. Use Cordova CLI to build the application. - -1. Initial setup (required only once): - -```shell -yarn setup -``` - -2. Build the project: - -```shell -yarn build [fdroid] -``` - -**Note**: Add the fdroid flag only if you want to build the F-Droid-compatible version of Acode. -Omit this flag to build the regular APK (Play Store or normal version). - -## • Contributing - -Acode Editor is an open-source project, and we welcome contributions from the community. To contribute, follow these steps: - -1. Fork the repository. -2. Make your changes and commit them.(make branch for each feature or bug fix) -3. Push your changes to your fork. -4. Create a pull request from your branch to main branch of this repository with proper description and Wait for review. - -> [!Note] -> Ensure your pull request includes: -> - A clear description of the changes made or problem or feature. -> - A reference to the issue being addressed (if applicable). -> - A clear explanation of the solution or implementation. -> - Screenshots or GIFs (if applicable). - -Please ensure that your code is clean, well-formatted, and follows the project's coding standards. Acode uses [Biomejs](https://biomejs.dev/) for formatting and linting and [typos](https://github.com/crate-ci/typos) for low false positives source code spell checking. You can use following commands to lints/format your code locally: -```shell -yarn lint # for linting -yarn format # for formatting -yarn check # it runs both lint and format -``` -Also, ensure that your code is well-documented and includes comments where necessary. - -> [!Note] -> You can use any package manager like npm or yarn or pnpm or bun. -> You can use your editor specific Biomejs plugin for auto-formatting and linting based on Acode's configs. +See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed instructions. ## • Contributors From 6da6baca35ffc2ec7e18a21b93e806cae213a066 Mon Sep 17 00:00:00 2001 From: Raunak Raj <71929976+bajrangCoder@users.noreply.github.com> Date: Fri, 16 Jan 2026 13:40:51 +0530 Subject: [PATCH 2/4] Update .devcontainer/devcontainer.json Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 5d54c6967..c44e5bc09 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -15,7 +15,7 @@ "jdkDistro": "ms", "gradleVersion": "latest", "mavenVersion": "none", - }, + "mavenVersion": "none" "ghcr.io/nordcominc/devcontainer-features/android-sdk:1": { "platform": "35", "build_tools": "35.0.0", From dbcf20b212295fa4b9f8c9ab82dc01b9cb79d579 Mon Sep 17 00:00:00 2001 From: Raunak Raj <71929976+bajrangCoder@users.noreply.github.com> Date: Fri, 16 Jan 2026 13:55:29 +0530 Subject: [PATCH 3/4] fix --- .devcontainer/devcontainer.json | 36 +++++++++------------------------ 1 file changed, 10 insertions(+), 26 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index c44e5bc09..a4a3827ab 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,8 +1,5 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/java { "name": "Acode Development", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile "image": "mcr.microsoft.com/devcontainers/java:1-21-bullseye", "features": { @@ -13,20 +10,19 @@ "installAnt": false, "version": "21", "jdkDistro": "ms", - "gradleVersion": "latest", - "mavenVersion": "none", - "mavenVersion": "none" + "gradleVersion": "latest" + }, "ghcr.io/nordcominc/devcontainer-features/android-sdk:1": { "platform": "35", - "build_tools": "35.0.0", + "build_tools": "35.0.0" }, "ghcr.io/devcontainers/features/node:1": { "nodeGypDependencies": false, "installYarnUsingApt": false, "version": "lts", "pnpmVersion": "latest", - "nvmVersion": "latest", - }, + "nvmVersion": "latest" + } }, "postCreateCommand": "pnpm run setup", @@ -38,21 +34,9 @@ "editor.formatOnSave": true, "editor.defaultFormatter": "biomejs.biome", "[java]": { - "editor.defaultFormatter": "redhat.java", - }, - }, - }, - }, - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - // Use 'postCreateCommand' to run commands after the container is created. - // "postCreateCommand": "java -version", - - // Configure tool-specific properties. - // "customizations": {}, - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" + "editor.defaultFormatter": "redhat.java" + } + } + } + } } From 8a83728f52c30785bb1671ef0920a04430c2af24 Mon Sep 17 00:00:00 2001 From: Raunak Raj <71929976+bajrangCoder@users.noreply.github.com> Date: Fri, 16 Jan 2026 14:14:53 +0530 Subject: [PATCH 4/4] fix --- .devcontainer/Dockerfile | 82 ++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 46 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 3d3682838..761820702 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,68 +1,58 @@ -# Acode Development Container (Manual Docker Build) - -FROM mcr.microsoft.com/devcontainers/base:ubuntu-22.04 - -ARG ANDROID_SDK_VERSION=35 -ARG ANDROID_BUILD_TOOLS_VERSION=35.0.0 -ARG NODE_MAJOR=22 +# Acode Development Container - Standalone Docker Build +# +# This Dockerfile is for MANUAL Docker builds (docker build/run). +# Usage: +# docker build -t acode-dev .devcontainer/ +# docker run -it -v $(pwd):/workspaces/acode acode-dev + +FROM mcr.microsoft.com/devcontainers/java:1-21-bullseye + +ARG ANDROID_PLATFORM=35 +ARG ANDROID_BUILD_TOOLS=35.0.0 +ARG CMDLINE_TOOLS_VERSION=11076708 +ARG NODE_VERSION=22 +ARG GRADLE_VERSION=8.11 ENV ANDROID_HOME=/opt/android-sdk ENV ANDROID_SDK_ROOT=/opt/android-sdk -ENV PATH="${PATH}:${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/platform-tools:${ANDROID_HOME}/build-tools/${ANDROID_BUILD_TOOLS_VERSION}" +ENV GRADLE_HOME=/opt/gradle +ENV PATH="${PATH}:${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/platform-tools:${GRADLE_HOME}/bin" -# Install essential packages RUN apt-get update && apt-get install -y --no-install-recommends \ - curl \ wget \ unzip \ - git \ - ca-certificates \ - gnupg \ && rm -rf /var/lib/apt/lists/* -# Install Java 21 (Temurin JDK) -RUN curl -fsSL https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor -o /usr/share/keyrings/adoptium.gpg \ - && echo "deb [signed-by=/usr/share/keyrings/adoptium.gpg] https://packages.adoptium.net/artifactory/deb $(lsb_release -cs) main" > /etc/apt/sources.list.d/adoptium.list \ - && apt-get update \ - && apt-get install -y --no-install-recommends temurin-21-jdk \ - && rm -rf /var/lib/apt/lists/* +# Install Gradle +RUN wget -q "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip" -O /tmp/gradle.zip \ + && unzip -q /tmp/gradle.zip -d /opt \ + && rm /tmp/gradle.zip \ + && ln -s /opt/gradle-${GRADLE_VERSION} ${GRADLE_HOME} -# Set JAVA_HOME dynamically based on installed JDK -RUN JAVA_DIR=$(dirname $(dirname $(readlink -f $(which java)))) \ - && echo "export JAVA_HOME=$JAVA_DIR" >> /etc/profile.d/java.sh \ - && echo "export JAVA_HOME=$JAVA_DIR" >> ~/.bashrc -ENV JAVA_HOME=/usr/lib/jvm/temurin-21-jdk-arm64 +# Install fnm and Node.js +ENV FNM_DIR=/usr/local/fnm +ENV PATH="${FNM_DIR}:${PATH}" +RUN curl -fsSL https://fnm.vercel.app/install | bash -s -- --install-dir "${FNM_DIR}" --skip-shell \ + && eval "$(${FNM_DIR}/fnm env)" \ + && fnm install ${NODE_VERSION} \ + && fnm default ${NODE_VERSION} \ + && npm install -g pnpm -# Install Node.js via NodeSource -RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_MAJOR}.x | bash - \ - && apt-get install -y nodejs \ - && rm -rf /var/lib/apt/lists/* +ENV PATH="${FNM_DIR}/aliases/default/bin:${PATH}" -# Install pnpm -RUN npm install -g pnpm - -# Install Android SDK command-line tools +# Install Android SDK RUN mkdir -p ${ANDROID_HOME}/cmdline-tools \ && cd ${ANDROID_HOME}/cmdline-tools \ - && wget -q https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -O cmdline-tools.zip \ + && wget -q "https://dl.google.com/android/repository/commandlinetools-linux-${CMDLINE_TOOLS_VERSION}_latest.zip" -O cmdline-tools.zip \ && unzip -q cmdline-tools.zip \ && rm cmdline-tools.zip \ - && mv cmdline-tools latest - -# Accept Android SDK licenses and install required components -RUN yes | ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --licenses 2>/dev/null || true \ + && mv cmdline-tools latest \ + && yes | ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --licenses 2>/dev/null || true \ && ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --update \ && ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager \ "platform-tools" \ - "platforms;android-${ANDROID_SDK_VERSION}" \ - "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" - -# Install Gradle -ARG GRADLE_VERSION=8.11 -RUN wget -q https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip -O /tmp/gradle.zip \ - && unzip -q /tmp/gradle.zip -d /opt \ - && rm /tmp/gradle.zip \ - && ln -s /opt/gradle-${GRADLE_VERSION}/bin/gradle /usr/local/bin/gradle + "platforms;android-${ANDROID_PLATFORM}" \ + "build-tools;${ANDROID_BUILD_TOOLS}" WORKDIR /workspaces/acode