Skip to content

Commit 70bc258

Browse files
committed
Publishing Action Github
1 parent 4c74b7b commit 70bc258

File tree

5 files changed

+105
-19
lines changed

5 files changed

+105
-19
lines changed

.github/workflows/publish.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
on:
2+
[workflow_dispatch]
3+
4+
jobs:
5+
create_staging_repository:
6+
runs-on: ubuntu-latest
7+
name: Create staging repository
8+
outputs:
9+
repository_id: ${{ steps.create.outputs.repository_id }}
10+
steps:
11+
- id: create
12+
uses: nexus-actions/[email protected]
13+
with:
14+
base_url: https://s01.oss.sonatype.org/service/local/
15+
description: ${{ github.repository }}/${{ github.workflow }}#${{ github.run_number }}
16+
username: ${{ secrets.NEXUS_ACTIONS_SONATYPE_USERNAME }}
17+
password: ${{ secrets.NEXUS_ACTIONS_SONATYPE_PASSWORD }}
18+
staging_profile_id: ${{ secrets.NEXUS_ACTIONS_SONATYPE_PROFILE_ID }}
19+
20+
macos:
21+
runs-on: macos-latest
22+
needs: create_staging_repository
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v2
26+
- name: Configure JDK
27+
uses: actions/setup-java@v1
28+
with:
29+
java-version: 14
30+
- name: Publish
31+
run: |
32+
./gradlew publishAllPublicationsToMavenRepository -PSONATYPE_REPOSITORY_ID=${{ needs.create_staging_repository.outputs.repository_id }}
33+
env:
34+
MANUAL_REPOSITORY: ${{ secrets.MANUAL_REPOSITORY }}
35+
SONATYPE_REPOSITORY_ID: ${{ needs.create_staging_repository.outputs.repository_id }}
36+
SONATYPE_USERNAME: ${{ secrets.NEXUS_ACTIONS_SONATYPE_USERNAME }}
37+
SONATYPE_PASSWORD: ${{ secrets.NEXUS_ACTIONS_SONATYPE_PASSWORD }}
38+
GPG_PRIVATE_KEY: ${{ secrets.NEXUS_ACTIONS_GPG_PRIVATE_KEY }}
39+
GPG_PRIVATE_PASSWORD: ${{ secrets.NEXUS_ACTIONS_GPG_PRIVATE_PASSWORD }}
40+
41+
windows:
42+
runs-on: windows-latest
43+
needs: create_staging_repository
44+
steps:
45+
- name: Checkout
46+
uses: actions/checkout@v2
47+
- name: Configure JDK
48+
uses: actions/setup-java@v1
49+
with:
50+
java-version: 14
51+
- name: Publish
52+
run: |
53+
./gradlew publishMingwX64PublicationToMavenRepository -PSONATYPE_REPOSITORY_ID=${{ needs.create_staging_repository.outputs.repository_id }}
54+
env:
55+
MANUAL_REPOSITORY: ${{ secrets.MANUAL_REPOSITORY }}
56+
SONATYPE_REPOSITORY_ID: ${{ needs.create_staging_repository.outputs.repository_id }}
57+
SONATYPE_USERNAME: ${{ secrets.NEXUS_ACTIONS_SONATYPE_USERNAME }}
58+
SONATYPE_PASSWORD: ${{ secrets.NEXUS_ACTIONS_SONATYPE_PASSWORD }}
59+
GPG_PRIVATE_KEY: ${{ secrets.NEXUS_ACTIONS_GPG_PRIVATE_KEY }}
60+
GPG_PRIVATE_PASSWORD: ${{ secrets.NEXUS_ACTIONS_GPG_PRIVATE_PASSWORD }}
61+
62+
finalize:
63+
runs-on: ubuntu-latest
64+
needs: [create_staging_repository,macos,windows]
65+
if: ${{ always() && needs.create_staging_repository.result == 'success' }}
66+
steps:
67+
- name: Discard
68+
if: ${{ needs.macos.result != 'success' || needs.windows.result != 'success' }}
69+
uses: nexus-actions/drop-nexus-staging-repo@main
70+
with:
71+
username: ${{ secrets.NEXUS_ACTIONS_SONATYPE_USERNAME }}
72+
password: ${{ secrets.NEXUS_ACTIONS_SONATYPE_PASSWORD }}
73+
staging_repository_id: ${{ needs.create_staging_repository.outputs.repository_id }}
74+
- name: Release
75+
if: ${{ needs.macos.result == 'success' && needs.windows.result == 'success' }}
76+
uses: nexus-actions/release-nexus-staging-repo@main
77+
with:
78+
base_url: https://s01.oss.sonatype.org/service/local/
79+
username: ${{ secrets.NEXUS_ACTIONS_SONATYPE_USERNAME }}
80+
password: ${{ secrets.NEXUS_ACTIONS_SONATYPE_PASSWORD }}
81+
staging_repository_id: ${{ needs.create_staging_repository.outputs.repository_id }}

buildSrc/src/main/kotlin/publish.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,4 @@ afterEvaluate {
109109
}
110110
}
111111

112-
val String.byProperty: String? get() = gradleLocalProperties(rootDir).getProperty(this) ?: project.findProperty(this) as? String ?: System.getenv(this)
112+
val String.byProperty: String? get() = gradleLocalProperties(rootDir, providers).getProperty(this) ?: project.findProperty(this) as? String ?: System.getenv(this)

gradle/deps.versions.toml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
[versions]
22
kotlin = "1.9.23"
33
jbCompose = "1.6.1"
4-
androidGradle = "8.0.2"
4+
androidGradle = "8.4.0"
55
androidCoroutines = "1.8.0"
66
ktLint = "11.5.1"
77
mosaic = "0.8.0"
8-
koin = "3.5.3"
8+
koin = "3.5.6"
99
kermit = "2.0.2"
1010
ktor = "2.3.9"
1111
kotlinxSerialization = "1.6.3"
12-
sqlDelight = "2.0.2"
13-
sqliteJdbcDriver = "3.45.3.0"
14-
composeWebView = "1.9.0"
12+
sqlDelight = "2.0.1"
13+
sqliteJdbcDriver = "3.45.2.0"
14+
composeWebView = "1.9.8"
1515
slf4j = "1.7.36"
1616
i18n4k = "0.7.1"
1717
cache4k = "0.11.0"
18-
decompose = "3.0.0-alpha09"
19-
essenty = "2.0.0-alpha07"
18+
decompose = "3.0.0"
19+
essenty = "2.0.0"
2020
multiplatformSettings = "1.1.1"
2121
mviKotlin = "3.3.0"
2222
accompanist = "0.34.0"
2323
statelyVersion = "2.0.7"
2424
statelyIsoVersion = "2.0.0-rc1"
25-
androidxLifecycle = "2.7.0"
25+
androidxLifecycle = "2.8.0"
2626
androidxMedia3 = "1.3.1"
2727
okio = "3.9.0"
28-
arrow = "1.2.1"
28+
arrow = "1.2.4"
2929
paging = "3.3.0-alpha02-0.4.0"
3030
konnection = "1.3.0"
3131
zipline = "1.10.0-LEGACY"
@@ -44,12 +44,12 @@ kotlin-kotlinTestCommon = { group = "org.jetbrains.kotlin", name = "kotlin-test-
4444
kotlin-kotlinTestJs = { group = "org.jetbrains.kotlin", name = "kotlin-test-js", version.ref = "kotlin" }
4545
kotlin-kotlinTestJunit = { group = "org.jetbrains.kotlin", name = "kotlin-test-junit", version.ref = "kotlin" }
4646
kotlin-kotlinTestAnnotationsCommon = { group = "org.jetbrains.kotlin", name = "kotlin-test-annotations-common", version.ref = "kotlin" }
47-
kotlinx-coroutines = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version = "1.7.3" }
48-
kotlinx-coroutinesGuava = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-guava", version = "1.7.3" }
47+
kotlinx-coroutines = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version = "1.8.0" }
48+
kotlinx-coroutinesGuava = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-guava", version = "1.8.0" }
4949
kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinxSerialization" }
50-
kotlinx-atomicfu = { group = "org.jetbrains.kotlinx", name = "atomicfu", version = "0.22.0" }
50+
kotlinx-atomicfu = { group = "org.jetbrains.kotlinx", name = "atomicfu", version = "0.24.0" }
5151
kotlinx-datetime = { group = "org.jetbrains.kotlinx", name = "kotlinx-datetime", version = "0.5.0" }
52-
kotlinx-immutableLists = { group = "org.jetbrains.kotlinx", name = "kotlinx-collections-immutable", version = "0.3.5" }
52+
kotlinx-immutableLists = { group = "org.jetbrains.kotlinx", name = "kotlinx-collections-immutable", version = "0.3.7" }
5353

5454
kotlin-compose-gradle = { group = "org.jetbrains.compose", name = "compose-gradle-plugin", version.ref = "jbCompose" }
5555
mosaic-gradle = { group = "com.jakewharton.mosaic", name = "mosaic-gradle-plugin", version.ref = "mosaic" }
@@ -133,9 +133,9 @@ koin-test = { group = "io.insert-koin", name = "koin-test", version.ref = "koin"
133133
koin-android = { group = "io.insert-koin", name = "koin-android", version.ref = "koin" }
134134
koin-androidx-compose = { group = "io.insert-koin", name = "koin-androidx-compose", version.ref = "koin" }
135135

136-
androidx-activity = { group = "androidx.activity", name = "activity-compose", version = "1.8.2" }
137-
androidx-core = { group = "androidx.core", name = "core-ktx", version = "1.12.0" }
138-
androidx-material = { group = "androidx.compose.material", name = "material", version = "1.5.4" }
136+
androidx-activity = { group = "androidx.activity", name = "activity-compose", version = "1.9.0" }
137+
androidx-core = { group = "androidx.core", name = "core-ktx", version = "1.13.1" }
138+
androidx-material = { group = "androidx.compose.material", name = "material", version = "1.6.7" }
139139
androidx-profileInstaller = { group = "androidx.profileinstaller", name = "profileinstaller", version = "1.3.1" }
140140
androidx-startUp = { group = "androidx.startup", name = "startup-runtime", version = "1.1.1" }
141141
androidx-palette = { group = "androidx.palette", name = "palette-ktx", version = "1.0.0" }
@@ -162,10 +162,11 @@ paging-common = { group = "app.cash.paging", name = "paging-common", version.ref
162162
paging-compose = { group = "app.cash.paging", name = "paging-compose-common", version.ref = "paging" }
163163
composeUi-windowSize = { group = "dev.chrisbanes.material3", name = "material3-window-size-class-multiplatform", version = "0.3.0" }
164164

165-
leak-canary = { group = "com.squareup.leakcanary", name = "leakcanary-android", version = "2.12" }
165+
leak-canary = { group = "com.squareup.leakcanary", name = "leakcanary-android", version = "2.13" }
166166
junit = { group = "junit", name = "junit", version = "4.13.2" }
167167

168168
ktlint-gradle = { group = "org.jlleitschuh.gradle", name = "ktlint-gradle", version.ref = "ktLint" }
169+
konnection = { group = "dev.tmapps", name = "konnection", version.ref = "konnection" }
169170

170171
zipline = { module = "app.cash.zipline:zipline", version.ref = "zipline" }
171172
zipline-gradlePlugin = { module = "app.cash.zipline:zipline-gradle-plugin", version.ref = "zipline" }
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
#Sat May 18 15:40:17 IST 2024
12
distributionBase=GRADLE_USER_HOME
23
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists

src/commonMain/kotlin/in.shabinder.soundbound/models/ThrowableWrapper.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ open class ThrowableWrapper(
2525

2626
override fun equals(other: Any?): Boolean {
2727
if (this === other) return true
28+
if (other is ThrowableWrapper && reference != null && other.reference == reference) return true
29+
if (other is Throwable && reference != null && reference == other) return true
30+
2831
if (other !is ThrowableWrapper) return false
2932
if (message != other.message) return false
3033
if (stackTrace != other.stackTrace) return false

0 commit comments

Comments
 (0)