Skip to content

Commit

Permalink
Change publishing plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
rgryta committed Oct 24, 2024
1 parent da0721d commit baa2d86
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ jobs:
env:
GPR_USERNAME: ${{ secrets.GPR_USERNAME }}
GPR_TOKEN: ${{ secrets.GPR_TOKEN }}
run: ./gradlew publish --no-daemon --stacktrace --info --scan
run: ./gradlew publishAllPublicationsToGitHubPackagesRepository --no-daemon --stacktrace --info --scan --no-configuration-cache
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ kotlin = "2.0.21"
kotlinx-coroutines = "1.9.0"
kotlinx-serialization = "1.7.3"
ktor = "3.0.0-rc-1"
vanniktech = "0.30.0"

[libraries]
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
Expand All @@ -28,3 +29,4 @@ kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-t
android-library = { id = "com.android.library", version.ref = "agp" }
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
venniktech = { id = "com.vanniktech.maven.publish", version.ref = "vanniktech" }
47 changes: 39 additions & 8 deletions library/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import com.vanniktech.maven.publish.SonatypeHost
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.targets.native.tasks.KotlinNativeSimulatorTest
Expand All @@ -10,7 +11,7 @@ plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlinx.serialization)

id("maven-publish")
alias(libs.plugins.venniktech)
}

val versions = Properties()
Expand All @@ -22,6 +23,8 @@ group = "io.wellmate"
version = versions.getProperty("version")

kotlin {
withSourcesJar(publish = false)

jvmToolchain(17)
androidTarget {
publishLibraryVariants("release")
Expand Down Expand Up @@ -119,14 +122,42 @@ publishing {
}
}
}
publications {
create<MavenPublication>("ReleaseAar") {
groupId = "io.wellmate"
artifactId = "api.client"
version = versions.getProperty("version")
afterEvaluate {
artifact(tasks.getByName("bundleReleaseAar"))
}

mavenPublishing {
coordinates(
groupId = "io.wellmate",
artifactId = "api.client",
version = versions.getProperty("version")
)

pom {
name.set("KMP Library containing WellMate API Client")
description.set("This library can be utilized by various KMP targets to connect with WellMate API")
inceptionYear.set("2024")
url.set("https://github.com/wellmateio/WellMate-Kotlin-API-Client")

licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
distribution.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}

developers {
developer {
id.set("rgryta")
name.set("Radosław Gryta")
email.set("[email protected]")
url.set("https://github.com/rgryta/")
}
}

scm {
url.set("https://github.com/wellmateio/WellMate-Kotlin-API-Client")
connection.set("scm:git:git://github.com/wellmateio/WellMate-Kotlin-API-Client.git")
developerConnection.set("scm:git:ssh://[email protected]/wellmateio/WellMate-Kotlin-API-Client.git")
}
}
}
2 changes: 1 addition & 1 deletion library/version.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=1.0.0
version=0.0.0

0 comments on commit baa2d86

Please sign in to comment.