Published to maven central
This commit is contained in:
3 files changed
+58
-22
No files matched your search
@@ -2,7 +2,9 @@
|
||||
|
||||
A Kotlin multiplatform library for mdns announcer(mdns server), only broadcast is supported,
|
||||
|
||||
Also, nmdns can be compiled to shared/static lib for other language calling, see [c++ example](#cpp)
|
||||
Also, nmdns can be compiled to shared/static lib for other languages calling, see [c++ example](#cpp)
|
||||
|
||||
mDNS is usually used for Apple's AirPlay protocol family, there's an example in README.md [How to use](#How-to-use)
|
||||
|
||||
Supported platforms:
|
||||
1. windows64(mingwx64)
|
||||
@@ -22,16 +24,7 @@ AirPlay2(_airplay._tcp.local.) is tested
|
||||
|
||||
# How to use
|
||||
|
||||
Add maven repository
|
||||
|
||||
```kotlin
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven("https://repo.maven.rtast.cn/releases")
|
||||
}
|
||||
```
|
||||
|
||||
Add dependency
|
||||
> Make sure you added the mavenCentral repository in your project
|
||||
|
||||
```kotlin
|
||||
kotlin {
|
||||
|
||||
+52
-10
@@ -1,12 +1,16 @@
|
||||
import com.vanniktech.maven.publish.SonatypeHost
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform") version "2.2.0"
|
||||
id("maven-publish")
|
||||
id("com.vanniktech.maven.publish") version "0.31.0-rc2"
|
||||
id("signing")
|
||||
}
|
||||
|
||||
val libVersion: String by project
|
||||
|
||||
group = "cn.rtast.nmdns"
|
||||
version = "0.1.0"
|
||||
version = libVersion
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
@@ -48,16 +52,54 @@ kotlin {
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
maven("https://repo.maven.rtast.cn/releases") {
|
||||
name = "RTAST"
|
||||
credentials {
|
||||
username = "RTAkland"
|
||||
password = System.getenv("PUBLISH_TOKEN")
|
||||
mavenPublishing {
|
||||
publishing {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
maven("https://repo.maven.rtast.cn/releases") {
|
||||
name = "RTAST"
|
||||
credentials {
|
||||
username = "RTAkland"
|
||||
password = System.getenv("PUBLISH_TOKEN")
|
||||
}
|
||||
}
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
|
||||
if (System.getenv("PUBLISH_TOKEN") == null) signAllPublications()
|
||||
coordinates("cn.rtast.nmdns", project.name, libVersion)
|
||||
pom {
|
||||
name = project.name
|
||||
description = "mDNS in kotlin multiplatform"
|
||||
url = "https://github.com/RTAkland/native-mdns"
|
||||
developers {
|
||||
developer {
|
||||
id = "rtakland"
|
||||
name = "RTAkland"
|
||||
email = "rtakland@outlook.com"
|
||||
}
|
||||
}
|
||||
|
||||
licenses {
|
||||
license {
|
||||
name = "The Apache License, Version 2.0"
|
||||
url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
|
||||
}
|
||||
}
|
||||
|
||||
scm {
|
||||
url = "https://github.com/RTAkland/native-mdns"
|
||||
connection = "scm:git:git://github.com/RTAkland/native-mdns.git"
|
||||
developerConnection = "scm:git:ssh://git@github.com/RTAkland/native-mdns.git"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (System.getenv("PUBLISH_TOKEN") == null) {
|
||||
signing {
|
||||
useGpgCmd()
|
||||
sign(publishing.publications)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
kotlin.code.style=official
|
||||
kotlin.native.enableKlibsCrossCompilation=true
|
||||
libVersion=0.1.0
|
||||
Reference in New Issue
Block a user