Skip to content

Commit

Permalink
Small workaround to avoid a failure with publishing
Browse files Browse the repository at this point in the history
### What's done:
- workaround
  • Loading branch information
orchestr7 committed May 12, 2021
2 parents ac7451b + 884f587 commit 400a257
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .git-hooks/pre-commit.sh
Original file line number Diff line number Diff line change
@@ -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 ]]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
Expand All @@ -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:
Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<dependency>
<groupId>com.akuleshov7</groupId>
<artifactId>ktoml-core</artifactId>
<version>0.2.0</version>
</dependency>
```

**Gradle:**
```groovy
implementation 'com.akuleshov7:ktoml-core:0.2.0'
```

## How to use

**Deserialization:**
```kotlin
import com.akuleshov7.ktoml.deserialize
Expand Down
2 changes: 0 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ plugins {
}

configureVersioning()
group = "com.akuleshov7"
description = "TOML serialization library for Kotlin language (including Kotlin Native, js, jvm)"

allprojects {
repositories {
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 4 additions & 9 deletions ktoml-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
}

kotlin {
// FixMe: it will be useful to support JS also

jvm {
compilations.all {
kotlinOptions {
Expand All @@ -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 {
Expand Down

0 comments on commit 400a257

Please sign in to comment.