Skip to content

Commit

Permalink
feat: update plugin and publishing and make preparation for dependabot
Browse files Browse the repository at this point in the history
  • Loading branch information
EdmonDantes committed Aug 27, 2023
1 parent f3db490 commit 257d946
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 17 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/sonatypePublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,19 @@ jobs:
base_url: ${{ secrets.SONATYPE_BASE_URL }}
publish:
needs: generate_publish_id
runs-on: ubuntu-latest
name: Publish all artifact to nexus
strategy:
matrix:
include:
- os: windows-latest
gradlew: gradlew.bat
tasks: publishNativeForWindowsToMavenRepository
- os: macos-latest
gradlew: gradlew
tasks: publishNativeForMacosToMavenRepository
- os: ubuntu-latest
gradlew: gradlew
tasks: publishNativeForLinuxToMavenRepository publishNotNativeToMavenRepository
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -34,7 +45,7 @@ jobs:
run: git fetch --all -f -P -p
- name: Publish
run: |
./gradlew \
./${{ matrix.gradlew }} \
-Psimple.kmm.spotless.ratchet.git.branch=origin/master \
-Psimple.kmm.publish.repository.url="${{ secrets.PUBLISH_REPOSITORY_URL }}" \
-Psimple.kmm.publish.repository.id="${{ needs.generate_publish_id.outputs.repository_id }}" \
Expand All @@ -43,6 +54,5 @@ jobs:
-Psimple.kmm.sign.key.id="${{ secrets.SIGNING_KEY_ID }}" \
-Psimple.kmm.sign.password="${{ secrets.SIGNING_PASSWORD }}" \
-Psimple.kmm.sign.private.key="${{ secrets.SIGNING_PRIVATE_KEY }}" \
-Psimple.kmm.kotlin.compile.only.platform=false \
-Psimple.kmm.kotlin.compile.browser.enabled=false \
clean publish --no-daemon --no-parallel --stacktrace
-Psimple.kmm.kotlin.compile.target.browser.js.enabled=false \
clean ${{ matrix.tasks }} --no-daemon --no-parallel --stacktrace
3 changes: 1 addition & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@ import io.github.edmondantes.simple.kotlin.multiplatform.gradle.plugin.util.prop
* limitations under the License.
*/
plugins {
id("io.github.edmondantes.simple.kmm.gradle.plugin")
alias(libs.plugins.simple.kotlin.gradle)
}

group = "io.github.edmondantes"

kotlin {
sourceSets {
val kotlinSerializationVersion: String by gradleProperty { }

val commonMain by getting {
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:$kotlinSerializationVersion")
Expand Down
13 changes: 9 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@ kotlin.serialization.version=1.5.1

org.gradle.jvmargs=-Xmx1024m -XX:MaxMetaspaceSize=512m

simple.kmm.kotlin.configuration.enabled=true
simple.kmm.kotlin.serialization.plugin.enabled=true
simple.kmm.kotlin.library.configuration.enabled=true
simple.kmm.kotlin.compile.only.platform=false
simple.kmm.github.sonatype.publish.enabled=true
simple.kmm.spotless.ratchet.git.branch=master
simple.kmm.kotlin.explicit.api.enable=true

simple.kmm.kotlin.compile.target.jvm.enabled=true
simple.kmm.kotlin.compile.target.js.enabled=true
simple.kmm.kotlin.compile.target.browser.js.enabled=false
simple.kmm.kotlin.compile.target.native.enabled=true

simple.kmm.github.sonatype.publish.enabled=true
6 changes: 6 additions & 0 deletions gradle/libs.version.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[versions]
simplekmm = "0.6.0"


[plugins]
simple_kotlin_gradle = { id = "io.github.edmondantes.simple.kmm.gradle.plugin", version.ref = "simplekmm" }
12 changes: 8 additions & 4 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@

rootProject.name = "simple-kotlinx-serialization-utils"

dependencyResolutionManagement {
versionCatalogs {
create("libs") {
from(files("./gradle/libs.version.toml"))
}
}
}

pluginManagement {
repositories {
maven {
Expand All @@ -23,8 +31,4 @@ pluginManagement {
}
gradlePluginPortal()
}

plugins {
id("io.github.edmondantes.simple.kmm.gradle.plugin") version ("0.4.0")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public fun ElementFactory.byte(number: Number?): EncodingElement<*> =
value(number?.toByte())

public fun ElementFactory.char(number: Number?): EncodingElement<*> =
value(number?.toChar())
value(number?.toInt()?.toChar())

public fun ElementFactory.short(number: Number?): EncodingElement<*> =
value(number?.toShort())
Expand Down

0 comments on commit 257d946

Please sign in to comment.