Skip to content

Commit

Permalink
feat(publish): Fixed maven publishing to maven central
Browse files Browse the repository at this point in the history
Signed-off-by: Frederik Bertling <[email protected]>
  • Loading branch information
Burtan committed May 14, 2024
1 parent 6675bf2 commit dbc894d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 29 deletions.
16 changes: 6 additions & 10 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import com.vanniktech.maven.publish.SonatypeHost

plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.android.library)
alias(libs.plugins.kotest.multiplatform)
id("maven-publish")
alias(libs.plugins.maven.publish)
}

group = "de.frederikbertling.kosc"
Expand Down Expand Up @@ -78,13 +80,7 @@ tasks.named<Test>("jvmTest") {
useJUnitPlatform()
}

publishing {
repositories {
mavenCentral {
credentials {
username = System.getenv("MAVEN_USER")
password = System.getenv("MAVEN_PASSWORD")
}
}
}
mavenPublishing {
publishToMavenCentral(SonatypeHost.DEFAULT, true)
signAllPublications()
}
4 changes: 3 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ agp = "8.2.2"
coroutines = "1.8.0"
kotlin = "1.9.24"
kotest = "5.9.0"
ktor = "3.0.0-eap-852"
ktor = "3.0.0-beta-1"
kx-io = "0.3.4"
maven-publish = "0.28.0"

[libraries]
coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "coroutines" }
Expand All @@ -19,3 +20,4 @@ kx-io = { group = "org.jetbrains.kotlinx", name = "kotlinx-io-core", version.ref
android-library = { id = "com.android.library", version.ref = "agp" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotest-multiplatform = { id = "io.kotest.multiplatform", version.ref = "kotest" }
maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "maven-publish" }
23 changes: 10 additions & 13 deletions udp/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import com.vanniktech.maven.publish.SonatypeHost

plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.android.library)
alias(libs.plugins.kotest.multiplatform)
id("maven-publish")
alias(libs.plugins.maven.publish)
}

group = "de.frederikbertling.kosc"
Expand All @@ -28,9 +30,9 @@ kotlin {
// }
// }
// }
//iosX64()
//iosArm64()
//iosSimulatorArm64()
iosX64()
iosArm64()
iosSimulatorArm64()

sourceSets {
commonMain {
Expand Down Expand Up @@ -80,13 +82,8 @@ tasks.named<Test>("jvmTest") {
useJUnitPlatform()
}

publishing {
repositories {
mavenCentral {
credentials {
username = System.getenv("MAVEN_USER")
password = System.getenv("MAVEN_PASSWORD")
}
}
}
mavenPublishing {
publishToMavenCentral(SonatypeHost.DEFAULT, true)

signAllPublications()
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@ import de.frederikbertling.kosc.core.transport.OSCServer
import io.ktor.network.selector.*
import io.ktor.network.sockets.*
import io.ktor.utils.io.core.*
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.*
import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.asSharedFlow
import kotlinx.coroutines.launch
import kotlinx.io.Buffer
import kotlin.io.use

@Suppress("unused")
class OSCUDPSocket private constructor(
Expand Down

0 comments on commit dbc894d

Please sign in to comment.