Updated config.yml
This commit is contained in:
parent
4ba3851e12
commit
b3f10833c4
1 changed files with 12 additions and 15 deletions
|
@ -1,7 +1,7 @@
|
||||||
version: 2.1
|
version: 2.1
|
||||||
|
|
||||||
orbs:
|
orbs:
|
||||||
android: circleci/android@1.0.3 # Using Android orb to simplify setup
|
android: circleci/android@2.0.0 # Ensure to use a recent version of the Android orb
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
@ -9,30 +9,27 @@ jobs:
|
||||||
- image: cimg/android:2023.04 # Docker image with Android environment
|
- image: cimg/android:2023.04 # Docker image with Android environment
|
||||||
steps:
|
steps:
|
||||||
- checkout # Checks out the source code
|
- checkout # Checks out the source code
|
||||||
- android/setup # Sets up the Android environment
|
|
||||||
- run:
|
|
||||||
name: Restore Cache
|
|
||||||
command: |
|
|
||||||
if [ -e ~/.gradle/caches ]; then
|
|
||||||
mkdir -p /home/circleci/.gradle
|
|
||||||
cp -r ~/.gradle/caches /home/circleci/.gradle/caches
|
|
||||||
fi
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
key: gradle-cache-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}
|
keys:
|
||||||
|
- gradle-cache-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}
|
||||||
|
- gradle-cache-
|
||||||
- run:
|
- run:
|
||||||
name: Run Gradle Dependencies
|
name: Set up JDK 11
|
||||||
|
command: sudo update-alternatives --set javac /usr/lib/jvm/java-11-openjdk-amd64/bin/javac
|
||||||
|
- run:
|
||||||
|
name: Download Dependencies
|
||||||
command: ./gradlew androidDependencies
|
command: ./gradlew androidDependencies
|
||||||
- save_cache:
|
- save_cache:
|
||||||
paths:
|
paths:
|
||||||
- ~/.gradle
|
- ~/.gradle
|
||||||
key: gradle-cache-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}-{{ epoch }}
|
key: gradle-cache-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}-{{ epoch }}
|
||||||
|
- run:
|
||||||
|
name: Run Tests
|
||||||
|
command: ./gradlew test
|
||||||
- run:
|
- run:
|
||||||
name: Build
|
name: Build
|
||||||
command: ./gradlew assembleDebug # Adjust this command based on your project's specific build requirements
|
command: ./gradlew assembleDebug # Adjust this command based on your project's specific build requirements
|
||||||
- run:
|
- store_artifacts:
|
||||||
name: Run Tests
|
|
||||||
command: ./gradlew test # Runs unit tests
|
|
||||||
- store_artifacts: # Optional: Store the build outputs for later use
|
|
||||||
path: app/build/outputs/
|
path: app/build/outputs/
|
||||||
destination: build_outputs
|
destination: build_outputs
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue