diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9d35fb1d..e76b7e0b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -129,9 +129,13 @@ jobs: - name: Prepare next dev version id: prepare_next_dev run: | + # gradle sed -i -e 's/${{ needs.version.outputs.CURRENT_VERSION }}/${{ needs.version.outputs.NEXT_VERSION }}/g' gradle.properties sed -i -E -e 's/json-schema-validator((-[a-z]+)?:|\/)[0-9]+\.[0-9]+\.[0-9]+/json-schema-validator\1${{ needs.version.outputs.RELEASE_VERSION }}/g' README.md sed -i -E -e 's/json-schema-validator((-[a-z]+)?:|\/)[0-9]+\.[0-9]+\.[0-9]+(-SNAPSHOT)/json-schema-validator\1${{ needs.version.outputs.NEXT_VERSION }}/g' README.md + # maven + sed -i -e -e 's|[0-9]+\.[0-9]+\.[0-9]+|${{ needs.version.outputs.RELEASE_VERSION }}|g' README.md + sed -i -e -e 's|[0-9]+\.[0-9]+\.[0-9]+(-SNAPSHOT)|${{ needs.version.outputs.NEXT_VERSION }}|g' README.md - name: Commit next dev version id: commit_next_dev uses: EndBug/add-and-commit@v9 diff --git a/README.md b/README.md index 087afb36..45aacc95 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,9 @@ from [kotlinx.serialization-json](https://github.com/Kotlin/kotlinx.serializatio In order to use releases add Maven Central repository to the list of repositories. -##### Kotlin +##### Gradle + +###### Kotlin ```kotlin repositories { @@ -50,7 +52,7 @@ repositories { implementation("io.github.optimumcode:json-schema-validator:0.5.1") ``` -##### Groovy +###### Groovy ```groovy repositories { @@ -68,7 +70,7 @@ implementation("io.github.optimumcode:json-schema-validator") _Release are published to Sonatype repository. The synchronization with Maven Central takes time._ _If you want to use the release right after the publication you should add Sonatype Release repository to your build script._ -##### Kotlin +###### Kotlin ```kotlin repositories { @@ -76,7 +78,7 @@ repositories { } ``` -##### Groovy +###### Groovy ```groovy repositories { @@ -84,11 +86,44 @@ repositories { } ``` +##### Maven + +You can also use `json-schema-validator` as a dependency in your maven project. +But Maven cannot use Gradle's metadata so you need to depend on a JVM-specific artifact in your project: + +```xml + + io.github.optimumcode + json-schema-validator-jvm + 0.5.1 + +``` + +And you can also add a sonatype repository to your POM file + +```xml + + + sonatype-release + sonatype-release + https://s01.oss.sonatype.org/content/repositories/releases/ + + false + + + true + + + +``` + #### Snapshots _If you want to use SNAPSHOT version you should add Sonatype Snapshot repository to your build script._ -##### Kotlin +##### Gradle + +###### Kotlin ```kotlin repositories { @@ -103,7 +138,7 @@ implementation(platform("io.github.optimumcode:json-schema-validator-bom:0.5.2-S implementation("io.github.optimumcode:json-schema-validator") ``` -##### Groovy +###### Groovy ```groovy repositories { @@ -113,6 +148,36 @@ repositories { implementation 'io.github.optimumcode:json-schema-validator:0.5.2-SNAPSHOT' ``` +##### Maven + +For the Maven you need to add a snapshot repository to your POM file + +```xml + + + sonatype + sonatype-snapshot + https://s01.oss.sonatype.org/content/repositories/snapshots/ + + true + + + false + + + +``` + +And then you can add a dependency to a SNAPSHOT version + +```xml + + io.github.optimumcode + json-schema-validator-jvm + 0.5.2-SNAPSHOT + +``` + ### Example If you have just one JSON schema or many independent schemes