Skip to content
This repository has been archived by the owner on Mar 10, 2022. It is now read-only.

Commit

Permalink
Fix Issue #1769: produce version for x86_64 (#1892)
Browse files Browse the repository at this point in the history
* Update Travis to show logcat after failure
* Update travis to build a single ABI: x86
  • Loading branch information
bmeike committed Mar 21, 2019
1 parent 9c77580 commit a34c075
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
13 changes: 10 additions & 3 deletions .travis.yml
@@ -1,6 +1,10 @@
language: android
jdk: oraclejdk8
sudo: true
env:
global:
- ANDROID_API=android-19
- ANDROID_ABI=armeabi-v7a
branches:
only:
- master
Expand All @@ -14,7 +18,7 @@ android:
- android-28
# Android Emulator image:
- android-19
- sys-img-armeabi-v7a-android-19
- sys-img-${ANDROID_ABI}-${ANDROID_API}
install:
- echo y | sdkmanager "ndk-bundle"
- echo y | sdkmanager "cmake;3.6.4111459"
Expand All @@ -23,12 +27,15 @@ before_script:
# Export NDK HOME:
- export ANDROID_NDK_HOME=$ANDROID_HOME/ndk-bundle
# Start an emulator:
- echo no | android create avd --force -n test -t android-19 --abi armeabi-v7a
- echo no | android create avd --force -n test -t $ANDROID_API --abi $ANDROID_ABI
- emulator -avd test -no-audio -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &
- adb logcat > logcat.log 2>&1 &
script:
- touch local.properties
- ./gradlew buildCI --console=plain --info
- ./gradlew buildCI -PtargetAbis=$ANDROID_ABI --console=plain --info
after_success:
- ./gradlew coverageCI
after_failure:
- cat logcat.log
11 changes: 8 additions & 3 deletions android/CouchbaseLite/build.gradle
Expand Up @@ -67,6 +67,11 @@ def getGitHash = { ->
return stdout.toString().trim()
}

// defining this property in the file ~/.gradle/gradle.properties
// can dramatically reduce your build time.
def buildAbis = null
if (hasProperty("targetAbis")) { buildAbis = targetAbis.split(',') }

/**
* The android block is where you configure all your Android-specific
* build options.
Expand All @@ -83,7 +88,7 @@ android {
project.archivesBaseName = "couchbase-lite-android-${versionName}"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

ndk { abiFilters 'x86', 'armeabi-v7a', 'arm64-v8a' }
if (buildAbis != null) { ndk { abiFilters buildAbis } }
externalNativeBuild {
cmake {
arguments '-DANDROID_STL=c++_static', "-DANDROID_TOOLCHAIN=clang", '-DANDROID_PLATFORM=android-19'
Expand Down Expand Up @@ -451,7 +456,7 @@ coveralls {

task smoketest(dependsOn: ['checkstyle', 'lint', 'findbugsHtml', 'pmd', 'testDebugUnitTest'])

task checkLocal(dependsOn: ['checkstyle', 'lint', 'findbugsHtml', 'pmd', 'testDebugUnitTest', 'connectedDebugAndroidTest'])
task checkLocal(dependsOn: ['smoketest', 'connectedDebugAndroidTest'])

task buildCI(dependsOn: ['checkstyle', 'lint', 'findbugsXml', 'pmd', 'check', 'connectedAndroidTest'])
task buildCI(dependsOn: ['checkstyle', 'findbugsXml', 'pmd', 'check', 'connectedAndroidTest'])

6 changes: 3 additions & 3 deletions java/build.gradle
Expand Up @@ -192,8 +192,8 @@ coveralls {
}


task smoketest(dependsOn: ['checkstyle', 'findbugsHtml', 'pmd', 'check', 'test'])
task smoketest(dependsOn: ['checkstyleMain', 'findbugsHtml', 'pmdMain'])

task checkLocal(dependsOn: ['smoketest'])
task checkLocal(dependsOn: ['smoketest', 'test'])

task buildCI(dependsOn: ['checkstyle', 'findbugsXml', 'pmd', 'check', 'test'])
task buildCI(dependsOn: ['checkstyleMain', 'findbugsXml', 'pmdMain', 'test'])

0 comments on commit a34c075

Please sign in to comment.