Skip to content

Commit e2047a2

Browse files
committed
Update DSL usage of instrumentation projects to 1.9.x.x's changes
1 parent fb8f5b5 commit e2047a2

File tree

3 files changed

+6
-67
lines changed

3 files changed

+6
-67
lines changed

instrumentation/compose/build.gradle.kts

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,11 @@
1-
import de.mannodermaus.gradle.plugins.junit5.junitPlatform
21
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
32
import org.gradle.api.tasks.testing.logging.TestLogEvent
43

5-
buildscript {
6-
repositories {
7-
google()
8-
mavenCentral()
9-
sonatypeSnapshots()
10-
}
11-
12-
dependencies {
13-
val latest = Artifacts.Plugin.latestStableVersion
14-
classpath("de.mannodermaus.gradle.plugins:android-junit5:$latest")
15-
}
16-
}
17-
184
plugins {
195
id("com.android.library")
206
kotlin("android")
217
id("explicit-api-mode")
22-
}
23-
24-
apply {
25-
plugin("de.mannodermaus.android-junit5")
8+
id("de.mannodermaus.android-junit5").version(Artifacts.Plugin.latestStableVersion)
269
}
2710

2811
val javaVersion = JavaVersion.VERSION_11
@@ -69,7 +52,7 @@ android {
6952

7053
junitPlatform {
7154
// Using local dependency instead of Maven coordinates
72-
instrumentationTests.integrityCheckEnabled = false
55+
instrumentationTests.enabled = false
7356
}
7457

7558
tasks.withType<Test> {

instrumentation/core/build.gradle.kts

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,12 @@
1-
import de.mannodermaus.gradle.plugins.junit5.junitPlatform
21
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
32
import org.gradle.api.tasks.testing.logging.TestLogEvent
43
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
54

6-
buildscript {
7-
repositories {
8-
google()
9-
mavenCentral()
10-
sonatypeSnapshots()
11-
}
12-
13-
dependencies {
14-
val latest = Artifacts.Plugin.latestStableVersion
15-
classpath("de.mannodermaus.gradle.plugins:android-junit5:$latest")
16-
}
17-
}
18-
195
plugins {
206
id("com.android.library")
217
kotlin("android")
228
id("explicit-api-mode")
23-
}
24-
25-
apply {
26-
plugin("de.mannodermaus.android-junit5")
9+
id("de.mannodermaus.android-junit5").version(Artifacts.Plugin.latestStableVersion)
2710
}
2811

2912
val javaVersion = JavaVersion.VERSION_1_8
@@ -67,7 +50,7 @@ android {
6750

6851
junitPlatform {
6952
// Using local dependency instead of Maven coordinates
70-
instrumentationTests.integrityCheckEnabled = false
53+
instrumentationTests.enabled = false
7154
}
7255

7356
tasks.withType<KotlinCompile> {

instrumentation/sample/build.gradle.kts

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,10 @@
1-
import de.mannodermaus.gradle.plugins.junit5.junitPlatform
21
import org.gradle.api.tasks.testing.logging.TestLogEvent
32

4-
buildscript {
5-
repositories {
6-
google()
7-
mavenCentral()
8-
sonatypeSnapshots()
9-
}
10-
11-
dependencies {
12-
// Use a local "Fat JAR" pointing to the Gradle plugin from the sibling project,
13-
// falling back to the latest stable version if that cannot be located.
14-
// This requires an explicit task to be executed in the plugin project,
15-
// since the fat JAR is not generated by default upon building
16-
val localPluginJar = findLocalPluginJar()
17-
if (localPluginJar != null) {
18-
project.logger.warn("!! Using local JAR to provide plugin to module 'sample' (built at ${localPluginJar.lastModifiedDate()}) !!")
19-
classpath(files(localPluginJar))
20-
} else {
21-
val latest = Artifacts.Plugin.latestStableVersion
22-
classpath("de.mannodermaus.gradle.plugins:android-junit5:$latest")
23-
}
24-
}
25-
}
26-
273
plugins {
284
id("com.android.application")
295
kotlin("android")
306
id("jacoco")
31-
}
32-
33-
apply {
34-
plugin("de.mannodermaus.android-junit5")
7+
id("de.mannodermaus.android-junit5").version(Artifacts.Plugin.latestStableVersion)
358
}
369

3710
val javaVersion = JavaVersion.VERSION_1_8
@@ -75,7 +48,7 @@ junitPlatform {
7548
}
7649

7750
// Using local dependency instead of Maven coordinates
78-
instrumentationTests.integrityCheckEnabled = false
51+
instrumentationTests.enabled = false
7952
}
8053

8154
tasks.withType<Test> {

0 commit comments

Comments
 (0)