|
1 | 1 | package de.mannodermaus.gradle.plugins.junit5 |
2 | 2 |
|
| 3 | +import de.mannodermaus.gradle.plugins.junit5.internal.agpLog |
3 | 4 | import de.mannodermaus.gradle.plugins.junit5.internal.android |
4 | 5 | import de.mannodermaus.gradle.plugins.junit5.internal.ext |
5 | 6 | import org.gradle.api.Project |
6 | 7 | import org.gradle.api.ProjectConfigurationException |
7 | 8 | import org.gradle.api.artifacts.Dependency |
| 9 | +import org.gradle.api.logging.LogLevel.WARN |
8 | 10 | import java.util.Properties |
9 | 11 |
|
10 | 12 | /* |
@@ -60,10 +62,21 @@ class JUnit5DependencyHandler( |
60 | 62 | /** |
61 | 63 | * Retrieves the list of dependencies related to |
62 | 64 | * executing Unit Tests in Android Studio 3 properly. |
| 65 | + * |
| 66 | + * Deprecated in 1.0.32 |
63 | 67 | */ |
64 | | - fun unitTestsRuntime() = listOf( |
65 | | - versions.others.embeddedRuntime |
66 | | - ) |
| 68 | + @Deprecated(message = "The unitTestsRuntime() dependency has been deprecated " + |
| 69 | + "with the stable release of Android Studio 3.1, and will be removed in a future release. " + |
| 70 | + "Please go ahead, update your IDE & remove this dependency!") |
| 71 | + fun unitTestsRuntime(): List<Dependency> { |
| 72 | + project.logger.agpLog(WARN, "The unitTestsRuntime() dependency has been deprecated " + |
| 73 | + "with the stable release of Android Studio 3.1, and will be removed in a future release. " + |
| 74 | + "Please go ahead, update your IDE & remove this dependency!") |
| 75 | + |
| 76 | + return listOf( |
| 77 | + versions.others.embeddedRuntime |
| 78 | + ) |
| 79 | + } |
67 | 80 |
|
68 | 81 | /** |
69 | 82 | * Retrieves the list of dependencies related to |
@@ -202,7 +215,7 @@ class Other( |
202 | 215 | val embeddedRuntime = dependency( |
203 | 216 | groupId = "de.mannodermaus.gradle.plugins", |
204 | 217 | artifactId = "android-junit5-embedded-runtime", |
205 | | - version = properties.getProperty(ANDROID_JUNIT5_VERSION_PROP)) |
| 218 | + version = properties.getProperty(ANDROID_JUNIT5_RUNTIME_VERSION_PROP)) |
206 | 219 |
|
207 | 220 | val junit4 = dependency( |
208 | 221 | groupId = "junit", |
|
0 commit comments