Skip to content

Commit

Permalink
Configure publication (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
twyatt authored Aug 30, 2023
1 parent cd7adca commit b818378
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 3 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish
on:
release:
types:
- published

jobs:
publish:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'

- name: check
uses: gradle/gradle-build-action@v2
with:
arguments: check

- name: publish
uses: gradle/gradle-build-action@v2
with:
arguments: |
-PVERSION_NAME=${{ github.ref_name }}
-PsigningInMemoryKey=${{ secrets.SIGNING_KEY }}
-PsigningInMemoryKeyPassword=${{ secrets.SIGNING_PASSWORD }}
-PmavenCentralUsername=${{ secrets.OSS_SONATYPE_NEXUS_USERNAME }}
-PmavenCentralPassword=${{ secrets.OSS_SONATYPE_NEXUS_PASSWORD }}
publish
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ plugins {
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlinter) apply false
alias(libs.plugins.maven.publish) apply false
alias(libs.plugins.api)
}

Expand Down
2 changes: 1 addition & 1 deletion bundled/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
kotlin("multiplatform")
kotlin("native.cocoapods")
alias(libs.plugins.kotlinter)
`maven-publish`
alias(libs.plugins.maven.publish)
}

kotlin {
Expand Down
2 changes: 1 addition & 1 deletion datadog/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
kotlin("multiplatform")
alias(libs.plugins.kotlinter)
`maven-publish`
alias(libs.plugins.maven.publish)
}

kotlin {
Expand Down
27 changes: 26 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
group=com.juul.datadog-kmp
kotlin.mpp.enableCInteropCommonization=true
kotlin.js.compiler=ir
android.useAndroidX=true

# Publication configuration
# https://vanniktech.github.io/gradle-maven-publish-plugin/central/

SONATYPE_HOST=DEFAULT
SONATYPE_AUTOMATIC_RELEASE=true
RELEASE_SIGNING_ENABLED=true

GROUP=com.juul.datadog

POM_NAME=Datadog KMP
POM_DESCRIPTION=Kotlin multiplatform (Android, iOS and JavaScript) API for Datadog.
POM_INCEPTION_YEAR=2023

POM_URL=https://github.com/JuulLabs/datadog-kmp
POM_SCM_URL=https://github.com/JuulLabs/datadog-kmp
POM_SCM_CONNECTION=scm:git:git://github.com/JuulLabs/datadog-kmp.git
POM_SCM_DEV_CONNECTION=scm:git:ssh://[email protected]/JuulLabs/datadog-kmp.git

POM_LICENCE_NAME=The Apache Software License, Version 2.0
POM_LICENCE_URL=https://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENCE_DIST=repo

POM_DEVELOPER_ID=twyatt
POM_DEVELOPER_NAME=Travis Wyatt
POM_DEVELOPER_URL=https://github.com/twyatt
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ android-library = { id = "com.android.library", version = "8.1.0" }
api = { id = "binary-compatibility-validator", version = "0.13.2" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version = "1.9.10" }
kotlinter = { id = "org.jmailen.kotlinter", version = "3.16.0" }
maven-publish = { id = "com.vanniktech.maven.publish", version = "0.25.3" }
swiftpackage = { id = "io.github.luca992.multiplatform-swiftpackage", version = "2.1.2" }

0 comments on commit b818378

Please sign in to comment.