Skip to content

Commit fb7c6ed

Browse files
authored
Added a useful reference to the README (#356)
* Added a useful reference to the README template * Line breaks * Generated the updated README
1 parent f2c7058 commit fb7c6ed

File tree

3 files changed

+64
-0
lines changed

3 files changed

+64
-0
lines changed

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,36 @@ At this time, Google hasn't shared any immediate plans to bring first-party supp
239239
- [Add support for JUnit 5 (issuetracker.google.com)](https://issuetracker.google.com/issues/127100532)
240240
- [JUnit 5 support (github.com/android/android-test)](https://github.com/android/android-test/issues/224)
241241

242+
## Support for @Rules
243+
244+
Since JUnit 5 has replaced the `@Rule` mechanism with Extensions, the following artifacts help bridge the gap until Android officially transitions to JUnit 5.
245+
246+
### InstantExecutorExtension
247+
248+
Replaces `InstantTaskExecutorRule` in JUnit 5.
249+
250+
<details>
251+
<summary>Kotlin</summary>
252+
253+
```kotlin
254+
dependencies {
255+
testImplementation("io.github.neboskreb:instant-task-executor-extension:1.0.0")
256+
}
257+
```
258+
</details>
259+
260+
<details>
261+
<summary>Groovy</summary>
262+
263+
```groovy
264+
dependencies {
265+
testImplementation 'io.github.neboskreb:instant-task-executor-extension:1.0.0'
266+
}
267+
```
268+
</details>
269+
270+
For more details see [instant-task-executor-extension](https://github.com/neboskreb/instant-task-executor-extension) on GitHub.
271+
242272
## Building Locally
243273

244274
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.

README.md.template

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,36 @@ At this time, Google hasn't shared any immediate plans to bring first-party supp
234234
- [Add support for JUnit 5 (issuetracker.google.com)](https://issuetracker.google.com/issues/127100532)
235235
- [JUnit 5 support (github.com/android/android-test)](https://github.com/android/android-test/issues/224)
236236

237+
## Support for @Rules
238+
239+
Since JUnit 5 has replaced the `@Rule` mechanism with Extensions, the following artifacts help bridge the gap until Android officially transitions to JUnit 5.
240+
241+
### InstantExecutorExtension
242+
243+
Replaces `InstantTaskExecutorRule` in JUnit 5.
244+
245+
<details>
246+
<summary>Kotlin</summary>
247+
248+
```kotlin
249+
dependencies {
250+
testImplementation("${libs.instantTaskExecutorExtension}")
251+
}
252+
```
253+
</details>
254+
255+
<details>
256+
<summary>Groovy</summary>
257+
258+
```groovy
259+
dependencies {
260+
testImplementation '${libs.instantTaskExecutorExtension}'
261+
}
262+
```
263+
</details>
264+
265+
For more details see [instant-task-executor-extension](https://github.com/neboskreb/instant-task-executor-extension) on GitHub.
266+
237267
## Building Locally
238268

239269
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.

build-logic/src/main/kotlin/Dependencies.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,8 @@ object libs {
8484
const val composeUiTest = "androidx.compose.ui:ui-test"
8585
const val composeUiTestJUnit4 = "androidx.compose.ui:ui-test-junit4"
8686
const val composeUiTestManifest = "androidx.compose.ui:ui-test-manifest"
87+
88+
// Documentation
89+
// For the latest version refer to GitHub repo neboskreb/instant-task-executor-extension
90+
const val instantTaskExecutorExtension = "io.github.neboskreb:instant-task-executor-extension:1.0.0"
8791
}

0 commit comments

Comments
 (0)