From 52fa35942bfe0dfdcfc5410de2610fb397359134 Mon Sep 17 00:00:00 2001 From: isuPatches Date: Sat, 29 Oct 2016 13:38:41 -0500 Subject: [PATCH] More tinkering --- .travis.yml | 38 +++++++++---------- app/build.gradle | 2 +- .../java/com/isupatches/wisefy/WiseFy.java | 5 ++- 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/.travis.yml b/.travis.yml index c112dbe2..80a2a7bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,22 +1,20 @@ language: android -sudo: false jdk: oraclejdk8 +# Use the Travis Container-Based Infrastructure +sudo: false cache: directories: - - $HOME/.gradle/caches/2.8 - - $HOME/.gradle/caches/jars-1 - - $HOME/.gradle/daemon - - $HOME/.gradle/native - - $HOME/.gradle/wrapper + - ${TRAVIS_BUILD_DIR}/gradle/caches/ + - ${TRAVIS_BUILD_DIR}/gradle/wrapper/dists/ env: global: - - ADB_INSTALL_TIMEOUT=20 # minutes (2 minutes by default) - ANDROID_API_LEVEL=24 - - ANDROID_BUILD_TOOLS_VERSION=24.0.3 - matrix: - - ANDROID_TARGET=android-24 ANDROID_ABI=armeabi-v7a + - ANDROID_BUILD_TOOLS_VERSION=23.0.3 + - ANDROID_ABI=armeabi-v7a + - ANDROID_TAG=google_apis + - ADB_INSTALL_TIMEOUT=20 # minutes (2 minutes by default) android: components: @@ -25,19 +23,21 @@ android: - tools # to install Android SDK tools 25.1.x - build-tools-$ANDROID_BUILD_TOOLS_VERSION - android-$ANDROID_API_LEVEL + # For Google APIs - addon-google_apis-google-$ANDROID_API_LEVEL + # Support library - extra-android-support - - extra-android-m2repository + # Latest artifacts in local repository - extra-google-m2repository - - sys-img-armeabi-v7a-android-$ANDROID_API_LEVEL + - extra-android-m2repository + # Specify at least one system image + - sys-img-armeabi-v7a-google_apis-$ANDROID_API_LEVEL -before_install: - - echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI -c 20M - - emulator -avd test -no-window & +before_script: + # Create and start emulator + - echo no | android create avd --force -n test -t "android-"$ANDROID_API_LEVEL --abi $ANDROID_ABI --tag $ANDROID_TAG + - emulator -avd test -no-skin -no-window & - chmod +x ./wait_for_emulator.sh - ./wait_for_emulator.sh - adb devices - - adb shell input keyevent 82 & - -script: - - ./gradlew build connectedCheck \ No newline at end of file + - adb shell input keyevent 82 & \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index a0ce8bdc..25faf31f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -68,7 +68,7 @@ android { } compileSdkVersion 24 - buildToolsVersion "24.0.3" + buildToolsVersion "23.0.3" defaultConfig { minSdkVersion 16 diff --git a/app/src/main/java/com/isupatches/wisefy/WiseFy.java b/app/src/main/java/com/isupatches/wisefy/WiseFy.java index dd89936e..401e3a48 100644 --- a/app/src/main/java/com/isupatches/wisefy/WiseFy.java +++ b/app/src/main/java/com/isupatches/wisefy/WiseFy.java @@ -81,7 +81,6 @@ public static class withContext implements Logging, GetSmarts { * @param context - The activity or application context to get a WifiConfiguration and * ConnectivityManager instance * - * {@link #WiseFy(withContext)} */ public withContext(Context context) { this.context = context; @@ -90,7 +89,11 @@ public withContext(Context context) { /** * Mandatory - To build and return a WiseFy instance * + * Must be called after withContext + * {@link #withContext(Context)} + * * @return WiseFy - The instance created by the builder + * */ @Override public WiseFy getSmarts() {