From b936fd2448d197adddba5dc5dd0d77745e38fa4f Mon Sep 17 00:00:00 2001 From: Emmanuel Lobo <76094069+UnschooledGamer@users.noreply.github.com> Date: Wed, 29 Apr 2026 15:28:16 +0530 Subject: [PATCH 1/3] chore(dockerFile): dual android sdk installation and conflicts (#2069) * chore(devcontainer): fix dockerfile broken yarn repo in base image * Update .devcontainer/devcontainer.json Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Update Dockerfile * Update devcontainer.json * Update Dockerfile * Update devcontainer.json * remove: redundant pnpm installation. * chore(dockerFile): dual android sdk installation and conflicts between them. This Commit, comments out certain Docker commands in dockerFile as it's used inside devcontainers too, which are not needed when using dev containers. But those should be uncommented for Standalone Docker Build in the dockerFile. * Update .devcontainer/Dockerfile Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Update Dockerfile to install Android SDK conditionally * chore(docker): split into multi-stage setup to allow devcontainers * remove(contributing): dockerFile uncomment note as it's resolved now. * fix `ARG` order in the dockerFile * update: specify 'standalone' target in Docker build command Updated Docker build command to specify the 'standalone' target. * fix: move ARG below FROM * update: ANDROID paths * update(CONTRIBUTING.md): add note for podman Mentioning about https://github.com/containers/buildah/pull/5845 * fix(CONTRIBUTING.md): `Podmon` to Podman. --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- .devcontainer/Dockerfile | 55 ++++++++++++++++++++------------- .devcontainer/devcontainer.json | 9 ++++-- CONTRIBUTING.md | 7 +++-- 3 files changed, 44 insertions(+), 27 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 1d296d915..3bd1ce670 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,11 +1,11 @@ -# Acode Development Container - Standalone Docker Build -# -# This Dockerfile is for MANUAL Docker builds (docker build/run). -# Usage: -# docker build -t acode-dev .devcontainer/ +# Acode Development Container +# +# Devcontainer usage: automatic via devcontainer.json +# Standalone usage: +# docker build --target standalone -t acode-dev .devcontainer/ # docker run -it -v $(pwd):/workspaces/acode acode-dev -FROM mcr.microsoft.com/devcontainers/java:1-21-bullseye +FROM mcr.microsoft.com/devcontainers/java:1-21-bullseye AS base ARG ANDROID_PLATFORM=36 ARG ANDROID_BUILD_TOOLS=36.0.0 @@ -13,10 +13,7 @@ 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 GRADLE_HOME=/opt/gradle -ENV PATH="${PATH}:${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/platform-tools:${GRADLE_HOME}/bin" # removes broken yarn repo present in base image RUN rm -f /etc/apt/sources.list.d/yarn.list @@ -33,17 +30,26 @@ RUN wget -q "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}- && rm /tmp/gradle.zip \ && ln -s /opt/gradle-${GRADLE_VERSION} ${GRADLE_HOME} -# Install fnm and Node.js -# Not required, mostly. When dev containers are used. -# 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 +ENV PATH="${PATH}:${GRADLE_HOME}/bin" + +WORKDIR /workspaces/acode + +LABEL org.opencontainers.image.authors="Acode Foundation " +LABEL description="Development environment for building Acode - Code Editor for Android" + -# ENV PATH="${FNM_DIR}/aliases/default/bin:${PATH}" +# Devcontainer stage +# Android SDK and Node handled by devcontainer features. +FROM base AS devcontainer + + +# Standalone stage +# Includes Android SDK and Node/pnpm for plain docker build/run usage. +FROM base AS standalone + +ENV ANDROID_HOME=/usr/local/lib/android +ENV ANDROID_SDK_ROOT=/usr/local/lib/android +ENV PATH="${PATH}:${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/platform-tools:${ANDROID_HOME}/build-tools/${ANDROID_BUILD_TOOLS}" # Install Android SDK RUN mkdir -p ${ANDROID_HOME}/cmdline-tools \ @@ -59,7 +65,12 @@ RUN mkdir -p ${ANDROID_HOME}/cmdline-tools \ "platforms;android-${ANDROID_PLATFORM}" \ "build-tools;${ANDROID_BUILD_TOOLS}" -WORKDIR /workspaces/acode +# Install fnm and Node.js +ENV FNM_DIR=/usr/local/fnm +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 -LABEL maintainer="Acode Foundation" -LABEL description="Development environment for building Acode - Code Editor for Android" +ENV PATH="${FNM_DIR}/aliases/default/bin:${PATH}" diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index a40d3ae21..6a7d809c4 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,14 +1,17 @@ { "name": "Acode Development", "build": { - "dockerfile": "Dockerfile" + "dockerfile": "Dockerfile", + "target": "devcontainer" }, "containerEnv": { "JAVA_HOME": "/usr/local/openjdk-21" }, "remoteEnv": { - "JAVA_HOME": "/usr/local/openjdk-21" + "JAVA_HOME": "/usr/local/openjdk-21", + "ANDROID_SDK_ROOT": "${containerEnv:ANDROID_HOME}", + "PATH": "${containerEnv:PATH}:${containerEnv:ANDROID_HOME}/build-tools/36.0.0" }, "features": { @@ -16,7 +19,7 @@ "platform": "36", "build_tools": "36.0.0" }, - "ghcr.io/devcontainers/features/node:1": { + "ghcr.io/devcontainers/features/node:2.0": { "nodeGypDependencies": false, "installYarnUsingApt": false, "version": "lts", diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e4b61d19f..2457415d2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,7 @@ Thank you for your interest in contributing to Acode! This guide will help you g ### 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. +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](https://containers.dev/). 2. Clone and open the repository: ```bash @@ -28,6 +28,9 @@ Thank you for your interest in contributing to Acode! This guide will help you g ### Option 2: Docker CLI (For Any Editor) +> [!NOTE] +> If you try to use Podman, Kindly note that it would not work properly until https://github.com/containers/buildah/pull/5845 is merged/implemented in Podman. + If your editor doesn't support DevContainers, you can use Docker directly: ```bash @@ -36,7 +39,7 @@ git clone https://github.com/Acode-Foundation/Acode.git cd Acode # Build the Docker image from our Dockerfile -docker build -t acode-dev .devcontainer/ +docker build --target standalone -t acode-dev .devcontainer/ # Run the container with your code mounted docker run -it --rm \ From 55469c6335afedb051301c174257420c97a6417c Mon Sep 17 00:00:00 2001 From: Hyper-Z11 <114817308+hyperz111@users.noreply.github.com> Date: Wed, 29 Apr 2026 19:08:49 +0700 Subject: [PATCH 2/3] i18n(id-id): update strings (#2074) --- src/lang/id-id.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lang/id-id.json b/src/lang/id-id.json index ff86cb1c7..d20ab446e 100644 --- a/src/lang/id-id.json +++ b/src/lang/id-id.json @@ -726,6 +726,6 @@ "close other tabs": "Tutup Lainnya", "auto close tags": "Penutup tag otomatis", "settings-info-editor-auto-close-tags": "Menyisipkan tag penutup di berkas HTML, XML, Vue, Angular, dan templat PHP secara otomatis.", - "ui zoom": "UI zoom", - "settings-info-app-ui-zoom": "Scale text across the Acode interface." + "ui zoom": "Pembesaran UI", + "settings-info-app-ui-zoom": "Skalakan teks di seluruh antarmuka Acode." } From d4b19f162ac4d461649f0571b17029b3c35a1387 Mon Sep 17 00:00:00 2001 From: Launch Lee <80872691+LaunchLee@users.noreply.github.com> Date: Thu, 30 Apr 2026 00:56:11 +0800 Subject: [PATCH 3/3] Update zh-cn.json and zh-hant.json (#2076) Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- src/lang/zh-cn.json | 8 ++++---- src/lang/zh-hant.json | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lang/zh-cn.json b/src/lang/zh-cn.json index cb4cfa9e0..c4beb297d 100644 --- a/src/lang/zh-cn.json +++ b/src/lang/zh-cn.json @@ -723,8 +723,8 @@ "close tabs to right": "关闭右侧标签页", "close tabs to left": "关闭左侧标签页", "close other tabs": "关闭其他标签页", - "auto close tags": "Auto close tags", - "settings-info-editor-auto-close-tags": "Automatically insert closing tags in HTML, XML, Vue, Angular, and PHP template files.", - "ui zoom": "UI zoom", - "settings-info-app-ui-zoom": "Scale text across the Acode interface." + "auto close tags": "自动补全闭合标签", + "settings-info-editor-auto-close-tags": "在 HTML、XML、Vue、Angular 和 PHP 模板文件中自动插入闭合标签。", + "ui zoom": "UI 缩放", + "settings-info-app-ui-zoom": "缩放所有 Acode 界面文字。" } diff --git a/src/lang/zh-hant.json b/src/lang/zh-hant.json index e546ab526..b94ace6d9 100644 --- a/src/lang/zh-hant.json +++ b/src/lang/zh-hant.json @@ -723,8 +723,8 @@ "close tabs to right": "關閉右側標籤頁", "close tabs to left": "關閉左側標籤頁", "close other tabs": "關閉其他標籤頁", - "auto close tags": "Auto close tags", - "settings-info-editor-auto-close-tags": "Automatically insert closing tags in HTML, XML, Vue, Angular, and PHP template files.", - "ui zoom": "UI zoom", - "settings-info-app-ui-zoom": "Scale text across the Acode interface." + "auto close tags": "自動補全閉合標籤", + "settings-info-editor-auto-close-tags": "在 HTML、XML、Vue、Angular 和 PHP 模板文件中自動插入閉合標籤。", + "ui zoom": "UI 縮放", + "settings-info-app-ui-zoom": "縮放所有 Acode 介面文字。" }