Forráskód Böngészése

Updated config.yml

hientx 1 éve
szülő
commit
b3f10833c4
1 módosított fájl, 12 hozzáadás és 15 törlés
  1. 12 15
      .circleci/config.yml

+ 12 - 15
.circleci/config.yml

@@ -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:
+          name: Set up JDK 11
+          command: sudo update-alternatives --set javac /usr/lib/jvm/java-11-openjdk-amd64/bin/javac
       - run:
       - run:
-          name: Run Gradle Dependencies
+          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:
-          name: Run Tests
-          command: ./gradlew test  # Runs unit tests
-      - store_artifacts:  # Optional: Store the build outputs for later use
+      - store_artifacts:
           path: app/build/outputs/
           path: app/build/outputs/
           destination: build_outputs
           destination: build_outputs