David Bowman accepted merge request !1: Edit .gitlab-ci.yml from, image: eclipse-temurin:17 at David Bowman / Project-Insight-APKBuild

David Bowman
2026-04-30T23:49:51Z

stages:

build

variables: ANDROID_COMPILE_SDK: "33" ANDROID_BUILD_TOOLS: "33.0.2" ANDROID_SDK_ROOT: "$CI_PROJECT_DIR/android-sdk"

before_script:

apt-get update -y

apt-get install -y wget unzip

Download Android SDK tools

wget https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -O sdk.zip

mkdir -p $ANDROID_SDK_ROOT/cmdline-tools

unzip sdk.zip -d $ANDROID_SDK_ROOT/cmdline-tools

mv $ANDROID_SDK_ROOT/cmdline-tools/cmdline-tools $ANDROID_SDK_ROOT/cmdline-tools/latest

export PATH=ANDROID_SDK_ROOT/cmdline-tools/latest/bin:ANDROID_SDK_ROOT/platform-tools:$PATH

Accept licenses + install SDK

yes | sdkmanager --licenses

sdkmanager "platform-tools" "platforms;android-ANDROID_COMPILE_SDK" "build-tools;ANDROID_BUILD_TOOLS"

build_apk: stage: build script: - chmod +x gradlew - ./gradlew assembleDebug artifacts: paths: - app/build/outputs/apk/debug/app-debug.apk

To:, image: node:18

stages:

build

build_apk: stage: build script: - apt-get update && apt-get install -y openjdk-17-jdk wget unzip - npm install - npm run build - npm install @capacitor/core @capacitor/cli @capacitor/android - npx cap sync android - cd android - chmod +x gradlew - ./gradlew assembleDebug artifacts: paths: - android/app/build/outputs/apk/debug/app-debug.apk