Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
# Vertx Utils changelog
## [1.9.0] - UNRELEASED
## [2.0.0] - UNRELEASED
### Breaking Changes
* None.
* Rebuilt to be Kotlin, so pretty much everything has changed at least a bit. If you want to use Java, keep using v1.
* The `RouteRegisterLogger` class has been replaced with the `logRegisteredRoutes` factory function.
* The following functions have been replaced with `contains`, allowing use of the Kotlin `in` operator:
* `PathParams.exists`.
* `QueryParams.exists`.
* `RouteVersion.includes`.
* `RouteVersionUtils.forVersion` has been replaced with a Kotlin inline equivalent that only needs the factory, not the available routes enum.
* All `JsonUtils` extract helpers are now extensions.

### New Features
* None.

### Enhancements
* None.
* `ChunkedJsonResponse` has been upgraded to a DSL style builder.
* Added inline reified factories for the following, removing the need to pass a class:
* `ExceptionHandler.of` that only needs the handler.
* `ParamType.ofEnum`.
* `HttpChunkedJsonResponse` can now change the status of the underlying response until a `write` has occurred.
* `CaptureChunkedJsonResponse` can now be cleared, allowing it to be reused for capturing additional messages.

### Fixes
* None.
Expand Down
70 changes: 36 additions & 34 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
<parent>
<groupId>com.zepben.maven</groupId>
<artifactId>evolve-super-pom</artifactId>
<version>0.48.0</version>
<version>0.49.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<groupId>com.zepben</groupId>
<artifactId>vertx-utils</artifactId>
<version>1.9.0b2</version>
<version>2.0.0b1</version>

<name>${project.groupId}:${project.artifactId}</name>
<description>Helpers and utils for working with Vert.x in Zepben projects.</description>
Expand Down Expand Up @@ -68,17 +68,9 @@

<dependencies>
<dependency>
<groupId>com.zepben</groupId>
<artifactId>annotations</artifactId>
<version>1.3.0</version>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>RELEASE</version>
<scope>compile</scope>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
</dependency>

<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-core</artifactId>
Expand All @@ -87,37 +79,44 @@
<groupId>io.vertx</groupId>
<artifactId>vertx-web</artifactId>
</dependency>

<!--Apache Packages-->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<groupId>io.vertx</groupId>
<artifactId>vertx-lang-kotlin</artifactId>
<!--
NOTE: Vertx 4.x is based on Kotlin 1.7, so we need to exclude it from importing the libraries
that were moved around in Kotlin 1.8, otherwise we get compile errors when using calls
from these libraries. e.g. `kotlin.io.path.createParentDirectories`
-->
<exclusions>
<exclusion>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
</exclusion>
<exclusion>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk7</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>

<!--
NOTE: Used for HTTP headers, as they aren't compatible with the Vert.x ones, and this is what was already being used
If this is ever sorted out, you can move this to the `test` scope, because it is still needed by `TestsTest`.
-->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>

<!--Testing-->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.zepben</groupId>
<artifactId>test-utils</artifactId>
<version>3.2.0b1</version>
<version>3.3.1</version>
<scope>test</scope>
</dependency>

Expand All @@ -126,7 +125,6 @@
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>5.3.2</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -137,20 +135,24 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<version>${kotlin.version}</version>
<groupId>org.mockito.kotlin</groupId>
<artifactId>mockito-kotlin</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test</artifactId>
<version>${kotlin.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
24 changes: 0 additions & 24 deletions src/main/java/com/zepben/vertxutils/json/Collectors.java

This file was deleted.

17 changes: 17 additions & 0 deletions src/main/java/com/zepben/vertxutils/json/Collectors.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright 2026 Zeppelin Bend Pty Ltd
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package com.zepben.vertxutils.json

import io.vertx.core.json.JsonArray

object Collectors {

fun <T> Sequence<T>.toJsonArray(): JsonArray =
JsonArray(toList())

}

This file was deleted.

Loading
Loading