From 5a8e5f21391ae54260eda7b33e6d1f1c49459643 Mon Sep 17 00:00:00 2001 From: Kyle Roe Date: Tue, 22 Mar 2022 13:24:32 +0100 Subject: [PATCH] [Release] Prepare Version 0.9.0 (#164) * readme * migration guide * changelog * release baby * small p * update deprecation messages Co-authored-by: Kyle <[hopeman1986@gmail.com]> --- CHANGELOG.MD | 9 ++++++--- MIGRATION.md | 16 ++++++++++++++++ README.md | 10 +++++----- .../kotlin/io/github/hellocuriosity/Forgery.kt | 2 +- .../io/github/hellocuriosity/ModelForgeKotlin.kt | 2 +- 5 files changed, 29 insertions(+), 10 deletions(-) create mode 100644 MIGRATION.md diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 4898504c..01edfbb6 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,8 +1,11 @@ -## [0.9.0] - Not released yet +## [0.9.0] - March 22nd 2022 -* Support for map collection type -* Better output message when using `attempt` +* Support for map collection type. +* Better output message when using `attempt`. * Removed the custom Provider interface in favor of `javax.inject.Provider`. + * See [Migration Guide](https://github.com/HelloCuriosity/model-forge/blob/main/MIGRATION.MD) for details. +* Moved dependency definitions to `buildSrc` +* Fixed StringProvider to be more explicit when generating strings. ## [0.8.0] - December 7th 2021 diff --git a/MIGRATION.md b/MIGRATION.md new file mode 100644 index 00000000..b896de0b --- /dev/null +++ b/MIGRATION.md @@ -0,0 +1,16 @@ +# Migration Guide + +## 0.9.0 + +In version 0.9.0 we removed the custom provider in favor of javax provider for easier +adaptation in other projects. + +Replace all instances of: +```kotlin + import io.github.hellocuriosity.providers.Provider +``` + +with: +```kotlin + import javax.inject.Provider +``` diff --git a/README.md b/README.md index 9cc7fac6..e56b5a9a 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Model Forge is a library to automate model generation for automated testing: ```kotlin dependencies { - testImplementation("io.github.hellocuriosity:model-forge:0.8.0") + testImplementation("io.github.hellocuriosity:model-forge:0.9.0") } ``` @@ -34,7 +34,7 @@ dependencies { ```groovy dependencies { - testImplementation 'io.github.hellocuriosity:model-forge:0.8.0' + testImplementation 'io.github.hellocuriosity:model-forge:0.9.0' } ``` @@ -53,7 +53,7 @@ repositories { } dependencies { - testImplementation("io.github.hellocuriosity:model-forge:0.8.0.xx-SNAPSHOT") + testImplementation("io.github.hellocuriosity:model-forge:0.9.0.xx-SNAPSHOT") } ``` @@ -68,7 +68,7 @@ repositories { } dependencies { - testImplementation 'io.github.hellocuriosity:model-forge:0.8.0.xx-SNAPSHOT' + testImplementation 'io.github.hellocuriosity:model-forge:0.9.0.xx-SNAPSHOT' } ``` @@ -183,7 +183,7 @@ Model Forge currently supports the auto generation for the following types: ### Collections * List -* Map (_SNAPSHOT_) +* Map * Set _Can't find your data type? Feel free to create a pull request or open an issue_ :parachute: diff --git a/forge-core/src/main/kotlin/io/github/hellocuriosity/Forgery.kt b/forge-core/src/main/kotlin/io/github/hellocuriosity/Forgery.kt index 628e250d..b815f36e 100644 --- a/forge-core/src/main/kotlin/io/github/hellocuriosity/Forgery.kt +++ b/forge-core/src/main/kotlin/io/github/hellocuriosity/Forgery.kt @@ -7,7 +7,7 @@ public inline fun forgery(forger: ModelForge = ModelForge()): } @Deprecated( - "forgeries is not used and will be removed in the future.", + "forgeries is not used and will be removed in version 1.0.0.", ReplaceWith("forgeryList(forger: ModelForge = ModelForge(), size: Int = 10)") ) public inline fun forgeries(forger: ModelForge = ModelForge(), size: Int = 10): Lazy> = lazy { diff --git a/forge-core/src/main/kotlin/io/github/hellocuriosity/ModelForgeKotlin.kt b/forge-core/src/main/kotlin/io/github/hellocuriosity/ModelForgeKotlin.kt index a8730849..b2d69e78 100644 --- a/forge-core/src/main/kotlin/io/github/hellocuriosity/ModelForgeKotlin.kt +++ b/forge-core/src/main/kotlin/io/github/hellocuriosity/ModelForgeKotlin.kt @@ -54,7 +54,7 @@ public fun ModelForge.addProvider(clazz: KClass, provider: Provider public inline fun ModelForge.build(): T = build(T::class) @Deprecated( - "ModelForge.build is not used and will be removed in the future.", + "ModelForge.build is not used and will be removed in version 1.0.0.", ReplaceWith("ModelForge.buildList(size: Int = 10)") ) public inline fun ModelForge.build(size: Int = 10): List = buildList(T::class, size)