Skip to content

Commit e8d76d4

Browse files
author
Adrian Tosca
committed
update and publish docs
1 parent 46d2b0f commit e8d76d4

File tree

10 files changed

+494
-23
lines changed

10 files changed

+494
-23
lines changed

.github/workflows/publish-on-release.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: Publish
22
on:
33
workflow_dispatch
4-
# release:
5-
# types: [created]
4+
permissions:
5+
contents: write
66
jobs:
77
publish:
88
runs-on: ubuntu-latest
@@ -16,6 +16,11 @@ jobs:
1616
- run: ./gradlew build
1717
- run: ./gradlew publish
1818
- run: ./gradlew jreleaserFullRelease
19+
- uses: JamesIves/github-pages-deploy-action@releases/v3
20+
with:
21+
ACCESS_TOKEN: ${{ secrets.JRELEASER_GITHUB_TOKEN }}
22+
BRANCH: gh-pages
23+
FOLDER: build/dokka/html
1924
env:
2025
ENV: "CI"
2126
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.JRELEASER_GPG_PUBLIC_KEY }}

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# typeid-kotlin
22
![Build Status](https://github.com/aleris/typeid-kotlin/actions/workflows/build-on-push.yml/badge.svg)
3-
![Current Version](https://img.shields.io/badge/Version-0.0.7-blue)
3+
![Current Version](https://img.shields.io/badge/Version-0.0.8-blue)
44

55

66
## A Kotlin implementation of [TypeID](https://github.com/jetpack-io/typeid).
@@ -23,14 +23,14 @@ To use with Maven:
2323
<dependency>
2424
<groupId>earth.adi</groupId>
2525
<artifactId>typeid-kotlin</artifactId>
26-
<version>0.0.7</version>
26+
<version>0.0.8</version>
2727
</dependency>
2828
```
2929

3030
To use via Gradle:
3131

3232
```kotlin
33-
implementation("earth.adi:typeid-kotlin:0.0.7")
33+
implementation("earth.adi:typeid-kotlin:0.0.8")
3434
```
3535

3636

build.gradle.kts

+11-6
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ plugins {
1414

1515
group = "earth.adi"
1616

17-
version = "0.0.7"
17+
version = "0.0.8"
1818

1919
repositories { mavenCentral() }
2020

@@ -52,10 +52,7 @@ configure<com.diffplug.gradle.spotless.SpotlessExtension> {
5252
}
5353
}
5454

55-
task<Exec>("updateReadmeVersion") {
56-
// mustRunAfter(tasks.build)
57-
commandLine("sh", "./scripts/updateReadmeVersion.sh")
58-
}
55+
task<Exec>("updateReadmeVersion") { commandLine("sh", "./scripts/updateReadmeVersion.sh") }
5956

6057
tasks.test {
6158
useJUnitPlatform()
@@ -150,7 +147,15 @@ publishing {
150147
repositories { maven { url = stagingDir.get().asFile.toURI() } }
151148
}
152149

153-
tasks.publish { dependsOn(tasks.dokkaJekyll) }
150+
tasks {
151+
register<Jar>("dokkaJar") {
152+
from(dokkaHtml)
153+
dependsOn(dokkaHtml)
154+
archiveClassifier.set("javadoc")
155+
}
156+
}
157+
158+
tasks.publish { dependsOn(tasks.dokkaHtml) }
154159

155160
jreleaser {
156161
project {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/**
2+
* Provides classes for encoding and decoding Type IDs.
3+
*/
4+
package earth.adi.typeid.codec;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/**
2+
* Contains the Jackson Type ID module for JSON serialization and deserialization.
3+
*/
4+
package earth.adi.typeid.jackson;
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
/**
2-
* TypeID package.
2+
* Kotlin implementation of <a href="https://github.com/jetpack-io/typeid">TypeID</a>.
3+
* <p>
4+
* TypeIDs are a modern, type-safe, globally unique identifier based on the upcoming
5+
* UUIDv7 standard. They provide a ton of nice properties that make them a great choice
6+
* as the primary identifiers for your data in a database, APIs, and distributed systems.
7+
* Read more about TypeIDs in their <a href="https://github.com/jetpack-io/typeid">spec</a>.
8+
* </p>
9+
* <p>
10+
* This library provides a Kotlin implementation of TypeIDs, including the ability to
11+
* generate new TypeIDs, parse existing TypeIDs, and convert TypeIDs to and from strings.
12+
* </p>
13+
* <p>
14+
* It uses a type-safe approach to ensure that you can't accidentally mix up TypeIDs for a specific
15+
* entity with TypeIDs for another entity.
16+
* </p>
317
*/
418
package earth.adi.typeid;

src/main/kotlin/earth/adi/typeid/Id.kt

-7
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,4 @@ data class Id<TEntity>(val typedPrefix: TypedPrefix<out TEntity>, val uuid: UUID
4949
override fun toString(): String {
5050
return Codec.encode(typedPrefix.prefix, uuid)
5151
}
52-
53-
companion object {
54-
/**
55-
* The suffix for all id types, used for creating default prefixes from the identifier names.
56-
*/
57-
const val ID_SUFFIX = "Id"
58-
}
5952
}

0 commit comments

Comments
 (0)