Some checks reported errors
continuous-integration/drone/push Build encountered an error
40 lines
1 KiB
YAML
40 lines
1 KiB
YAML
kind: pipeline
|
|
type: docker
|
|
name: android-build
|
|
|
|
steps:
|
|
# Step 1: Build Debug APK
|
|
- name: build-debug
|
|
image: cirrusci/android-sdk:latest
|
|
environment:
|
|
GRADLE_USER_HOME: .gradle
|
|
commands:
|
|
- cd MathHomeWorkHelper
|
|
- echo "Building Debug APK..."
|
|
- chmod +x ./gradlew
|
|
- ./gradlew clean assembleDebug
|
|
- echo "Debug APK built successfully!"
|
|
|
|
# Step 2: Build Release APK
|
|
- name: build-release
|
|
image: cirrusci/android-sdk:latest
|
|
environment:
|
|
GRADLE_USER_HOME: .gradle
|
|
commands:
|
|
- cd MathHomeWorkHelper
|
|
- echo "Building Release APK..."
|
|
- chmod +x ./gradlew
|
|
- ./gradlew clean assembleRelease
|
|
- echo "Release APK built successfully!"
|
|
|
|
# Step 3: Run Unit Tests
|
|
- name: run-tests
|
|
image: cirrusci/android-sdk:latest
|
|
environment:
|
|
GRADLE_USER_HOME: .gradle
|
|
commands:
|
|
- cd MathHomeWorkHelper
|
|
- echo "Running unit tests..."
|
|
- chmod +x ./gradlew
|
|
- ./gradlew test
|
|
- echo "Tests completed!"
|