Module name for Java 9+ #11
Add this line to MANIFEST.MF: Automatic-Module-Name: com.github.f4b6a3.ulid
This commit is contained in:
parent
105a0c7072
commit
d3277fe372
19
CHANGELOG.md
19
CHANGELOG.md
|
@ -4,7 +4,11 @@ All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
Nothing.
|
## [3.1.1] - 2021-07-17
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added module name for Java 9+
|
||||||
|
|
||||||
## [3.1.0] - 2021-02-13
|
## [3.1.0] - 2021-02-13
|
||||||
|
|
||||||
|
@ -32,7 +36,7 @@ Adds static methods for extracting information from ULIDs.
|
||||||
|
|
||||||
This version breaks compatibility. It is a rewrite from scratch.
|
This version breaks compatibility. It is a rewrite from scratch.
|
||||||
|
|
||||||
Now the `uuid-creator` can generate two types of ULID: default (non-monotonic) and monotonic. Until version 2.3.3 this library only generated monotonic ULIDs.
|
Now the `ulid-creator` can generate two types of ULID: default (non-monotonic) and monotonic. Until version 2.3.3 this library only generated monotonic ULIDs.
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
@ -51,9 +55,9 @@ Now the `uuid-creator` can generate two types of ULID: default (non-monotonic) a
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Rewrited `ulid-creator`
|
- Rewrote `UlidCreator`
|
||||||
- Rewrited all `README.md`
|
- Rewrote all `README.md`
|
||||||
- Rewrited all test cases
|
- Rewrote all test cases
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
@ -65,7 +69,7 @@ Now the `uuid-creator` can generate two types of ULID: default (non-monotonic) a
|
||||||
- Removed class `InvalidUlidException`, replaced by `IllegalArgumentException`
|
- Removed class `InvalidUlidException`, replaced by `IllegalArgumentException`
|
||||||
- Removed interface `RandomStrategy`, replaced by `RandomGenerator`
|
- Removed interface `RandomStrategy`, replaced by `RandomGenerator`
|
||||||
- Removed class `DefaultRandomStrategy`, replaced by `DefaultRandomGenerator`
|
- Removed class `DefaultRandomStrategy`, replaced by `DefaultRandomGenerator`
|
||||||
- Removed class `OtherRandomStrategy``
|
- Removed class `OtherRandomStrategy`
|
||||||
- Removed interface `TimestampStrategy`
|
- Removed interface `TimestampStrategy`
|
||||||
- Removed class `DefaultTimestampStrategy`
|
- Removed class `DefaultTimestampStrategy`
|
||||||
- Removed class `FixedTimestampStrategy`
|
- Removed class `FixedTimestampStrategy`
|
||||||
|
@ -225,7 +229,8 @@ Project created as an alternative Java implementation of [ULID spec](https://git
|
||||||
- Added `LICENSE`
|
- Added `LICENSE`
|
||||||
- Added test cases
|
- Added test cases
|
||||||
|
|
||||||
[unreleased]: https://github.com/f4b6a3/ulid-creator/compare/ulid-creator-3.1.0...HEAD
|
[unreleased]: https://github.com/f4b6a3/ulid-creator/compare/ulid-creator-3.1.1...HEAD
|
||||||
|
[3.1.0]: https://github.com/f4b6a3/ulid-creator/compare/ulid-creator-3.1.0...ulid-creator-3.1.1
|
||||||
[3.1.0]: https://github.com/f4b6a3/ulid-creator/compare/ulid-creator-3.0.1...ulid-creator-3.1.0
|
[3.1.0]: https://github.com/f4b6a3/ulid-creator/compare/ulid-creator-3.0.1...ulid-creator-3.1.0
|
||||||
[3.0.1]: https://github.com/f4b6a3/ulid-creator/compare/ulid-creator-3.0.0...ulid-creator-3.0.1
|
[3.0.1]: https://github.com/f4b6a3/ulid-creator/compare/ulid-creator-3.0.0...ulid-creator-3.0.1
|
||||||
[3.0.0]: https://github.com/f4b6a3/ulid-creator/compare/ulid-creator-2.3.3...ulid-creator-3.0.0
|
[3.0.0]: https://github.com/f4b6a3/ulid-creator/compare/ulid-creator-2.3.3...ulid-creator-3.0.0
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
# ULID Creator
|
# ULID Creator
|
||||||
|
|
||||||
A Java library for generating [ULIDs](https://github.com/ulid/spec).
|
A Java library for generating [ULIDs](https://github.com/ulid/spec) (Universally Unique Lexicographically Sortable Identifier).
|
||||||
|
|
||||||
* Generated in lexicographical order;
|
* Generated in lexicographical order;
|
||||||
* Can be stored as a UUID/GUID;
|
* Can be stored as a UUID/GUID;
|
||||||
|
@ -35,11 +35,13 @@ Add these lines to your `pom.xml`.
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.f4b6a3</groupId>
|
<groupId>com.github.f4b6a3</groupId>
|
||||||
<artifactId>ulid-creator</artifactId>
|
<artifactId>ulid-creator</artifactId>
|
||||||
<version>3.1.0</version>
|
<version>3.1.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
See more options in [maven.org](https://search.maven.org/artifact/com.github.f4b6a3/ulid-creator).
|
See more options in [maven.org](https://search.maven.org/artifact/com.github.f4b6a3/ulid-creator).
|
||||||
|
|
||||||
|
Module name: `com.github.f4b6a3.ulid`.
|
||||||
|
|
||||||
### ULID
|
### ULID
|
||||||
|
|
||||||
The ULID is a 128 bit long identifier. The first 48 bits represent the count of milliseconds since Unix Epoch, 1970-01-01. The remaining 80 bits are generated by a secure random number generator.
|
The ULID is a 128 bit long identifier. The first 48 bits represent the count of milliseconds since Unix Epoch, 1970-01-01. The remaining 80 bits are generated by a secure random number generator.
|
||||||
|
@ -211,7 +213,7 @@ UlidFactory factory = UlidCreator.getDefaultFactory().withRandomGenerator(awesom
|
||||||
Ulid ulid = factory.create();
|
Ulid ulid = factory.create();
|
||||||
```
|
```
|
||||||
|
|
||||||
(*) since it provides a void method like `nextBytes(byte[])`.
|
(*) as long as it provides a void method like `nextBytes(byte[])`.
|
||||||
|
|
||||||
Benchmark
|
Benchmark
|
||||||
------------------------------------------------------
|
------------------------------------------------------
|
||||||
|
|
24
pom.xml
24
pom.xml
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
<name>ulid-creator</name>
|
<name>ulid-creator</name>
|
||||||
<url>http://github.com/f4b6a3/ulid-creator</url>
|
<url>http://github.com/f4b6a3/ulid-creator</url>
|
||||||
<description>A Java library for generating and handling ULIDs.</description>
|
<description>A Java library for generating and handling ULIDs (Universally Unique Lexicographically Sortable Identifier).</description>
|
||||||
|
|
||||||
|
|
||||||
<licenses>
|
<licenses>
|
||||||
|
@ -25,10 +25,11 @@
|
||||||
</developers>
|
</developers>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
||||||
<jdk.version>8</jdk.version>
|
<jdk.version>8</jdk.version>
|
||||||
|
<module.name>com.github.f4b6a3.ulid</module.name>
|
||||||
<maven.compiler.source>${jdk.version}</maven.compiler.source>
|
<maven.compiler.source>${jdk.version}</maven.compiler.source>
|
||||||
<maven.compiler.target>${jdk.version}</maven.compiler.target>
|
<maven.compiler.target>${jdk.version}</maven.compiler.target>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -60,6 +61,25 @@
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
|
<version>3.2.0</version>
|
||||||
|
<configuration>
|
||||||
|
<archive>
|
||||||
|
<manifestEntries>
|
||||||
|
<Automatic-Module-Name>${module.name}</Automatic-Module-Name>
|
||||||
|
</manifestEntries>
|
||||||
|
</archive>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>3.2.0</version>
|
||||||
|
<configuration>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-deploy-plugin</artifactId>
|
<artifactId>maven-deploy-plugin</artifactId>
|
||||||
<version>2.8.2</version>
|
<version>2.8.2</version>
|
||||||
|
|
Loading…
Reference in New Issue