Android build config.yml - GradleWrapperMain


#1

i used the default config.yml from docs, but gave me the error:

#!/bin/bash -eo pipefail
./gradlew androidDependencies
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
Exited with code 1

changed it a little bit, but the error is the same

current version:

version: 2
jobs:
  build:
    working_directory: ~/code
    docker:
      - image: dwillmc/android-27-alpha-ndk
    environment:
      ANDROID_HOME: /usr/local/android-sdk-linux
      JVM_OPTS: -Xmx3200m
    steps:
      - checkout
      - restore_cache:
          key: jars-{{ checksum "build.gradle" }}-{{ checksum  "app/build.gradle" }}
      - run:
          name: Download Dependencies
          pre:
            - echo y | android update sdk --no-ui --all --filter "platform-tools, tools"
            - echo y | android update sdk --no-ui --all --filter "android-24, build-tools-25.0.2"
            - echo y | android update sdk --no-ui --all --filter "extra-android-m2repository"
            - echo y | android update sdk --no-ui --all --filter "extra-android-support"
          command: chmod +x ./gradlew
          command: chmod +x gradlew
          command: ./gradlew --gradle-version 4.8 --distribution-type all
          command: ./gradlew androidDependencies
      - save_cache:
          paths:
            - ~/.gradle
          key: jars-{{ checksum "build.gradle" }}-{{ checksum  "app/build.gradle" }}
      - run:
          name: Run Tests
          command: ./gradlew testDebug
      - store_artifacts:
          path: app/build/reports
          destination: reports
      - store_test_results:
          path: app/build/test-result

#2

Solved adding project /gradle folder to git (was in gitignore)