Skip to content

Commit

Permalink
release(common-enums): v0.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
EdricChan03 committed Jul 17, 2023
1 parent b28b0f4 commit 5b4fb54
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 14 deletions.
83 changes: 70 additions & 13 deletions androidx/common/common-enums/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,83 @@ Common code for enums. An example usage is as follows:

```kt
enum class Example(val value: String) {
One("one"),
Two("two"),
Three("abc");

companion object : EnumFromValue<String, Example>(default = Three) {
override fun fromValueOrNull(value: String) = when (value) {
"one" -> One
"two" -> Two
"abc", "other value" -> Three
else -> null
One("one"),
Two("two"),
Three("abc");

companion object : EnumFromValue<String, Example>(default = Three) {
override fun fromValueOrNull(value: String) = when (value) {
"one" -> One
"two" -> Two
"abc", "other value" -> Three
else -> null
}
}
}
```

See the [Module docs](./Module.md) for more information on how to include this artifact in your build script, and the [generated Dokka documentation](https://edricchan03.github.io/androidx-ktx-extras/androidx/common/common-enums/index.html) for API usage.
See the [Module docs](./Module.md) for more information on how to include this artifact in your
build script, and
the [generated Dokka documentation](https://edricchan03.github.io/androidx-ktx-extras/androidx/common/common-enums/index.html)
for API usage.

---

<a name="0.0.2"></a>

## 0.0.2 (17 Jul 2023)

* [GitHub release](https://github.com/EdricChan03/androidx-ktx-extras/releases/tag/[email protected])
* [Full changelog](https://github.com/EdricChan03/androidx-ktx-extras/compare/[email protected]@0.0.2)

This release does not contain any new features, and should be backwards-compatible
with [0.0.1](#001-29-jun-2023).

### Dependency updates

Artifact | Old version | New version
---|---|---
[Kotlin](https://kotlinlang.org) | [`1.8.21`](https://github.com/JetBrains/kotlin/releases/tag/v1.8.21) | [`1.8.22`](https://github.com/JetBrains/kotlin/releases/tag/v1.8.22)

### Relocation notice

The artifact is now published under the `io.github.edricchan03.androidx.common:common-enums`
artifact:

Old artifact coordinates | New artifact coordinates
---|---
[`io.github.edricchan03.androidx.common.enums:common-enums`](https://central.sonatype.com/artifact/io.github.edricchan03.androidx.common.enums/common-enums) | [`io.github.edricchan03.androidx.common:common-enums`](https://central.sonatype.com/artifact/io.github.edricchan03.androidx.common/common-enums)

Your build scripts must be updated to the following:

#### Kotlin/Groovy

```diff
-implementation("io.github.edricchan03.androidx.common.enums:common-enums:<version>")
+implementation("io.github.edricchan03.androidx.common:common-enums:<version>")
```

#### Version Catalogs (TOML)

```diff
[libraries]
-androidxtra-common-enums = "io.github.edricchan03.androidx.common.enums:common-enums:<version>
+androidxtra-common-enums = "io.github.edricchan03.androidx.common:common-enums:<version>
```

New versions of the `common-enums` artifact will still be published to the old
artifact ([`io.github.edricchan.androidx.common.enums:common-enums`](https://central.sonatype.com/artifact/io.github.edricchan03.androidx.common.enums/common-enums))
until the next
minor [SemVer](https://semver.org) release, 0.1.0.

<a name="0.0.1"></a>

## 0.0.1 (29 Jun 2023)

This version adds an abstract [`EnumFromValue`](https://edricchan03.github.io/androidx-ktx-extras/androidx/common/common-enums/io.github.edricchan03.androidx.common.enums/-enum-from-value/index.html) class that all enums' companion object with an internal representation should inherit.
* [GitHub release](https://github.com/EdricChan03/androidx-ktx-extras/releases/tag/[email protected])
* [Full changelog](https://github.com/EdricChan03/androidx-ktx-extras/commits/[email protected])

This version adds an
abstract [`EnumFromValue`](https://edricchan03.github.io/androidx-ktx-extras/androidx/common/common-enums/io.github.edricchan03.androidx.common.enums/-enum-from-value/index.html)
class that all enums' companion object with an internal representation should inherit.

* Initial release
2 changes: 1 addition & 1 deletion androidx/common/common-enums/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
@Suppress("UnstableApiUsage") // Kotlin DSL assignment
androidxKtx {
mavenCoordinates {
version = "0.0.2-SNAPSHOT"
version = "0.0.2"
}

libraryType = LibraryType.Android
Expand Down

0 comments on commit 5b4fb54

Please sign in to comment.