Files
robot be7c44c4c4
CI / Lint (pull_request) Failing after 2m15s
CI / Test (pull_request) Successful in 3m16s
CI / Build Android (pull_request) Skipped
CI / Build iOS (pull_request) Skipped
fix(ci): restore reliable Flutter SDK download + fix release.yml token hardcoding
- Revert subosito/flutter-action to direct Flutter SDK download (action
  was failing on Magrathea runner, works inconsistently across runners)
- Fix release.yml: replace 3x hardcoded 'token ***' with $GITEA_TOKEN
  env var for Gitea release API calls
- Fix release.yml: replace GitHub-specific actions (setup-java,
  setup-python, upload-artifact) with manual SDK downloads
- Update Dockerfile: Flutter 3.41.8 -> 3.44.0, tarball instead of git
  clone, removed unnecessary packages (cmake, clang, pip, pipx, lld,
  mesa-utils), JRE headless instead of full JDK
- Simplify release.yml publish-release: single step to create Gitea
  release (artifact upload pending storage configuration)
2026-08-03 00:45:29 +00:00

40 lines
1.6 KiB
Docker
Executable File

FROM --platform=linux/amd64 debian:bookworm-slim
ENV PATH="$PATH:/opt/flutter/bin"
# Install system dependencies - minimal set for Flutter + Android builds
RUN apt-get update && apt-get install -y \
wget curl unzip git xz-utils zip python3 libgtk-3-dev ninja-build openjdk-17-jre-headless \
&& rm -rf /var/lib/apt/lists/*
# Become non-root
ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=1000
ENV FLUTTER_VERSION=3.44.0
ENV FLUTTER_HOME=/opt/flutter
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m -s /bin/bash $USERNAME
# Install Flutter (tarball - much faster than git clone)
RUN wget -q "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${FLUTTER_VERSION}-stable.tar.xz" \
-O /tmp/flutter.tar.xz \
&& tar -xf /tmp/flutter.tar.xz -C /opt \
&& rm /tmp/flutter.tar.xz
# Set up Android SDK
ENV ANDROID_HOME=/opt/android-sdk
ENV PATH=${PATH}:${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/platform-tools:${ANDROID_HOME}/build-tools/35.0.0
RUN mkdir -p ${ANDROID_HOME}/cmdline-tools \
&& wget -q https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -O commandlinetools.zip \
&& unzip -q commandlinetools.zip -d ${ANDROID_HOME}/cmdline-tools \
&& mv ${ANDROID_HOME}/cmdline-tools/cmdline-tools ${ANDROID_HOME}/cmdline-tools/latest \
&& rm commandlinetools.zip \
&& yes | sdkmanager --licenses \
&& sdkmanager "platform-tools" "platforms;android-35" "build-tools;35.0.0"
RUN chown -R 1000:1000 ${ANDROID_HOME} && chown -R 1000:1000 ${FLUTTER_HOME}
USER $USERNAME
ENV HOME=/home/$USERNAME