fix: remove WORKDIR necessities
Some checks failed
/ build (push) Failing after 2m35s

This commit is contained in:
ange 2025-02-01 23:33:39 +00:00
parent 05f017a190
commit 891d82d6d4
Signed by: ange
GPG Key ID: 9E0C4157BB7BEB1D
2 changed files with 15 additions and 13 deletions

View File

@ -15,9 +15,10 @@ RUN sdkmanager \
"build-tools;34.0.0" \
"cmdline-tools;9.0" \
"platform-tools" \
"platforms;android-33" \
"platforms;android-34" \
"platforms;android-35"
platforms\;android-{33..35}
# https://gradle.org/releases/
RUN curl -Lo /gradle.zip \
'https://services.gradle.org/distributions/gradle-8.12.1-bin.zip'
FROM docker.io/debian:12-slim
ENV DEBIAN_FRONTEND=noninteractive
@ -29,9 +30,9 @@ RUN apt-get update \
openjdk-17-jdk-headless \
unzip \
&& rm -rf /var/lib/apt/lists/*
RUN curl -Lo /gradle.zip \
'https://services.gradle.org/distributions/gradle-8.12.1-bin.zip'
COPY --from=build /opt/ /opt/
ENV GRADLE_ZIP=/gradle.zip
COPY --from=build /gradle.zip "$GRADLE_ZIP"
ENV PATH="/opt/flutter/bin:$PATH"
RUN flutter config --android-sdk /opt/android-sdk/
RUN flutter precache --android

View File

@ -1,11 +1,12 @@
#!/bin/bash -e
#!/bin/bash
cp -r . /app.tmp/
cd /app.tmp/
sed -i '/^distributionUrl/s =.\+ =file\\:///gradle.zip ' \
android/gradle/wrapper/gradle-wrapper.properties
PROPS=android/gradle/wrapper/gradle-wrapper.properties
BAK=/bak
cp "$PROPS" "$BAK" || exit 1
# shellcheck disable=SC2064
trap "cp '$BAK' '$PROPS'" EXIT
sed -i "/^distributionUrl/s =.\+ =file\\://$GRADLE_ZIP " "$PROPS"
flutter --no-version-check "$@"
cd -
cp -r /app.tmp/build/ .