Skip to content
This repository has been archived by the owner on Dec 7, 2019. It is now read-only.

Updated dependencies. #38

Merged
merged 2 commits into from
May 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildscript {

dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlin"
classpath 'com.github.ben-manes:gradle-versions-plugin:0.13.0'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.17.0'
classpath "org.junit.platform:junit-platform-gradle-plugin:$versions.junitPlatform"
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
}
Expand Down
3 changes: 2 additions & 1 deletion ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ docker run \
--env BINTRAY_USER="$BINTRAY_USER" \
--env BINTRAY_API_KEY="$BINTRAY_API_KEY" \
--env BINTRAY_GPG_PASSPHRASE="$BINTRAY_GPG_PASSPHRASE" \
--env ANDROID_HOME="" \
Copy link
Contributor Author

@yunikkk yunikkk May 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sad workaround for NPE when accessing adb in tests, with new commander
when ANDROID_HOME is not set.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or we could wrap them locally...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ouch, well ok for now I guess

--volume `"pwd"`:/opt/project \
--rm \
openjdk:8u121-jdk \
openjdk:8u171-jdk \
bash -c "$BUILD_COMMAND"

popd
15 changes: 7 additions & 8 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
ext.versions = [
kotlin : '1.1.1',
kotlin : '1.2.41',

rxJava : '1.2.9',
rxJava : '1.3.8',
jCommander : '1.71',
commander : '0.1.2',
commander : '0.1.7',

junit : '4.12',
junitPlatform: '1.0.0-M4',
spek : '1.1.2',
assertJ : '3.5.2',
mockito : '2.8.9',
junitPlatform: '1.0.1',
spek : '1.1.5',
assertJ : '3.9.1',
mockito : '2.8.1',
mockitoKotlin: '1.5.0',
]

Expand All @@ -25,7 +25,6 @@ ext.libraries = [

junit : "junit:junit:$versions.junit",
spek : "org.jetbrains.spek:spek-api:$versions.spek",
spekSubjectExtension : "org.jetbrains.spek:spek-subject-extension:$versions.spek",
spekJunitPlatformEngine: "org.jetbrains.spek:spek-junit-platform-engine:$versions.spek",
assertJ : "org.assertj:assertj-core:$versions.assertJ",
mockito : "org.mockito:mockito-core:$versions.mockito",
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip
1 change: 0 additions & 1 deletion swarmer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ dependencies {

dependencies {
testCompile libraries.spek
testCompile libraries.spekSubjectExtension
testRuntime libraries.spekJunitPlatformEngine
testCompile libraries.assertJ
testCompile libraries.mockito
Expand Down
30 changes: 15 additions & 15 deletions swarmer/src/main/kotlin/com/gojuno/swarmer/Args.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,49 +25,49 @@ sealed class Commands {

@Parameters(
commandDescription = "Print help and exit.",
commandNames = arrayOf("--help", "-help", "help", "-h")
commandNames = ["--help", "-help", "help", "-h"]
)
object Help : Commands()

@Parameters(
commandDescription = "Start emulators listed",
commandNames = arrayOf("start")
commandNames = ["start"]
)
data class Start(
@Parameter(
names = arrayOf(PARAMETER_EMULATOR_NAME),
names = [PARAMETER_EMULATOR_NAME],
required = true,
description = "Name for the emulator, i.e. `test_emulator_1` to pass to `avdmanager create avd --name`.",
order = 1
)
var emulatorName: String = "",

@Parameter(
names = arrayOf("--package"),
names = ["--package"],
required = true,
description = "Package of the system image for this AVD (e.g.'system-images;android-25;google_apis;x86') to pass to `avdmanager create avd --package`.",
order = 2
)
var pakage: String = "",

@Parameter(
names = arrayOf("--android-abi"),
names = ["--android-abi"],
required = true,
description = "Android system image abi, i.e. `google_apis/x86_64` to pass to `avdmanager create avd --abi`.",
order = 3
)
var androidAbi: String = "",

@Parameter(
names = arrayOf("--path-to-config-ini"),
names = ["--path-to-config-ini"],
required = true,
description = "Path either relative or absolute to the file that will be used as `config.ini` for created emulator.",
order = 4
)
var pathToConfigIni: String = "",

@Parameter(
names = arrayOf("--emulator-start-options"),
names = ["--emulator-start-options"],
required = false,
variableArity = true,
description = "Options to pass to `emulator -avd \$emulatorName` command, i.e. `--no-window -prop persist.sys.language=en -prop persist.sys.country=US`.",
Expand All @@ -76,47 +76,47 @@ sealed class Commands {
var emulatorStartOptions: List<String> = emptyList(),

@Parameter(
names = arrayOf("--emulator-start-timeout-seconds"),
names = ["--emulator-start-timeout-seconds"],
required = false,
description = "Timeout to wait for emulator to finish boot. Default value is 180 seconds.",
order = 6
)
var emulatorStartTimeoutSeconds: Long = 180,

@Parameter(
names = arrayOf("--redirect-logcat-to"),
names = ["--redirect-logcat-to"],
required = false,
description = "Path either relative or absolute to the file that will be used to redirect logcat of started emulator to. No redirection will happen if parameter is not presented.",
order = 7
)
var redirectLogcatTo: String? = null,

@Parameter(
names = arrayOf("--redirect-output-to"),
names = ["--redirect-output-to"],
required = false,
description = "Path either relative or absolute to the directory that will be used to redirect emulator command output. No redirection will happen if parameter is not presented.",
order = 8
)
var redirectOutputTo: String? = null,

@Parameter(
names = arrayOf("--verbose-emulator"),
names = ["--verbose-emulator"],
required = false,
description = "Print verbose emulator initialization messages.",
order = 9
)
var verbose: Boolean = false,

@Parameter(
names = arrayOf("--keep-output-on-exit"),
names = ["--keep-output-on-exit"],
required = false,
description = "Keep output of emulator command on exit. False by default.",
order = 10
)
var keepOutputOnExit: Boolean = false,

@Parameter(
names = arrayOf("--use-compat-emulator"),
names = ["--use-compat-emulator"],
required = false,
description = "Use old compat emulator tool. Look https://issuetracker.google.com/issues/66886035 for details. False by default.",
order = 10
Expand All @@ -127,11 +127,11 @@ sealed class Commands {

@Parameters(
commandDescription = "Stop all emulators",
commandNames = arrayOf("stop")
commandNames = ["stop"]
)
data class Stop(
@Parameter(
names = arrayOf("--timeout"),
names = ["--timeout"],
required = false,
description = "Timeout for emulators to stop in seconds, default is 15 seconds.",
order = 1
Expand Down
12 changes: 8 additions & 4 deletions swarmer/src/test/kotlin/com/gojuno/swarmer/EmulatorsSpec.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ package com.gojuno.swarmer
import com.gojuno.commander.android.AdbDevice
import com.gojuno.commander.android.adb
import com.gojuno.commander.os.Notification
import com.nhaarman.mockito_kotlin.*
import com.nhaarman.mockito_kotlin.any
import com.nhaarman.mockito_kotlin.argumentCaptor
import com.nhaarman.mockito_kotlin.mock
import com.nhaarman.mockito_kotlin.verify
import com.nhaarman.mockito_kotlin.whenever
import org.jetbrains.spek.api.Spek
import org.jetbrains.spek.api.dsl.describe
import org.jetbrains.spek.api.dsl.it
Expand All @@ -16,9 +20,9 @@ import java.util.concurrent.TimeUnit
class EmulatorsSpec : Spek({

val ADB_DEVICES = setOf(
AdbDevice("id1", true),
AdbDevice("id2", true),
AdbDevice("id3", true)
AdbDevice("id1", online = true),
AdbDevice("id2", online = true),
AdbDevice("id3", online = true)
)

arrayOf(
Expand Down