Skip to content

Commit 9297186

Browse files
committed
Updated Kotlin & plugin versions
1 parent f0e8280 commit 9297186

File tree

5 files changed

+41
-8
lines changed

5 files changed

+41
-8
lines changed

.idea/runConfigurations/Sample__Run_Unit_Tests.xml

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android-junit5/src/test/groovy/de/mannodermaus/gradle/plugins/android_junit5/AndroidJUnitPlatformSpec.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ abstract class AndroidJUnitPlatformSpec extends Specification {
6767
/* Abstract */
6868

6969
protected abstract String testCompileDependency()
70-
protected abstract String testRuntimeDependency()
7170

71+
protected abstract String testRuntimeDependency()
7272

7373
/* Test Cases */
7474

@@ -243,7 +243,7 @@ abstract class AndroidJUnitPlatformSpec extends Specification {
243243
p.tasks.getByName("junitPlatformTestPaidRelease")
244244
}
245245

246-
@IgnoreIf({AndroidJUnitPlatformSpec.isAgp3x()})
246+
@IgnoreIf({ AndroidJUnitPlatformSpec.isAgp3x() })
247247
def "custom junit jupiter version"() {
248248
when:
249249
def nonExistentVersion = "0.0.0"

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ VCS_URL = https://github.com/aurae/android-j
1313

1414
# Dependency versions (plugins)
1515
ANDROID_PLUGIN_VERSION_2X = 2.3.2
16-
ANDROID_PLUGIN_VERSION_3X = 3.0.0-alpha9
16+
ANDROID_PLUGIN_VERSION_3X = 3.0.0-beta2
1717
BINTRAY_PLUGIN_VERSION = 1.7.3
1818

1919
# Dependency versions

sample/build.gradle

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
buildscript {
2-
ext.kotlinVersion = "1.1.3-2"
2+
ext.kotlinVersion = "1.1.4-2"
33

44
repositories {
55
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
@@ -21,7 +21,7 @@ apply plugin: "de.mannodermaus.android-junit5"
2121

2222
android {
2323
compileSdkVersion 26
24-
buildToolsVersion "26.0.0"
24+
buildToolsVersion "26.0.1"
2525

2626
defaultConfig {
2727
applicationId "de.mannodermaus.gradle.plugins.android_junit5.sample"
@@ -47,3 +47,19 @@ dependencies {
4747
testImplementation junitJupiter()
4848
testImplementation junitParams()
4949
}
50+
51+
// IJ doesn't recognize Kotlin test classes properly,
52+
// so we copy them over manually
53+
54+
afterEvaluate {
55+
android.buildTypes.all {
56+
def name = it.name
57+
58+
def copyTask = project.task(type: Copy, "copyKotlin${name.capitalize()}UnitTestClasses") {
59+
from "build/tmp/kotlin-classes/${name}UnitTest"
60+
into "build/intermediates/classes/test/$name"
61+
}
62+
63+
project.tasks.getByName("assemble${name.capitalize()}UnitTest").dependsOn copyTask
64+
}
65+
}

sample/src/test/kotlin/ExampleKotlinTest.kt

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
1-
import org.junit.jupiter.api.*
2-
import org.junit.jupiter.api.Assertions.*
1+
import org.junit.jupiter.api.AfterAll
2+
import org.junit.jupiter.api.AfterEach
3+
import org.junit.jupiter.api.Assertions.assertAll
4+
import org.junit.jupiter.api.Assertions.assertEquals
5+
import org.junit.jupiter.api.Assertions.assertNotNull
6+
import org.junit.jupiter.api.Assertions.assertTrue
7+
import org.junit.jupiter.api.BeforeAll
8+
import org.junit.jupiter.api.BeforeEach
9+
import org.junit.jupiter.api.Disabled
10+
import org.junit.jupiter.api.DisplayName
11+
import org.junit.jupiter.api.DynamicTest
312
import org.junit.jupiter.api.DynamicTest.dynamicTest
13+
import org.junit.jupiter.api.Nested
14+
import org.junit.jupiter.api.Tag
15+
import org.junit.jupiter.api.Test
16+
import org.junit.jupiter.api.TestFactory
17+
import org.junit.jupiter.api.TestInfo
418
import org.junit.jupiter.api.function.Executable
519
import org.junit.jupiter.params.ParameterizedTest
620
import org.junit.jupiter.params.provider.ValueSource

0 commit comments

Comments
 (0)