Skip to content
Open
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
5 changes: 2 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ plugins {
}

repositories {
jcenter()
mavenLocal()
google()
maven { url "https://oss.sonatype.org/content/repositories/snapshots" } // For Spoon snapshot, until 2.0.0 is released
jcenter()
Copy link
Owner

Choose a reason for hiding this comment

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

We need maven { url "https://oss.sonatype.org/content/repositories/snapshots" } for Spoon 2.0.

}

apply from: "gradle/dependencies.gradle"
Expand Down Expand Up @@ -58,7 +58,6 @@ dependencies {
implementation deps.kotlinReflect
implementation deps.gradle
implementation deps.spoonRunner
implementation deps.ddmlib

testImplementation localGroovy()
testImplementation deps.spockCore, { exclude module: "groovy-all" } // Use localGroovy()
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
GROUP=com.jaredsburrows
VERSION_NAME=1.4.1-SNAPSHOT
VERSION_NAME=1.4.1-SNAPSHOT-fork-1.0.0
Copy link
Owner

Choose a reason for hiding this comment

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

What is this fork?


POM_NAME=Gradle Spoon Plugin
POM_ARTIFACT_ID=gradle-spoon-plugin
Expand Down
3 changes: 1 addition & 2 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ext {
minSdkVersion = 19
targetSdkVersion = 28
compileSdkVersion = 28
spoonVersion = "2.0.0-SNAPSHOT"
spoonVersion = "2.0.0-SNAPSHOT-fork-1.0.0"
jacocoVersion = "0.7.4.201502262128"
}

Expand All @@ -18,7 +18,6 @@ ext.deps = [
"kotlinStdlib" : "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion",
"kotlinReflect" : "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion",
"spoonRunner" : "com.squareup.spoon:spoon-runner:$spoonVersion",
"ddmlib" : "com.android.tools.ddms:ddmlib:26.0.0",

// testImplementation
"junit" : "junit:junit:4.12",
Expand Down
5 changes: 4 additions & 1 deletion src/main/kotlin/com/jaredsburrows/spoon/SpoonExtension.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.jaredsburrows.spoon

import com.android.ddmlib.testrunner.ITestRunListener

/**
* Variables based on the following documentation:
* - https://developer.android.com/reference/android/support/test/runner/AndroidJUnitRunner.html
Expand Down Expand Up @@ -78,7 +80,8 @@ open class SpoonExtension { // Extensions cannot be final
/** Toggle sharding. (false by default) */
var shard: Boolean = false

// TODO testRunListener
/** Add listener for tests execution */
var testRunListener: ITestRunListener? = null

// TODO terminateAdb

Expand Down
4 changes: 4 additions & 0 deletions src/main/kotlin/com/jaredsburrows/spoon/SpoonTask.kt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ open class SpoonTask : DefaultTask() {
.setSingleInstrumentationCall(extension.singleInstrumentationCall)
.setClearAppDataBeforeEachTest(extension.clearAppDataBeforeEachTest)

if (extension.testRunListener != null) {
builder.addTestRunListener(extension.testRunListener)
}

// APKs
if (!testing) {
builder.setTestApk(instrumentationApk)
Expand Down
2 changes: 0 additions & 2 deletions test-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ buildscript {
repositories {
mavenLocal()
google()
maven { url "https://oss.sonatype.org/content/repositories/snapshots" } // For Spoon snapshot, until 2.0.0 is released
jcenter()
}

Expand All @@ -17,7 +16,6 @@ buildscript {

repositories {
google()
maven { url "https://oss.sonatype.org/content/repositories/snapshots" } // For Spoon snapshot, until 2.0.0 is released
jcenter()
}

Expand Down