From fb7c6ed78a71bf5f4e01188d79884e1dbd0dec48 Mon Sep 17 00:00:00 2001 From: "John Y. Pazekha" <35344069+neboskreb@users.noreply.github.com> Date: Sat, 14 Sep 2024 02:52:24 +0300 Subject: [PATCH] Added a useful reference to the README (#356) * Added a useful reference to the README template * Line breaks * Generated the updated README --- README.md | 30 +++++++++++++++++++++ README.md.template | 30 +++++++++++++++++++++ build-logic/src/main/kotlin/Dependencies.kt | 4 +++ 3 files changed, 64 insertions(+) diff --git a/README.md b/README.md index a91368b1..5ef944ef 100644 --- a/README.md +++ b/README.md @@ -239,6 +239,36 @@ At this time, Google hasn't shared any immediate plans to bring first-party supp - [Add support for JUnit 5 (issuetracker.google.com)](https://issuetracker.google.com/issues/127100532) - [JUnit 5 support (github.com/android/android-test)](https://github.com/android/android-test/issues/224) +## Support for @Rules + +Since JUnit 5 has replaced the `@Rule` mechanism with Extensions, the following artifacts help bridge the gap until Android officially transitions to JUnit 5. + +### InstantExecutorExtension + +Replaces `InstantTaskExecutorRule` in JUnit 5. + +
+ Kotlin + + ```kotlin + dependencies { + testImplementation("io.github.neboskreb:instant-task-executor-extension:1.0.0") + } + ``` +
+ +
+ Groovy + + ```groovy + dependencies { + testImplementation 'io.github.neboskreb:instant-task-executor-extension:1.0.0' + } + ``` +
+ +For more details see [instant-task-executor-extension](https://github.com/neboskreb/instant-task-executor-extension) on GitHub. + ## Building Locally This repository contains multiple modules, divided into two sub-projects. The repository's root directory contains build logic shared across the sub-projects, which in turn use symlinks to connect to the common build scripts in their parent folder. diff --git a/README.md.template b/README.md.template index dfeea43d..75793385 100644 --- a/README.md.template +++ b/README.md.template @@ -234,6 +234,36 @@ At this time, Google hasn't shared any immediate plans to bring first-party supp - [Add support for JUnit 5 (issuetracker.google.com)](https://issuetracker.google.com/issues/127100532) - [JUnit 5 support (github.com/android/android-test)](https://github.com/android/android-test/issues/224) +## Support for @Rules + +Since JUnit 5 has replaced the `@Rule` mechanism with Extensions, the following artifacts help bridge the gap until Android officially transitions to JUnit 5. + +### InstantExecutorExtension + +Replaces `InstantTaskExecutorRule` in JUnit 5. + +
+ Kotlin + + ```kotlin + dependencies { + testImplementation("${libs.instantTaskExecutorExtension}") + } + ``` +
+ +
+ Groovy + + ```groovy + dependencies { + testImplementation '${libs.instantTaskExecutorExtension}' + } + ``` +
+ +For more details see [instant-task-executor-extension](https://github.com/neboskreb/instant-task-executor-extension) on GitHub. + ## Building Locally This repository contains multiple modules, divided into two sub-projects. The repository's root directory contains build logic shared across the sub-projects, which in turn use symlinks to connect to the common build scripts in their parent folder. diff --git a/build-logic/src/main/kotlin/Dependencies.kt b/build-logic/src/main/kotlin/Dependencies.kt index 41d0a31c..5f4aab1c 100644 --- a/build-logic/src/main/kotlin/Dependencies.kt +++ b/build-logic/src/main/kotlin/Dependencies.kt @@ -84,4 +84,8 @@ object libs { const val composeUiTest = "androidx.compose.ui:ui-test" const val composeUiTestJUnit4 = "androidx.compose.ui:ui-test-junit4" const val composeUiTestManifest = "androidx.compose.ui:ui-test-manifest" + + // Documentation + // For the latest version refer to GitHub repo neboskreb/instant-task-executor-extension + const val instantTaskExecutorExtension = "io.github.neboskreb:instant-task-executor-extension:1.0.0" }