Hello guys,
I am new to the CI, and Here is what I have setup for my android project with specific runner (I setup specific runner from gitlab docs for CI)
my gitlag-ci.yml:
# from : http://www.greysonparrelli.com/post/setting-up-android-builds-in-gitlab-ci/
before_script:
- export ANDROID_HOME="/home/demo/project/android/android_sdk"
- export JAVA_HOME="/usr/lib/jvm/java-8-oracle/"
- chmod +x gradlew
dev:
script:
- ./gradlew jar
- ./gradlew assembleDebug
And here is the build logs
Running with gitlab-ci-multi-runner 1.8.0~beta.30.g5d23907 (5d23907)
Using Shell executor...
Running on trial...
Fetching changes...
HEAD is now at 9adf3b5 Updated gradle related things in .gitlab-ci.yml
From https://gitlab.com/android-tks-libraries/material-design-libraries
9adf3b5..7831b20 master -> origin/master
Checking out 7831b20d as master...
$ export ANDROID_HOME="/home/demo/project/android/android_sdk"
$ export JAVA_HOME="/usr/lib/jvm/java-8-oracle/"
$ chmod +x gradlew
$ ./gradlew jar
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
ERROR: Build failed: exit status 1
I’m unable to understand why this fails?
My main module specific build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion '24.0.3'
defaultConfig {
applicationId "com.package.app"
minSdkVersion 19
targetSdkVersion 24
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'
compile 'com.android.support:support-annotations:24.2.1'
compile 'com.android.support:support-vector-drawable:24.2.1'
compile 'com.android.support:design:24.2.1'
}