Skip to content

Commit

Permalink
Merge branch 'master' into 3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sockeqwe committed Sep 4, 2017
2 parents f6a2356 + 95f8fe2 commit 417fcab
Show file tree
Hide file tree
Showing 8 changed files with 176 additions and 5 deletions.
52 changes: 52 additions & 0 deletions .buildscript/swarmer/emulator1-config.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
hw.cpu.arch = x86_64
hw.cpu.ncore = 2
hw.ramSize = 1536
hw.screen = multi-touch
hw.mainKeys = false
hw.trackBall = false
hw.keyboard = true
hw.keyboard.lid = false
hw.keyboard.charmap = qwerty2
hw.dPad = false
hw.rotaryInput = false
hw.gsmModem = true
hw.gps = true
hw.battery = true
hw.accelerometer = true
hw.audioInput = true
hw.audioOutput = true
hw.sdCard = true
hw.sdCard.path = ~/Nexus_6P_API_25.avd/sdcard.img
disk.cachePartition = true
disk.cachePartition.path = ~/Nexus_6P_API_25.avd/cache.img
disk.cachePartition.size = 66m
hw.lcd.width = 1440
hw.lcd.height = 2560
hw.lcd.depth = 16
hw.lcd.density = 560
hw.lcd.backlight = true
hw.gpu.enabled = true
hw.gpu.mode = host
hw.gpu.blacklisted = no
hw.initialOrientation = Portrait
hw.camera.back = emulated
hw.camera.front = emulated
vm.heapSize = 384
hw.sensors.light = true
hw.sensors.pressure = true
hw.sensors.humidity = true
hw.sensors.proximity = true
hw.sensors.magnetic_field = true
hw.sensors.orientation = true
hw.sensors.temperature = true
hw.useext4 = true
kernel.path = ${ANDROID_HOME}/system-images/android-25/google_apis/x86_64//kernel-ranchu
kernel.newDeviceNaming = yes
kernel.supportsYaffs2 = no
disk.ramdisk.path = ${ANDROID_HOME}/system-images/android-25/google_apis/x86_64//ramdisk.img
disk.systemPartition.initPath =${ANDROID_HOME}/system-images/android-25/google_apis/x86_64//system.img
disk.systemPartition.size = 2g
disk.dataPartition.path = ~/Nexus_6P_API_25.avd/userdata-qemu.img
disk.dataPartition.size = 1200m
PlayStore.enabled = false
avd.name = Nexus_6P_API_25
23 changes: 23 additions & 0 deletions .buildscript/swarmer/swarmer_start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

echo $ANDROID_HOME
ls -la ${ANDROID_HOME}/tools/bin/


SWARMER_VERSION=0.2.0
SWARMER_JAR=/tmp/swarmer.jar

curl --fail --location https://jcenter.bintray.com/com/gojuno/swarmer/swarmer/${SWARMER_VERSION}/swarmer-${SWARMER_VERSION}.jar --output ${SWARMER_JAR}
$ANDROID_HOME/tools/bin/sdkmanager --update
$ANDROID_HOME/tools/bin/sdkmanager "system-images;android-25;google_apis;x86_64"


java -jar ${SWARMER_JAR} start \
--emulator-name test_emulator_1 \
--package "system-images;android-25;google_apis;x86_64" \
--android-abi google_apis/x86_64 \
--path-to-config-ini .buildscript/swarmer/emulator1-config.ini \
--emulator-start-options -prop persist.sys.language=en -prop persist.sys.country=US \
--redirect-logcat-to test_emulator_1_logcat.txt \
--emulator-start-options -verbose --no-window \
--emulator-start-timeout-seconds 180
5 changes: 5 additions & 0 deletions .buildscript/swarmer/swarmer_stop.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

SWARMER_JAR = "/tmp/swarmer.jar"

java -jar ${SWARMER_JAR} stop
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ local.properties
proguard/

#Log Files
*.log
*.log
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ android:
- build-tools-26.0.0
- extra-android-m2repository
- android-25
# - sys-img-armeabi-v7a-android-17
- sys-img-armeabi-v7a-android-17


# Emulator Management: Create, Start and Wait
Expand All @@ -15,6 +15,7 @@ before_script:
# - emulator -avd test -no-audio -no-window &
# - android-wait-for-emulator
# - adb shell input keyevent 82 &
# - ./.buildscript/swarmer/swarmer_start.sh
jdk:
- oraclejdk8
licenses:
Expand Down
81 changes: 81 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
machine:
java:
version: oraclejdk8
environment:
ANDROID_HOME: /usr/local/android-sdk-linux
ANDROID_BUILD_TOOLS: 26.0.0
QEMU_AUDIO_DRV: none

dependencies:
pre:
# Remove any leftover lock from previous builds
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock

# Make sure we have the sdkmanager available, and update the Android SDK tools if not
- if [ ! -e $ANDROID_HOME/tools/bin/sdkmanager ]; then echo y | android update sdk --no-ui --all --filter tools; fi

# Install all the required SDK components
- echo y | $ANDROID_HOME/tools/bin/sdkmanager --verbose "platform-tools" "build-tools;"$ANDROID_BUILD_TOOLS "extras;google;m2repository"

override:
# Force Gradle to pre-download dependencies for the app module (the default would only be for the root, which is useless)
- if [ -f ./gradlew ]; then ./gradlew mvi:dependencies --console=plain;else gradle mvi:dependencies --console=plain;fi

cache_directories:
# Android SDK
- /usr/local/android-sdk-linux/tools
- /usr/local/android-sdk-linux/platform-tools
- /usr/local/android-sdk-linux/build-tools
- /usr/local/android-sdk-linux/licenses
- /usr/local/android-sdk-linux/extras/google/m2repository

# Gradle caches
- /home/ubuntu/.gradle/caches/
- /home/ubuntu/.gradle/wrapper/

test:
override:
# start the emulator
- emulator -avd circleci-android24:
background: true
parallel: false
# wait for it to have booted
- circle-android wait-for-boot
# run tests against the emulator.
- ./gradlew test connectedAndroidTest --console=plain

post:
# Collect the JUnit reports
- mkdir -p $CIRCLE_TEST_REPORTS/reports/junit
- find mvi/build/ -name "*.xml" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find mvi/build/ -name "*.html" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;

- find mvi-common/build/ -name "*.xml" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find mvi-common/build/ -name "*.html" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;

- find mvi-integration-test/build/ -name "*.xml" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find mvi-integration-test/build/ -name "*.html" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;

- find mvp-common/build/ -name "*.xml" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find mvp-common/build/ -name "*.html" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;

- find mvp-lce/build/ -name "*.xml" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find mvp-lce/build/ -name "*.xml" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;

- find mvp-nullobject-presenter/build/ -name "*.xml" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find mvp-nullobject-presenter/build/ -name "*.html" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;

- find presentermanager/build/ -name "*.xml" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find presentermanager/build/ -name "*.html" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;

- find utils-fragment/build/ -name "*.xml" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find utils-fragment/build/ -name "*.html" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;

- find utils-fragment-integration-test/build/ -name "*.xml" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find utils-fragment-integration-test/build/ -name "*.html" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;

- find viewstate/build/ -name "*.xml" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find viewstate/build/ -name "*.html" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;

- find mvp/build/ -name "*.xml" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
- find mvp/build/ -name "*.html" -exec cp {} $CIRCLE_TEST_REPORTS/reports/junit/ \;
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public abstract class MviFragment<V extends MvpView, P extends MviPresenter<V, ?
return (V) this;
} catch (ClassCastException e) {
String msg =
"Couldn't cast the View to the corresponding View interface. Most likely you forgot to add \"Activity implements YourMvpViewInterface\".\"";
"Couldn't cast the View to the corresponding View interface. Most likely you forgot to add \"Fragment implements YourMvpViewInterface\".\"";
Log.e(this.toString(), msg);
throw new RuntimeException(msg, e);
}
Expand Down
13 changes: 11 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
include ':mvp-common', ':mvp', ':viewstate', ':sample', ':mvi', ':sample-mail', ':mvp-lce',
include ':mvp-common',
':mvp',
':viewstate',
':sample',
':mvi',
// ':sample-mail',
':mvp-lce',
':mvp-nullobject-presenter',
':mvi-common',
':utils-fragment-integration-test',
':mvi-integration-test', ':sample-mvi', ':presentermanager', ':utils-fragment'
':mvi-integration-test',
':sample-mvi',
':presentermanager',
':utils-fragment'

0 comments on commit 417fcab

Please sign in to comment.