Skip to content

Commit 59d6b26

Browse files
committed
release 0.1.1
mark java-uuid-generator as internal dependency
1 parent 1f2d0a3 commit 59d6b26

File tree

6 files changed

+72
-15
lines changed

6 files changed

+72
-15
lines changed

.circleci/config.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Build
2+
on:
3+
push:
4+
jobs:
5+
build-gradle-project:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v3
9+
- uses: actions/setup-java@v3
10+
with:
11+
distribution: temurin
12+
java-version: 17
13+
- uses: gradle/gradle-build-action@v2.5.1
14+
with:
15+
gradle-version: wrapper
16+
arguments: build
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish
2+
on:
3+
workflow_dispatch
4+
# release:
5+
# types: [created]
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
- uses: actions/setup-java@v3
12+
with:
13+
distribution: temurin
14+
java-version: 17
15+
- uses: gradle/gradle-build-action@v2.5.1
16+
with:
17+
gradle-version: wrapper
18+
arguments: build publishAllPublicationsToOSSRHRepository
19+
env:
20+
ORG_GRADLE_PROJECT_OSSRHUsername: ${{ secrets.OSSRH_USERNAME }}
21+
ORG_GRADLE_PROJECT_OSSRHPassword: ${{ secrets.OSSRH_TOKEN }}
22+
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_KEY }}
23+
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSPHRASE }}

README.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# typeid-java
22

3-
[![CircleCI](https://circleci.com/gh/fxlae/typeid-java.svg?style=shield)](https://circleci.com/gh/fxlae/typeid-java)
3+
![example workflow](https://github.com/fxlae/typeid-java/actions/workflows/build-on-push.yml/badge.svg)
44

55
## A Java implementation of [TypeID](https://github.com/jetpack-io/typeid).
66

@@ -9,6 +9,24 @@ UUIDv7 standard. They provide a ton of nice properties that make them a great ch
99
as the primary identifiers for your data in a database, APIs, and distributed systems.
1010
Read more about TypeIDs in their [spec](https://github.com/jetpack-io/typeid).
1111

12+
## Installation
13+
14+
Maven:
15+
16+
```xml
17+
<dependency>
18+
<groupId>de.fxlae</groupId>
19+
<artifactId>typeid-java</artifactId>
20+
<version>0.1.0</version>
21+
</dependency>
22+
```
23+
24+
Gradle:
25+
26+
```kotlin
27+
implementation("de.fxlae:typeid-java:0.1.0")
28+
```
29+
1230
## Requirements
1331
- Java 8 or higher
1432

@@ -36,13 +54,13 @@ typeId.getUuid(); // v4, java.util.UUID(9c8ec0e7-020b-4caf-87c0-38fb6c0ebbe2)
3654

3755
Obtain an instance of `TypeID` from a text string (any UUID version):
3856
```java
39-
TypeId typeId = TypeId.parse("01h455vb4pex5vsknk084sn02q")
40-
TypeId typeId = TypeId.parse("someprefix_01h455vb4pex5vsknk084sn02q")
57+
TypeId typeId = TypeId.parse("01h455vb4pex5vsknk084sn02q");
58+
TypeId typeId = TypeId.parse("someprefix_01h455vb4pex5vsknk084sn02q");
4159
```
4260

4361
## Building From Source
4462
```console
4563
foo@bar:~$ git clone https://github.com/fxlae/typeid-java.git
4664
foo@bar:~$ cd typeid-java
47-
foo@bar:~/typeid-java$ ./gradlew assemble
65+
foo@bar:~/typeid-java$ ./gradlew build
4866
```

build.gradle.kts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ plugins {
55
}
66

77
group = "de.fxlae"
8-
version = "0.1.0"
8+
version = "0.1.1-SNAPSHOT"
99

1010
repositories {
1111
mavenCentral()
1212
}
1313

1414
dependencies {
15-
api("com.fasterxml.uuid:java-uuid-generator:4.2.0")
15+
implementation("com.fasterxml.uuid:java-uuid-generator:4.2.0")
1616
testImplementation(platform("org.junit:junit-bom:5.9.1"))
1717
testImplementation("org.junit.jupiter:junit-jupiter")
1818
testImplementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.15.2")
@@ -84,12 +84,19 @@ publishing {
8484
}
8585
repositories {
8686
maven {
87-
url = uri(layout.buildDirectory.dir("repos/releases"))
87+
name = "OSSRH"
88+
val releasesRepoUrl = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
89+
val snapshotsRepoUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
90+
url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl
91+
credentials(PasswordCredentials::class)
8892
}
8993
}
9094
}
9195

9296
signing {
97+
val signingKey: String? by project
98+
val signingPassword: String? by project
99+
useInMemoryPgpKeys(signingKey, signingPassword)
93100
sign(publishing.publications["mavenJava"])
94101
}
95102

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Fri Jun 30 20:28:51 CEST 2023
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)