diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c40c39be64..7148746292 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,21 +27,16 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} cache: gradle - - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - export REMOTE="https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git" - export GIT_COMMITTER_NAME="${GITHUB_ACTOR}" - export GIT_COMMITTER_EMAIL="project@hexagontk.com" - git remote set-url origin "$REMOTE" - ./gradlew build - ./gradlew -x build buildSite - ls -AlF site/build/site + # TODO + # - env: + # REPOSITORY_PASSWORD: ${{ secrets.HEXAGONTK_REPOSITORY_PASSWORD }} + # REPOSITORY_USERNAME: ${{ secrets.HEXAGONTK_REPOSITORY_USERNAME }} + # SIGNING_KEY: ${{ secrets.HEXAGONTK_SIGNING_KEY }} + # SIGNING_PASSWORD: ${{ secrets.HEXAGONTK_SIGNING_PASSWORD }} + # run: ./gradlew --no-daemon -x test release -# TODO -# - env: -# REPOSITORY_PASSWORD: ${{ secrets.HEXAGONTK_REPOSITORY_PASSWORD }} -# REPOSITORY_USERNAME: ${{ secrets.HEXAGONTK_REPOSITORY_USERNAME }} -# SIGNING_KEY: ${{ secrets.HEXAGONTK_SIGNING_KEY }} -# SIGNING_PASSWORD: ${{ secrets.HEXAGONTK_SIGNING_PASSWORD }} -# run: ./gradlew --no-daemon -x test release + build_site: + uses: hexagontk/hexagon/.github/workflows/site.yml@develop + needs: publish + with: + options: -P pushSite=true diff --git a/.github/workflows/release_branch.yml b/.github/workflows/release_branch.yml index ec8ec926d4..feb96d3258 100644 --- a/.github/workflows/release_branch.yml +++ b/.github/workflows/release_branch.yml @@ -27,16 +27,6 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} cache: gradle - - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - export REMOTE="https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git" - git remote set-url origin "$REMOTE" - git clone "$REMOTE" --branch gh-pages build/gh-pages - ./gradlew build - ./gradlew -x build buildSite - ls -AlF site/build/site - - env: OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} @@ -44,9 +34,8 @@ jobs: SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} run: ./gradlew --no-daemon -x test release - - run: | - cp -rf site/build/site/* build/gh-pages/ - cd build/gh-pages - git add --all - git commit -m "Publishing to gh-pages" - git push origin gh-pages + push_site: + uses: hexagontk/hexagon/.github/workflows/site.yml@develop + needs: publish + with: + options: -P pushSite=true diff --git a/.github/workflows/site.yml b/.github/workflows/site.yml index b51d319ea4..5cf0701103 100644 --- a/.github/workflows/site.yml +++ b/.github/workflows/site.yml @@ -27,6 +27,11 @@ on: description: Directory to check for build execution. default: site/build/site + options: + type: string + description: Extra options for the 'buildSite' target. + default: '' + jobs: site: runs-on: ubuntu-latest @@ -54,14 +59,13 @@ jobs: java-version: ${{ inputs.java }} cache: gradle - - run: ./gradlew --stacktrace build - - env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | export GIT_COMMITTER_NAME="${GITHUB_ACTOR}" export GIT_COMMITTER_EMAIL="project@hexagontk.com" - ./gradlew --stacktrace -x build buildSite + ./gradlew --stacktrace build + ./gradlew --stacktrace -x build buildSite ${{ inputs.options }} - if: ${{ inputs.check_directory != '' }} run: ls -AlF "${{ inputs.check_directory }}" diff --git a/.gitignore b/.gitignore index 2952e0d9e6..3d00d5ad4e 100644 --- a/.gitignore +++ b/.gitignore @@ -40,6 +40,7 @@ hs_err_pid* # Other Tools kotlin-js-store/ node_modules/ +.kotlin/ .env # System Files diff --git a/contributing.md b/contributing.md index f19d8e5ec0..84b6b71320 100644 --- a/contributing.md +++ b/contributing.md @@ -104,21 +104,21 @@ If you want to generate the documentation site, check the Hexagon's site module [GitHub Actions]: https://github.com/features/actions ## Major Release Checklist -1. Release site's dependent projects (`hexagon_extra`) -2. Publish their packages using the [Nexus Repository Manager] -3. Merge Hexagon main project to `main` in GitHub -4. Check the site deployment is OK ([https://hexagontk.com]) -5. Publish Hexagon modules using the [Nexus Repository Manager] -6. Create a GitHub release -7. Update starter repositories (Gradle and Maven ones) -8. Update TFB benchmark -9. Update example projects inside the organization -10. Create a changelog to announce the release -11. Publish changelog on: +1. Replace documents' links: `/blob/main/` to `/blob/release/${version}/` +2. Release site's dependent projects (`hexagon_extra`) +3. Publish their packages using the [Nexus Repository Manager] +4. Merge Hexagon main project to `main` in GitHub +5. Check the site deployment is OK ([https://hexagontk.com]) +6. Publish Hexagon modules using the [Nexus Repository Manager] +7. Create a GitHub release +8. Update starter repositories (Gradle and Maven ones) +9. Update TFB benchmark +10. Update example projects inside the organization +11. Create a changelog to announce the release +12. Publish changelog on: * Dev.to * Reddit Kotlin * X (Twitter) - * Kotlin Weekly Newsletter * LinkedIn * Mailing lists (Awesome Kotlin, Kotlin Weekly) diff --git a/core/README.md b/core/README.md index befd115138..05e6a49466 100644 --- a/core/README.md +++ b/core/README.md @@ -33,7 +33,7 @@ application), you can import it with the following code: JVM information and other useful utilities. Includes basic program settings support at the [Jvm] object (like loading and retrieving system settings). -[Jvm]: /api/core/com.hexagontk.core/-jvm +[Jvm]: api/core/com.hexagontk.core/-jvm # Package com.hexagontk.core.logging Provides a logging management capabilities abstracting the application from logging libraries. @@ -44,7 +44,7 @@ The following code block shows the most common use cases for the [Logger] class: By default, Hexagon uses the [System.Logger] class. -[Logger]: /api/core/com.hexagontk.core.logging/-logger +[Logger]: api/core/com.hexagontk.core.logging/-logger [System.Logger]: https://docs.oracle.com/javase/9/docs/api/java/lang/System.Logger.html # Package com.hexagontk.core.media diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 2c3521197d..a4b76b9530 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 66cd5a0e49..1ed247ec13 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/http/http/src/main/kotlin/com/hexagontk/http/model/HttpField.kt b/http/http/src/main/kotlin/com/hexagontk/http/model/HttpField.kt index 6a1d7855cc..7b4632d26d 100644 --- a/http/http/src/main/kotlin/com/hexagontk/http/model/HttpField.kt +++ b/http/http/src/main/kotlin/com/hexagontk/http/model/HttpField.kt @@ -2,6 +2,8 @@ package com.hexagontk.http.model /** * HTTP multi-value field. Used in headers, query parameters and form parameters. + * + * TODO Convert to name: String, value: Map */ interface HttpField { val name: String diff --git a/http/http_client/README.md b/http/http_client/README.md index 22a23e9db3..67d68163d6 100644 --- a/http/http_client/README.md +++ b/http/http_client/README.md @@ -20,7 +20,7 @@ Its main functionalities are: This module is not meant to be used directly. You should include an Adapter implementing this feature (as [http_client_jetty]) in order to create HTTP clients. -[http_client_jetty]: /http_client_jetty +[http_client_jetty]: http_client_jetty # Create an HTTP client You create an HTTP Client instance with default options as follows: @@ -40,8 +40,8 @@ Check this code snippet to get a glimpse on how to send the most general request @code http/http_test/src/main/kotlin/com/hexagontk/http/test/examples/ClientTest.kt?genericRequest -[Request]: /api/http/http/com.hexagontk.http.model/-http-request -[Response]: /api/http/http/com.hexagontk.http.model/-http-response +[Request]: api/http/http/com.hexagontk.http.model/-http-request +[Response]: api/http/http/com.hexagontk.http.model/-http-response # Simple requests shortcuts There are utility methods to make the most common request in an easy way. @@ -89,8 +89,8 @@ format. To set up client/server certificates, you need to include [SslSettings] in your [ClientSettings]. In the sections below you can see how to configure these parameters. -[SslSettings]: /api/http/http/com.hexagontk.http/-ssl-settings -[ClientSettings]: /api/http/http_client/com.hexagontk.http.client/-http-client-settings +[SslSettings]: api/http/http/com.hexagontk.http/-ssl-settings +[ClientSettings]: api/http/http_client/com.hexagontk.http.client/-http-client-settings ## Key Store This store holds the identity certificate, this certificate is presented to the server by the client @@ -115,4 +115,4 @@ and client authenticated by the server). You can see a complete example below: # Package com.hexagontk.http.client This package holds the classes that define the HTTP client and its configuration settings. -[http]: /http +[http]: http diff --git a/http/http_client_java/README.md b/http/http_client_java/README.md index 910f138ae5..8e4798bf40 100644 --- a/http/http_client_java/README.md +++ b/http/http_client_java/README.md @@ -2,7 +2,7 @@ # Module http_client_java [http_client] implementation using the [Java HTTP Client] classes. -[http_client]: /http_client +[http_client]: http_client [Java HTTP Client]: https://docs.oracle.com/en/java/javase/21/docs/api/java.net.http/java/net/http/HttpClient.html ### Install the Dependency diff --git a/http/http_client_jetty/README.md b/http/http_client_jetty/README.md index 003fb06df8..5d835c9dc8 100644 --- a/http/http_client_jetty/README.md +++ b/http/http_client_jetty/README.md @@ -2,7 +2,7 @@ # Module http_client_jetty [http_client] implementation using the [Jetty HTTP Client] library. -[http_client]: /http_client +[http_client]: http_client [Jetty HTTP Client]: https://jetty.org/docs/jetty/12/programming-guide ### Install the Dependency diff --git a/http/http_client_jetty_ws/README.md b/http/http_client_jetty_ws/README.md index 09c658db04..d40a70ea32 100644 --- a/http/http_client_jetty_ws/README.md +++ b/http/http_client_jetty_ws/README.md @@ -6,7 +6,7 @@ > > WebSockets are not supported on GraalVM native images at the moment. -[http_client]: /http_client +[http_client]: http_client [Jetty HTTP Client]: https://jetty.org/docs/jetty/12/programming-guide ### Install the Dependency diff --git a/http/http_handlers/README.md b/http/http_handlers/README.md index 26df4c702b..ccd3d9e776 100644 --- a/http/http_handlers/README.md +++ b/http/http_handlers/README.md @@ -10,7 +10,7 @@ handlers. This module is not meant to be used directly. You should include and Adapter implementing this feature (as [http_server_jetty]) in order to create an HTTP server. -[http_server_jetty]: /http_server_jetty +[http_server_jetty]: http_server_jetty # Chaining changes The response can be modified chaining `send` calls (or its utility methods). However, If calls are @@ -77,17 +77,17 @@ methods. @code http/http_test/src/main/kotlin/com/hexagontk/http/test/examples/SamplesTest.kt?serverCreation -[server settings]: /api/http/http_server/com.hexagontk.http.server/-http-server-settings -[handlers section]: /http_server/#handlers -[start()]: /api/http/http_server/com.hexagontk.http.server/-http-server -[stop()]: /api/http/http_server/com.hexagontk.http.server/-http-server +[server settings]: api/http/http_server/com.hexagontk.http.server/-http-server-settings +[handlers section]: http_server/#handlers +[start()]: api/http/http_server/com.hexagontk.http.server/-http-server +[stop()]: api/http/http_server/com.hexagontk.http.server/-http-server ## Servlet Web server There is a special server adapter for running inside Servlet Containers. To use it you should import the Servlet HTTP Server Adapter into your project. Check the [http_server_servlet] module for more information. -[http_server_servlet]: /http_server_servlet +[http_server_servlet]: http_server_servlet # HTTP Context These are the events that the handlers handle (they are also called HTTP calls or just calls along @@ -103,7 +103,7 @@ full list of methods. This sample code illustrates the usage: @code http/http_test/src/main/kotlin/com/hexagontk/http/test/examples/SamplesTest.kt?callbackCall -[API documentation]: /api/http/http_handlers/com.hexagontk.http.handlers/-http-context +[API documentation]: api/http/http_handlers/com.hexagontk.http.handlers/-http-context # Handlers The main building blocks of Hexagon HTTP services are a set of handlers. A handler is made up of two @@ -139,7 +139,7 @@ Check the next snippet for Handlers usage examples: @code http/http_test/src/main/kotlin/com/hexagontk/http/test/examples/SamplesTest.kt?routesCreation -[next]: /api/http/http_handlers/com.hexagontk.http.handlers/-http-context +[next]: api/http/http_handlers/com.hexagontk.http.handlers/-http-context @@ -157,7 +157,7 @@ the following fields: It yields true if all the supplied fields matches a call context. -[HttpPredicate]: /api/http/http_handlers/com.hexagontk.http.handlers/-http-predicate +[HttpPredicate]: api/http/http_handlers/com.hexagontk.http.handlers/-http-predicate ## Path Patterns Patterns to match requests paths. They can have: @@ -294,7 +294,7 @@ Check the next example for details: The media types of static files are computed from the file extension using the utility methods of the [com.hexagontk.core.media] package. -[com.hexagontk.core.media]: /api/core/com.hexagontk.core.media +[com.hexagontk.core.media]: api/core/com.hexagontk.core.media # CORS CORS behaviour can be different depending on the path. You can attach different [CORS Callbacks] to @@ -302,7 +302,7 @@ different handlers. Check the [CorsCallback][CORS Callbacks] class for more deta @code http/http_test/src/main/kotlin/com/hexagontk/http/test/examples/CorsTest.kt?cors -[CORS Callbacks]: /api/http/http_server/com.hexagontk.http.server.callbacks/-cors-callback +[CORS Callbacks]: api/http/http_server/com.hexagontk.http.server.callbacks/-cors-callback # HTTPS It is possible to start a secure server enabling HTTPS. For this, you have to provide a server @@ -327,14 +327,14 @@ Below you can find a simple example to set up an HTTPS server and client with mu @code http/http_test/src/main/kotlin/com/hexagontk/http/test/examples/HttpsTest.kt?https -[SslSettings]: /api/http/http/com.hexagontk.http/-ssl-settings +[SslSettings]: api/http/http/com.hexagontk.http/-ssl-settings [HTTP/2]: https://en.wikipedia.org/wiki/HTTP/2 [ALPN]: https://en.wikipedia.org/wiki/Application-Layer_Protocol_Negotiation [Gradle]: https://gradle.org -[create sample certificates]: /gradle/#certificates +[create sample certificates]: gradle/#certificates [mutual TLS]: https://en.wikipedia.org/wiki/Mutual_authentication -[SslSettings.clientAuth]: /api/http/http/com.hexagontk.http/-ssl-settings -[Request.certificateChain]: /api/http/http/com.hexagontk.http.model/-http-request +[SslSettings.clientAuth]: api/http/http/com.hexagontk.http/-ssl-settings +[Request.certificateChain]: api/http/http/com.hexagontk.http.model/-http-request # WebSockets A Web Socket is an HTTP(S) connection made with the GET method and the `upgrade: websocket` and @@ -405,4 +405,4 @@ Classes to model server HTTP messages (requests and responses). Built on top of # Package com.hexagontk.http.model.ws Classes to model server HTTP messages (requests and responses). Built on top of the [http] module. -[http]: /http +[http]: http diff --git a/http/http_server/README.md b/http/http_server/README.md index 198eae1a40..e35eec74d6 100644 --- a/http/http_server/README.md +++ b/http/http_server/README.md @@ -10,7 +10,7 @@ handlers. This module is not meant to be used directly. You should include and Adapter implementing this feature (as [http_server_jetty]) in order to create an HTTP server. -[http_server_jetty]: /http_server_jetty +[http_server_jetty]: http_server_jetty # Context on HTTP processing An HTTP server is nothing more than a function that takes a request and returns a response. Requests @@ -72,17 +72,17 @@ methods. @code http/http_test/src/main/kotlin/com/hexagontk/http/test/examples/SamplesTest.kt?serverCreation -[server settings]: /api/http/http_server/com.hexagontk.http.server/-http-server-settings -[handlers section]: /http_server/#handlers -[start()]: /api/http/http_server/com.hexagontk.http.server/-http-server -[stop()]: /api/http/http_server/com.hexagontk.http.server/-http-server +[server settings]: api/http/http_server/com.hexagontk.http.server/-http-server-settings +[handlers section]: http_server/#handlers +[start()]: api/http/http_server/com.hexagontk.http.server/-http-server +[stop()]: api/http/http_server/com.hexagontk.http.server/-http-server ## Servlet Web server There is a special server adapter for running inside Servlet Containers. To use it you should import the Servlet HTTP Server Adapter into your project. Check the [http_server_servlet] module for more information. -[http_server_servlet]: /http_server_servlet +[http_server_servlet]: http_server_servlet # HTTP Context These are the events that the handlers handle (they are also called HTTP calls or just calls along @@ -98,7 +98,7 @@ full list of methods. This sample code illustrates the usage: @code http/http_test/src/main/kotlin/com/hexagontk/http/test/examples/SamplesTest.kt?callbackCall -[API documentation]: /api/http/http_handlers/com.hexagontk.http.handlers/-http-context +[API documentation]: api/http/http_handlers/com.hexagontk.http.handlers/-http-context # Handlers The main building blocks of Hexagon HTTP services are a set of handlers. A handler is made up of two @@ -134,7 +134,7 @@ Check the next snippet for Handlers usage examples: @code http/http_test/src/main/kotlin/com/hexagontk/http/test/examples/SamplesTest.kt?routesCreation -[next]: /api/http/http_handlers/com.hexagontk.http.handlers/-http-context +[next]: api/http/http_handlers/com.hexagontk.http.handlers/-http-context @@ -152,7 +152,7 @@ the following fields: It yields true if all the supplied fields matches a call context. -[HttpPredicate]: /api/http/http_handlers/com.hexagontk.http.handlers/-http-predicate +[HttpPredicate]: api/http/http_handlers/com.hexagontk.http.handlers/-http-predicate ## Path Patterns Patterns to match requests paths. They can have: @@ -289,7 +289,7 @@ Check the next example for details: The media types of static files are computed from the file extension using the utility methods of the [com.hexagontk.core.media] package. -[com.hexagontk.core.media]: /api/core/com.hexagontk.core.media +[com.hexagontk.core.media]: api/core/com.hexagontk.core.media # CORS CORS behaviour can be different depending on the path. You can attach different [CORS Callbacks] to @@ -297,7 +297,7 @@ different handlers. Check the [CorsCallback][CORS Callbacks] class for more deta @code http/http_test/src/main/kotlin/com/hexagontk/http/test/examples/CorsTest.kt?cors -[CORS Callbacks]: /api/http/http_server/com.hexagontk.http.server.callbacks/-cors-callback +[CORS Callbacks]: api/http/http_server/com.hexagontk.http.server.callbacks/-cors-callback # HTTPS It is possible to start a secure server enabling HTTPS. For this, you have to provide a server @@ -322,14 +322,14 @@ Below you can find a simple example to set up an HTTPS server and client with mu @code http/http_test/src/main/kotlin/com/hexagontk/http/test/examples/HttpsTest.kt?https -[SslSettings]: /api/http/http/com.hexagontk.http/-ssl-settings +[SslSettings]: api/http/http/com.hexagontk.http/-ssl-settings [HTTP/2]: https://en.wikipedia.org/wiki/HTTP/2 [ALPN]: https://en.wikipedia.org/wiki/Application-Layer_Protocol_Negotiation [Gradle]: https://gradle.org -[create sample certificates]: /gradle/#certificates +[create sample certificates]: gradle/#certificates [mutual TLS]: https://en.wikipedia.org/wiki/Mutual_authentication -[SslSettings.clientAuth]: /api/http/http/com.hexagontk.http/-ssl-settings -[Request.certificateChain]: /api/http/http/com.hexagontk.http.model/-http-request +[SslSettings.clientAuth]: api/http/http/com.hexagontk.http/-ssl-settings +[Request.certificateChain]: api/http/http/com.hexagontk.http.model/-http-request # WebSockets A Web Socket is an HTTP(S) connection made with the GET method and the `upgrade: websocket` and diff --git a/http/http_server_helidon/README.md b/http/http_server_helidon/README.md index 6105ff07ca..abaa6d028c 100644 --- a/http/http_server_helidon/README.md +++ b/http/http_server_helidon/README.md @@ -6,7 +6,7 @@ IMPORTANT: There is a [known bug] in this adapter. [known bug]: https://github.com/hexagontk/hexagon/issues/704 [Helidon]: https://helidon.io -[http_server]: /http_server +[http_server]: http_server ### Install the Dependency diff --git a/http/http_server_jetty/README.md b/http/http_server_jetty/README.md index 2d0aad89e8..1f9f62fb8b 100644 --- a/http/http_server_jetty/README.md +++ b/http/http_server_jetty/README.md @@ -3,7 +3,7 @@ [Jetty] adapter for the [http_server] port. [Jetty]: https://www.eclipse.org/jetty -[http_server]: /http_server +[http_server]: http_server ### Install the Dependency diff --git a/http/http_server_netty/README.md b/http/http_server_netty/README.md index 441fc161db..ef1a9a1c92 100644 --- a/http/http_server_netty/README.md +++ b/http/http_server_netty/README.md @@ -3,7 +3,7 @@ [Netty] adapter for the [http_server] port. [Netty]: https://netty.io -[http_server]: /http_server +[http_server]: http_server ### Install the Dependency diff --git a/http/http_server_netty_epoll/README.md b/http/http_server_netty_epoll/README.md index 75139f140e..98cd41c326 100644 --- a/http/http_server_netty_epoll/README.md +++ b/http/http_server_netty_epoll/README.md @@ -3,7 +3,7 @@ [Netty] Epoll adapter for the [http_server] port. [Netty]: https://netty.io -[http_server]: /http_server +[http_server]: http_server ### Install the Dependency diff --git a/http/web/README.md b/http/web/README.md index 277e26fec3..e4d08f69c0 100644 --- a/http/web/README.md +++ b/http/web/README.md @@ -3,8 +3,8 @@ Adds utilities for serving HTML pages over HTTP servers. Combines the [http_server] and [templates] ports. -[http_server]: /http_server -[templates]: /templates +[http_server]: http_server +[templates]: templates ### Install the Dependency diff --git a/serialization/serialization/README.md b/serialization/serialization/README.md index 271e022cc6..9d9e50a3e7 100644 --- a/serialization/serialization/README.md +++ b/serialization/serialization/README.md @@ -6,7 +6,7 @@ This module holds serialization utilities. This module is not meant to be used directly. You should include an Adapter implementing this feature (as [serialization_dsl_json]) in order to parse/serialize data. -[serialization_dsl_json]: /serialization_dsl_json +[serialization_dsl_json]: serialization_dsl_json === "build.gradle" diff --git a/serialization/serialization_dsl_json/README.md b/serialization/serialization_dsl_json/README.md index d0034f7a12..e6011f0f91 100644 --- a/serialization/serialization_dsl_json/README.md +++ b/serialization/serialization_dsl_json/README.md @@ -2,7 +2,7 @@ # Module http_client_jetty [Serialization] implementation using the [DSL JSON] library. -[Serialization]: /serialization +[Serialization]: serialization [DSL JSON]: https://github.com/ngs-doo/dsl-json ### Install the Dependency diff --git a/serialization/serialization_jackson_csv/src/main/kotlin/com/hexagontk/serialization/jackson/csv/Csv.kt b/serialization/serialization_jackson_csv/src/main/kotlin/com/hexagontk/serialization/jackson/csv/Csv.kt index bc7175cf5f..053b631c75 100644 --- a/serialization/serialization_jackson_csv/src/main/kotlin/com/hexagontk/serialization/jackson/csv/Csv.kt +++ b/serialization/serialization_jackson_csv/src/main/kotlin/com/hexagontk/serialization/jackson/csv/Csv.kt @@ -9,6 +9,7 @@ import com.hexagontk.serialization.SerializationFormat import java.io.InputStream import java.io.OutputStream +// TODO Allow configuring adapter passing settings line fields line object Csv : SerializationFormat { override val mediaType: MediaType = TEXT_CSV diff --git a/settings.gradle.kts b/settings.gradle.kts index 6a358fa22d..0d6d9f7e5e 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -23,14 +23,14 @@ dependencyResolutionManagement { version("dokka", "1.9.20") version("licenseReport", "2.9") version("binValidator", "0.16.3") - version("nativeTools", "0.10.2") - version("detekt", "1.23.6") + version("nativeTools", "0.10.3") + version("detekt", "1.23.7") version("jmhGradle", "0.7.2") - version("gradleWrapper", "8.10") - version("mkdocsMaterial", "9.5.33") + version("gradleWrapper", "8.10.1") + version("mkdocsMaterial", "9.5.34") version("mermaidDokka", "0.6.0") version("maven", "3.9.9") - version("jreleaser", "1.13.1") + version("jreleaser", "1.14.0") // Testing version("junit", "5.11.0") @@ -43,18 +43,18 @@ dependencyResolutionManagement { version("slf4j", "2.0.16") // http_server_netty - version("netty", "4.1.112.Final") - version("nettyTcNative", "2.0.65.Final") + version("netty", "4.1.113.Final") + version("nettyTcNative", "2.0.66.Final") // http_server_helidon - version("helidon", "4.1.0") + version("helidon", "4.1.1") // http_server_servlet version("servlet", "6.1.0") - version("jetty", "12.0.12") + version("jetty", "12.0.13") // rest_tools - version("swaggerRequestValidator", "2.41.0") + version("swaggerRequestValidator", "2.42.0") // serialization version("jackson", "2.17.2") diff --git a/site/build.gradle.kts b/site/build.gradle.kts index 0a3817aa55..f611189d81 100644 --- a/site/build.gradle.kts +++ b/site/build.gradle.kts @@ -18,9 +18,7 @@ tasks.register("jacocoRootReport") { .filterNot { it.absolutePath.contains("http_test") } .filterNot { it.absolutePath.contains("serialization_test") } .filterNot { it.absolutePath.contains("templates_test") } - .filterNot { it.absolutePath.contains("serverless_http_google") } .toList() - // TODO Include the filtered modules when they are ready executionData.from(projectExecutionData) sourceDirectories.from(modulesSources) @@ -125,28 +123,36 @@ task("checkDocs") { tasks.register("installMkDocs") { doLast { val mkdocsMaterialVersion = libs.versions.mkdocsMaterial.get() + val pip = "$venv/bin/pip" exec { commandLine("python -m venv $venv".split(" ")) } - exec { commandLine("$venv/bin/pip install mkdocs-material==$mkdocsMaterialVersion".split(" ")) } - exec { commandLine("$venv/bin/pip install mkdocs-htmlproofer-plugin".split(" ")) } - exec { commandLine("$venv/bin/pip install mike".split(" ")) } + exec { commandLine("$pip install mkdocs-material==$mkdocsMaterialVersion".split(" ")) } + exec { commandLine("$pip install mkdocs-htmlproofer-plugin".split(" ")) } + exec { commandLine("$pip install mike".split(" ")) } } } tasks.register("buildSite") { dependsOn("checkDocs", "installMkDocs") - val siteVersion = findProperty("siteVersion") ?: rootProject.version - val siteAlias = findProperty("siteAlias") ?: "latest" val pushSite = findProperty("pushSite")?.let { if (it == "true") "--push " else "" } ?: "" - - val command = "$venv/bin/mike deploy $pushSite--update-aliases $siteVersion $siteAlias" + val mike = "$venv/bin/mike" + val rootVersion = rootProject.version.toString() + val siteAlias = if (rootVersion.contains(Regex("-[AB]"))) "dev" else "stable" + val majorVersion = "v" + rootVersion.split(".").first() + val command = "$mike deploy $pushSite--update-aliases $majorVersion $siteAlias" environment.put("PATH", System.getenv("PATH") + ":$venv/bin") commandLine(command.split(" ")) } +tasks.register("deleteSite") { + dependsOn("installMkDocs") + environment.put("PATH", System.getenv("PATH") + ":$venv/bin") + commandLine("$venv/bin/mike delete --all".split(" ")) +} + tasks.register("defaultSite") { - val siteAlias = findProperty("siteAlias") ?: "stable" + dependsOn("installMkDocs") environment.put("PATH", System.getenv("PATH") + ":$venv/bin") - commandLine("$venv/bin/mike set-default $siteAlias".split(" ")) + commandLine("$venv/bin/mike set-default stable".split(" ")) } tasks.register("serveSite") { diff --git a/site/mkdocs.yml b/site/mkdocs.yml index 3c43588f90..67693b4a74 100644 --- a/site/mkdocs.yml +++ b/site/mkdocs.yml @@ -127,7 +127,6 @@ extra: version: provider: mike - default: stable alias: true analytics: diff --git a/site/mkdocs/main.html b/site/mkdocs/main.html index 4da7eca085..f99cad2853 100644 --- a/site/mkdocs/main.html +++ b/site/mkdocs/main.html @@ -80,7 +80,7 @@ + src="/v4/img/sponsors/jetbrains-variant-4-bw.svg">

diff --git a/site/mkdocs/partials/language/en.html b/site/mkdocs/partials/language/en.html deleted file mode 100644 index af9c097ea8..0000000000 --- a/site/mkdocs/partials/language/en.html +++ /dev/null @@ -1,36 +0,0 @@ - -{% macro t(key) %}{{ { - "language": "en", - "direction": "ltr", - "clipboard.copy": "Copy to clipboard", - "clipboard.copied": "Copied to clipboard", - "edit.link.title": "Edit this page", - "footer.previous": "Previous", - "footer.next": "Next", - "footer.title": "Footer", - "header.title": "Header", - "meta.comments": "Comments", - "meta.source": "Source", - "nav.title": "Navigation", - "search.config.lang": "en", - "search.config.pipeline": "trimmer, stopWordFilter", - "search.config.separator": "[\s\-]+", - "search.placeholder": "Search", - "search.reset": "Clear", - "search.result.initializer": "Initializing search", - "search.result.placeholder": "Type to start searching", - "search.result.none": "No matching documents", - "search.result.one": "1 matching document", - "search.result.other": "# matching documents", - "search.result.more.one": "1 more on this page", - "search.result.more.other": "# more on this page", - "search.result.term.missing": "Missing", - "skip.link.title": "Skip to content", - "source.link.title": "Go to repository", - "source.revision.date": "Last update", - "source.file.date.updated": "Last update", - "source.file.date.created": "Created", - "tabs.title": "Tabs", - "toc.title": "Page Contents", - "top.title": "Back to top" -}[key] }}{% endmacro %} diff --git a/site/pages/gradle.md b/site/pages/gradle.md index c5dd00ae4c..871ca89d7f 100644 --- a/site/pages/gradle.md +++ b/site/pages/gradle.md @@ -46,7 +46,7 @@ To set up this script's parameters, check the [build variables section]. These h [Maven Central]: https://search.maven.org [kotlin.gradle]: https://github.com/hexagontk/hexagon/blob/main/gradle/kotlin.gradle -[build variables section]: /gradle/#build-variables +[build variables section]: gradle/#build-variables ## Dokka This script set up [Dokka] tool and add a JAR with the project's code documentation to the published diff --git a/site/pages/index.md b/site/pages/index.md index 11f28d7c38..079ed666bb 100644 --- a/site/pages/index.md +++ b/site/pages/index.md @@ -23,10 +23,10 @@ Hexagon is designed to fit in applications that conform to the [Hexagonal Archit [Clean Architecture], [Onion Architecture] or [Ports and Adapters Architecture]). Its design principles also fit into this architecture. -[The HTTP server]: /http_server -[The HTTP client]: /http_client -[Serialization]: /serialization -[Template Processing]: /templates +[The HTTP server]: http_server +[The HTTP client]: http_client +[Serialization]: serialization +[Template Processing]: templates [Hexagonal Architecture]: http://fideloper.com/hexagonal-architecture [Clean Architecture]: https://8thlight.com/blog/uncle-bob/2012/08/13/the-clean-architecture.html [Onion Architecture]: https://dzone.com/articles/onion-architecture-is-interesting @@ -39,8 +39,8 @@ Simple Hello World HTTP example. You can check the [code examples] and [demo projects] for more complex use cases. -[code examples]: /examples/http_server_examples/ -[demo projects]: /examples/example_projects/ +[code examples]: examples/http_server_examples/ +[demo projects]: examples/example_projects/ # Features Hexagon's goals and design principles: @@ -103,14 +103,14 @@ Module that provide functionality that does not depend on different implementati ## Manager Singleton object to manage a cross toolkit aspect. I.e., Serialization or Templates. -[core]: /core -[handlers]: /handlers +[core]: core +[handlers]: handlers -[http_server]: /http_server -[templates]: /templates +[http_server]: http_server +[templates]: templates -[http_client_jetty]: /http_client_jetty -[http_server_jetty]: /http_server_jetty +[http_client_jetty]: http_client_jetty +[http_server_jetty]: http_server_jetty # Hexagon Extras The libraries inside the [hexagon_extra] repository provide extra features. They may be useful to @@ -121,7 +121,7 @@ develop applications, but not strictly required. Some of these modules are: * Args: Command line arguments definition and parsing. [hexagon_extra]: https://github.com/hexagontk/hexagon_extra -[Web]: /web +[Web]: web [Cron]: https://en.wikipedia.org/wiki/Cron # Architecture @@ -132,7 +132,7 @@ How Hexagon fits in your architecture in a picture. > Using this toolkit won't make your application compliant with Hexagonal Architecture (by its > nature, no tool can do that), you have to provide a layer of abstraction by yourself. -![architecture](/img/architecture.svg) +![architecture](img/architecture.svg) # Ports Ports with their provided implementations (Adapters). @@ -144,26 +144,26 @@ Ports with their provided implementations (Adapters). | [Templates] | [Pebble], [FreeMarker], [Rocker], [jte] | | [Serialization Formats] | [JSON], [YAML], [CSV], [XML], [TOML] | -[HTTP Server]: /http_server -[Netty]: /http_server_netty -[Netty Epoll]: /http_server_netty_epoll -[Jetty]: /http_server_jetty -[Servlet]: /http_server_servlet -[Helidon]: /http_server_helidon -[HTTP Client]: /http_client -[Java Client]: /http_client_java -[Jetty Client]: /http_client_jetty -[Templates]: /templates -[Pebble]: /templates_pebble -[FreeMarker]: /templates_freemarker -[Rocker]: /templates_rocker -[jte]: /templates_jte -[Serialization Formats]: /serialization -[JSON]: /api/serialization/serialization_jackson_json/com.hexagontk.serialization.jackson.json/-json -[YAML]: /api/serialization/serialization_jackson_yaml/com.hexagontk.serialization.jackson.yaml/-yaml -[CSV]: /api/serialization/serialization_jackson_csv/com.hexagontk.serialization.jackson.csv/-csv -[XML]: /api/serialization/serialization_jackson_xml/com.hexagontk.serialization.jackson.xml/-xml -[TOML]: /api/serialization/serialization_jackson_toml/com.hexagontk.serialization.jackson.toml/-toml +[HTTP Server]: http_server +[Netty]: http_server_netty +[Netty Epoll]: http_server_netty_epoll +[Jetty]: http_server_jetty +[Servlet]: http_server_servlet +[Helidon]: http_server_helidon +[HTTP Client]: http_client +[Java Client]: http_client_java +[Jetty Client]: http_client_jetty +[Templates]: templates +[Pebble]: templates_pebble +[FreeMarker]: templates_freemarker +[Rocker]: templates_rocker +[jte]: templates_jte +[Serialization Formats]: serialization +[JSON]: api/serialization/serialization_jackson_json/com.hexagontk.serialization.jackson.json/-json +[YAML]: api/serialization/serialization_jackson_yaml/com.hexagontk.serialization.jackson.yaml/-yaml +[CSV]: api/serialization/serialization_jackson_csv/com.hexagontk.serialization.jackson.csv/-csv +[XML]: api/serialization/serialization_jackson_xml/com.hexagontk.serialization.jackson.xml/-xml +[TOML]: api/serialization/serialization_jackson_toml/com.hexagontk.serialization.jackson.toml/-toml # Module Dependencies Module dependencies (including extra modules): diff --git a/site/pages/quick_start.md b/site/pages/quick_start.md index 63421286c9..37a8d0cdc1 100644 --- a/site/pages/quick_start.md +++ b/site/pages/quick_start.md @@ -47,7 +47,7 @@ pub 4096R/2AEE3721 2020-05-30 Hexagon Toolkit (Key used to sign published binar ``` [pgp key]: https://keys.openpgp.org/search?q=project%40hexagonkt.com -[site pgp key]: /project_hexagonkt_com_public.key +[site pgp key]: project_hexagonkt_com_public.key # Dependencies Verification (hexagontk.com) Hexagon's dependencies are signed, you can get the public key at the @@ -61,7 +61,7 @@ pub ed25519/0E16E194 2024-08-24 Hexagon Toolkit (Key used to sign published bin ``` [pgp key 2]: https://keyserver.ubuntu.com/pks/lookup?search=project%40hexagontk.com&op=index -[site pgp key 2]: /project_hexagontk_com_public.key +[site pgp key 2]: project_hexagontk_com_public.key # Next Steps To continue learning about this toolkit, you can: @@ -73,11 +73,11 @@ To continue learning about this toolkit, you can: [Gradle Starter]: https://github.com/hexagontk/gradle_starter [Maven Starter]: https://github.com/hexagontk/maven_starter -[Examples]: /examples/http_server_examples/ +[Examples]: examples/http_server_examples/ [Setup Gradle]: https://kotlinlang.org/docs/reference/using-gradle.html [Setup Maven]: https://kotlinlang.org/docs/reference/using-maven.html [Gradle]: https://gradle.org [Maven]: https://maven.apache.org [Endpoint]: http://localhost:2010/hello -[Core]: /core -[HTTP Server]: /http_server +[Core]: core +[HTTP Server]: http_server diff --git a/templates/templates/README.md b/templates/templates/README.md index 284b0b2945..66408c3d51 100644 --- a/templates/templates/README.md +++ b/templates/templates/README.md @@ -10,8 +10,8 @@ feature (as [templates_pebble] and/or [templates_freemarker]) in order to proces You can use many adapters in the same application to be able to handle different template engines at the same time. -[templates_pebble]: /templates_pebble/ -[templates_freemarker]: /templates_freemarker/ +[templates_pebble]: templates_pebble/ +[templates_freemarker]: templates_freemarker/ # Register a Template Engine You can register multiple template engines using regular expressions: @@ -31,7 +31,7 @@ and `_now_` variables) are added to the context automatically. Check the code be @code templates/templates/src/test/kotlin/com/hexagontk/templates/examples/TemplatesTest.kt?templateUsage -[TemplateManager]: /api/templates/templates/com.hexagontk.templates/-template-manager +[TemplateManager]: api/templates/templates/com.hexagontk.templates/-template-manager # Package com.hexagontk.templates Feature implementation code.