I am attempting to setup my build for the first time, and running into challenges. No matter what I attempt, I can’t seem to find Gradle and am getting this error:
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
I have confirmed that I checked in my Gradle wrapper and other config files into my project in GitHub.
I am really at a loss for how to get this to work. Here is my simple circle.yml file:
general:
artifacts:
- /home/ubuntu/android-historian/app/build/outputs/apk/
machine:
environment:
PATH: "~/$CIRCLE_PROJECT_REPONAME/gradle-2.10/bin:$PATH"
TERM: "dumb"
ADB_INSTALL_TIMEOUT: "10"
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"'
dependencies:
pre:
- wget "https://services.gradle.org/distributions/gradle-2.10-bin.zip"; unzip gradle-2.10-bin.zip
- echo y | android update sdk --no-ui --all --filter tool,extra-android-m2repository,extra-android-support,extra-google-google_play_services,extra-google-m2repository,android-23
- echo y | android update sdk --no-ui --all --filter build-tools-23.0.2
test:
override:
- ./gradlew assembleRelease
- cp -r android-historian/build/outputs $CIRCLE_ARTIFACTS