add docker build to pipeline
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Juan José Gutiérrez de Quevedo Pérez 2025-11-25 13:11:09 +01:00
parent 91b9afa096
commit 382b0b235c
2 changed files with 13 additions and 16 deletions

View file

@ -3,38 +3,35 @@ type: docker
name: android-build
steps:
# Step 1: Build Debug APK
- name: build-docker-image
image: plugins/docker
settings:
registry: docker.gutierrezdequevedo.com
repo: docker.gutierrezdequevedo.com/ps/mathstuff
tags:
- latest
- ${DRONE_COMMIT_SHA:0:7}
- name: build-debug
image: cirrusci/android-sdk:33
environment:
GRADLE_USER_HOME: .gradle
commands:
- cd MathHomeworkHelper
- echo "Building Debug APK..."
- chmod +x ./gradlew
- ./gradlew clean assembleDebug
- gradle clean assembleDebug
- echo "Debug APK built successfully!"
# Step 2: Build Release APK
- name: build-release
image: cirrusci/android-sdk:33
environment:
GRADLE_USER_HOME: .gradle
commands:
- cd MathHomeworkHelper
- echo "Building Release APK..."
- chmod +x ./gradlew
- ./gradlew clean assembleRelease
- gradle clean assembleRelease
- echo "Release APK built successfully!"
# Step 3: Run Unit Tests
- name: run-tests
image: cirrusci/android-sdk:33
environment:
GRADLE_USER_HOME: .gradle
commands:
- cd MathHomeworkHelper
- echo "Running unit tests..."
- chmod +x ./gradlew
- ./gradlew test
- gradle test
- echo "Tests completed!"

View file

@ -18,4 +18,4 @@ android.useAndroidX=true
android.nonTransitiveRClass=true
# Gradle memory settings
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m
org.gradle.jvmargs=-Xmx2048m