From 2b59860bf3e287008f253f84f6eb071f537ffc05 Mon Sep 17 00:00:00 2001 From: Tobias Date: Tue, 1 Nov 2022 21:49:08 +0100 Subject: [PATCH] Publish version 0.2.1 of the library --- README.md | 33 +++++---------------------------- build.gradle.kts | 9 ++++++++- dokka/index.md | 14 +++++++------- 3 files changed, 20 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 9fdd8a7..edfa834 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![Build status](https://img.shields.io/github/workflow/status/xn32/json5k/Build)](https://github.com/xn32/json5k/actions/workflows/build.yml) [![codecov](https://codecov.io/gh/xn32/json5k/branch/main/graph/badge.svg?token=PBPA7T92CC)](https://codecov.io/gh/xn32/json5k) +[![Maven Central](https://img.shields.io/maven-central/v/io.github.xn32/json5k)](https://search.maven.org/artifact/io.github.xn32/json5k/) [![API documentation](https://img.shields.io/badge/docs-Dokka-informational)](https://xn32.github.io/json5k/api/) This is an experimental [JSON5](https://json5.org/) library for Kotlin/JVM. @@ -10,32 +11,14 @@ It makes use of the [kotlinx.serialization](https://github.com/Kotlin/kotlinx.se ## Key features - Compliance with [v1.0.0](https://spec.json5.org/1.0.0/) of the JSON5 specification -- Support for polymorphic types and configurable class discriminator names +- Support for polymorphic types and configurable class discriminators - Carefully composed error messages for deserialization errors - Support for the serialization of comments for class properties - Rejection of duplicate keys during deserialization ## Setup instructions -This repository contains a Gradle setup that compiles the library into a JAR file. Use this file according to your needs. - -### Recommended versions - -json5k was tested against the following dependencies: - -| json5k | Kotlin plugins | Serialization runtime | -|--------|----------------|-----------------------| -| v0.2.0 | v1.7.20 | v1.4.1 | -| v0.1.0 | v1.7.10 | v1.4.0 | - -### Usage from Gradle - -For evaluation purposes, the easiest solution might be to install the library to your local Maven repository: -```bash -./gradlew publishToMavenLocal -``` - -Afterwards, use it from `build.gradle.kts` as follows: +json5k is available on [Maven Central](https://search.maven.org/artifact/io.github.xn32/json5k): ```kotlin plugins { kotlin("jvm") version "1.7.20" @@ -43,20 +26,14 @@ plugins { } repositories { - mavenLocal { - content { - includeGroup("io.github.xn32") - } - } + mavenCentral() } dependencies { - implementation("io.github.xn32:json5k:0.2.0") + implementation("io.github.xn32:json5k:0.2.1") } ``` -However, keep the [limitations](https://docs.gradle.org/7.5/userguide/declaring_repositories.html#sub:maven_local) of the local Maven repository in mind. - ## Usage examples ### Non-hierarchical values diff --git a/build.gradle.kts b/build.gradle.kts index 4e0d6d5..d818cee 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,7 +13,7 @@ plugins { } group = "io.github.xn32" -version = "0.2.1-SNAPSHOT" +version = "0.2.1" repositories { mavenCentral() @@ -49,6 +49,13 @@ publishing { developerConnection.set("scm:git:ssh://git@github.com/xn32/json5k.git") } + developers { + developer { + id.set("xn32") + url.set("https://github.com/xn32") + } + } + licenses { license { name.set("The Apache Software License, Version 2.0") diff --git a/dokka/index.md b/dokka/index.md index c85db39..1e5345e 100644 --- a/dokka/index.md +++ b/dokka/index.md @@ -1,14 +1,14 @@ # Module json5k -This is a [JSON5](https://json5.org) library for the Kotlin programming language. Is is implemented as a third-party format for the [kotlinx.serialization](https://github.com/Kotlin/kotlinx.serialization) -framework and can both parse and generate JSON5 text. +This is an experimental [JSON5](https://json5.org) library for Kotlin/JVM. Is is implemented as a third-party format for the [kotlinx.serialization](https://github.com/Kotlin/kotlinx.serialization) +framework and can be used to both parse and generate JSON5 text. ## Key features Key features of the library include: - - Compliance with v1.0.0 of the JSON5 specification - - Support for polymorphic types and configurable class discriminator names - - Carefully composed error messages for deserialization errors +- Compliance with v1.0.0 of the JSON5 specification +- Support for polymorphic types and configurable class discriminators +- Carefully composed error messages for deserialization errors -Find a full overview of the library's capabilities [on GitHub](https://github.com/xn32/json5k). +A full description is available [on GitHub](https://github.com/xn32/json5k). # Package io.github.xn32.json5k -Main package encapsulating all public API of the library. +Main package encapsulating the public API of the library.