Skip to content

Commit

Permalink
Preparing for publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-daily committed Aug 19, 2024
1 parent a4d60e3 commit 96e3dd5
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 2 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,13 @@ jobs:
java-version: '17'

- name: Build Daily transport
run: ./gradlew :rtvi-client-android-daily:assembleRelease
run: ./gradlew :rtvi-client-android-daily:assembleRelease

- name: Generate Maven repo
run: ./gradlew :rtvi-client-android-daily:publishAllPublicationsToRTVILocalRepoRepository

- name: Upload Maven repo
uses: actions/upload-artifact@v4
with:
name: RTVIClientAndroidDaily-Repo
path: build/RTVILocalRepo
24 changes: 24 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
BSD 2-Clause License

Copyright (c) 2024, Daily

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ kotlinxSerializationJson = "1.7.1"
kotlinxSerializationPlugin = "2.0.0"
dokka = "1.9.20"
androidxTest = "1.6.1"
rtviClient = "0.1.0"

[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
Expand All @@ -18,6 +19,7 @@ daily-android-client = { module = "co.daily:client", version.ref = "daily-androi
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinxCoroutinesTest" }
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" }
rtvi-client = { module = "ai.rtvi:client", version.ref = "rtviClient" }

[plugins]
android-library = { id = "com.android.library", version.ref = "agp" }
Expand Down
58 changes: 57 additions & 1 deletion rtvi-client-android-daily/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ plugins {
alias(libs.plugins.jetbrains.kotlin.android)
alias(libs.plugins.jetbrains.kotlin.serialization)
alias(libs.plugins.jetbrains.dokka)
`maven-publish`
signing
}

android {
Expand Down Expand Up @@ -45,10 +47,64 @@ dependencies {
implementation(libs.daily.android.client)

//api(project(":rtvi-client-android"))
implementation("ai.rtvi:rtvi-client-android:0.1.0")
implementation(libs.rtvi.client)

androidTestImplementation(libs.androidx.runner)
androidTestImplementation(libs.androidx.rules)
androidTestImplementation(libs.kotlinx.coroutines.test)
}

publishing {
repositories {
maven {
url = rootProject.layout.buildDirectory.dir("RTVILocalRepo").get().asFile.toURI()
name = "RTVILocalRepo"
}
}

publications {
register<MavenPublication>("release") {
groupId = "ai.rtvi"
artifactId = "client-daily"
version = "0.1.0"

pom {
name.set("RTVI Client Daily Transport")
description.set("Daily RTVI client library for Android")
url.set("https://github.com/rtvi-ai/rtvi-client-android-daily")

developers {
developer {
id.set("rtvi.ai")
name.set("rtvi.ai")
}
}

licenses {
license {
name.set("BSD 2-Clause License")
url.set("https://github.com/rtvi-ai/rtvi-client-android-daily/blob/main/LICENSE")
}
}

scm {
connection.set("scm:git:git://github.com/rtvi-ai/rtvi-client-android-daily.git")
developerConnection.set("scm:git:ssh://github.com:rtvi-ai/rtvi-client-android-daily.git")
url.set("https://github.com/rtvi-ai/rtvi-client-android-daily")
}
}

afterEvaluate {
from(components["release"])
}
}
}
}

signing {
val signingKey = System.getenv("RTVI_GPG_SIGNING_KEY")
val signingPassphrase = System.getenv("RTVI_GPG_SIGNING_PASSPHRASE")

useInMemoryPgpKeys(signingKey, signingPassphrase)
sign(publishing.publications)
}

0 comments on commit 96e3dd5

Please sign in to comment.