diff --git a/.git-hooks/pre-commit.sh b/.git-hooks/pre-commit.sh index e683861d..4f0df701 100644 --- a/.git-hooks/pre-commit.sh +++ b/.git-hooks/pre-commit.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash branch_name="$(git rev-parse --abbrev-ref HEAD)" -branch_pattern="^(feature|bugfix|hotfix|infra)/.*$" +branch_pattern="^(feature|bugfix|hotfix|infra|main)/.*$" error_message="Your branch name doesn't match the pattern $branch_pattern. Please correct it before committing." if [[ ! $branch_name =~ $branch_pattern ]] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 43d28657..3d483b0d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ windows-latest, macos-latest ] # ubuntu-latest, ] + os: [ ubuntu-latest, windows-latest, macos-latest ] steps: - name: Checkout uses: actions/checkout@v2.3.3 @@ -27,7 +27,7 @@ jobs: - uses: burrunan/gradle-cache-action@v1 name: Gradle release with caches caching with: - arguments: publishToSonatype closeAndReleaseSonatypeStagingRepository + arguments: publishToSonatype closeSonatypeStagingRepository gradle-version: wrapper github_release: diff --git a/README.md b/README.md index 068c9a0d..34d050b7 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,25 @@ Native and multiplatform Kotlin serialization library for serialization/deserialization of [toml](https://toml.io/en/) format. +## Dependency +To import ktoml library you need to add following dependencies to your code: + +**Maven:** +```pom + + com.akuleshov7 + ktoml-core + 0.2.0 + +``` + +**Gradle:** +```groovy +implementation 'com.akuleshov7:ktoml-core:0.2.0' +``` + ## How to use + **Deserialization:** ```kotlin import com.akuleshov7.ktoml.deserialize diff --git a/build.gradle.kts b/build.gradle.kts index 02b2286a..10c880a9 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,8 +6,6 @@ plugins { } configureVersioning() -group = "com.akuleshov7" -description = "TOML serialization library for Kotlin language (including Kotlin Native, js, jvm)" allprojects { repositories { diff --git a/gradle.properties b/gradle.properties index 60adffc4..d3e03f9b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,6 @@ group=com.akuleshov7 +description="TOML serialization library for Kotlin language (including Kotlin Native, js, jvm)" + kotlin.code.style=official kotlin.mpp.enableGranularSourceSetsMetadata=true kotlin.native.enableDependencyPropagation=false diff --git a/ktoml-core/build.gradle.kts b/ktoml-core/build.gradle.kts index 410e1643..97174a45 100644 --- a/ktoml-core/build.gradle.kts +++ b/ktoml-core/build.gradle.kts @@ -8,7 +8,7 @@ plugins { } kotlin { - // FixMe: it will be useful to support JS also + jvm { compilations.all { kotlinOptions { @@ -17,14 +17,9 @@ kotlin { } } - val os = org.gradle.nativeplatform.platform.internal.DefaultNativePlatform.getCurrentOperatingSystem() - // Create a target for the host platform. - when { - os.isLinux -> linuxX64() - os.isWindows -> mingwX64() - os.isMacOsX -> macosX64() - else -> throw GradleException("Host OS '${os.name}' is not supported in Kotlin/Native $project.") - } + linuxX64() + mingwX64() + macosX64() sourceSets { val commonMain by getting {