This commit is contained in:
parent
05f017a190
commit
891d82d6d4
11
Dockerfile
11
Dockerfile
@ -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
|
||||
|
@ -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/ .
|
||||
|
Loading…
Reference in New Issue
Block a user