Skip to content

Commit

Permalink
Deploy with GA Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AmniX committed Oct 1, 2024
1 parent a4a0e94 commit 5b2700a
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 152 deletions.
21 changes: 9 additions & 12 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,15 @@ permissions:
contents: read

jobs:
# build:
# uses: ./.github/workflows/gradle.yml
deploy:
# needs: build
strategy:
matrix:
include:
# - target: publishIosArm64PublicationToSonatypeRepository
# os: macos-latest
- target: publishAndroidReleasePublicationToSonatypeRepository
- target: :shared:publishAllPublicationsToMavenCentralRepository
os: ubuntu-latest
- target: publishKotlinMultiplatformPublicationToSonatypeRepository
- target: :android:publishAllPublicationsToMavenCentralRepository
os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -46,14 +43,14 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'
- name: Gradle publish
uses: gradle/gradle-build-action@ce999babab2de1c4b649dc15f0ee67e6246c994f
- name: Deploy
uses: gradle/gradle-build-action@v3
with:
arguments: |
${{ matrix.target }}
closeSonatypeStagingRepository
-Psigning.gnupg.passphrase='${{secrets.OSSRH_GPG_SECRET_KEY_PASSWORD}}'
-Psigning.gnupg.keyName='${{secrets.OSSRH_GPG_SECRET_KEY_ID}}'
-PsonatypeUsername='${{secrets.OSSRH_USERNAME}}'
-PsonatypePassword='${{secrets.OSSRH_PASSWORD}}'
--no-configuration-cache
-Psigning.password='${{secrets.OSSRH_GPG_SECRET_KEY_PASSWORD}}'
-Psigning.keyId='${{secrets.OSSRH_GPG_SECRET_KEY_ID}}'
-PmavenCentralUsername='${{secrets.OSSRH_USERNAME}}'
-PmavenCentralPassword='${{secrets.OSSRH_PASSWORD}}'
6 changes: 2 additions & 4 deletions android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ plugins {
alias(libs.plugins.kotlinAndroid)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.kotlin.plugin.serialization)
id("kotlin-parcelize")
id("org.jetbrains.dokka") version "1.8.10"
id("com.vanniktech.maven.publish") version "0.29.0"
id("com.gradleup.nmcp") version "0.0.7"
alias(libs.plugins.kotlin.parcelize)
alias(libs.plugins.maven.publish)
}

android {
Expand Down
6 changes: 5 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import com.vanniktech.maven.publish.SonatypeHost

plugins {
id("root.publication")
// trick: for the same plugin versions in all sub-modules
alias(libs.plugins.androidLibrary) apply false
alias(libs.plugins.kotlinMultiplatform) apply false
alias(libs.plugins.kotlinAndroid) apply false
alias(libs.plugins.androidApplication) apply false
alias(libs.plugins.compose.compiler) apply false
alias(libs.plugins.kotlin.plugin.serialization)
alias(libs.plugins.maven.publish) apply false
alias(libs.plugins.kotlin.parcelize) apply false
alias(libs.plugins.jetbrains.kotlin.jvm) apply false
}
7 changes: 0 additions & 7 deletions convention-plugins/build.gradle.kts

This file was deleted.

21 changes: 0 additions & 21 deletions convention-plugins/settings.gradle.kts

This file was deleted.

55 changes: 0 additions & 55 deletions convention-plugins/src/main/kotlin/module.publication.gradle.kts

This file was deleted.

20 changes: 0 additions & 20 deletions convention-plugins/src/main/kotlin/root.publication.gradle.kts

This file was deleted.

26 changes: 1 addition & 25 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,4 @@ kotlin.js.compiler=ir
kotlin.mpp.enableCInteropCommonization=true
#Android
android.useAndroidX=true
android.nonTransitiveRClass=true

# Region: Android Publish Info Start
GROUP=com.komoju
POM_ARTIFACT_ID=android-sdk
VERSION_NAME=0.0.1

POM_NAME=KOMOJU® Android SDK
POM_DESCRIPTION=Native Komoju Mobile SDK
POM_INCEPTION_YEAR=2024
POM_URL=https://github.com/degica/komoju-mobile-sdk/

POM_LICENSE_NAME=MIT License
POM_LICENSE_URL=https://github.com/degica/komoju-mobile-sdk/blob/main/LICENSE
POM_LICENSE_DIST=repo

POM_SCM_URL=https://github.com/degica/komoju-mobile-sdk/
POM_SCM_CONNECTION=scm:git:git://github.com/degica/komoju-mobile-sdk.git
POM_SCM_DEV_CONNECTION=scm:git:ssh://[email protected]/degica/komoju-mobile-sdk.git

POM_DEVELOPER_ID=AmniX
POM_DEVELOPER_NAME=Aman Tonk
POM_DEVELOPER_URL=https://github.com/AmniX/

# Region: Android Publish Info Ends
android.nonTransitiveRClass=true
9 changes: 5 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ kotlin = "2.0.20"
nexus-publish = "2.0.0"
android-minSdk = "24"
android-compileSdk = "34"
kotlinVersion = "2.0.10"
coreKtx = "1.13.1"
fragmentKtx = "1.8.3"
junit = "4.13.2"
Expand All @@ -23,8 +22,9 @@ uiTooling = "1.7.2"
composeWebView = "0.33.6"
konlinXJson = "1.7.2"
voyager = "1.1.0-beta02"
mavenPublish = "0.28.0"
mavenPublish = "0.29.0"
nmcp = "0.0.7"
kotlinPlugin = "1.8.10"

[libraries]
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
Expand Down Expand Up @@ -67,9 +67,10 @@ voyager-transitions = { module = "cafe.adriel.voyager:voyager-transitions", vers
[plugins]
androidLibrary = { id = "com.android.library", version.ref = "agp" }
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlinVersion" }
kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
androidApplication = { id = "com.android.application", version.ref = "agp" }
kotlin-plugin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlinPlugin" }
maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "mavenPublish" }
gradleup-nmcp = { id = "com.gradleup.nmcp", version.ref = "nmcp" }
jetbrains-kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
1 change: 0 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
pluginManagement {
includeBuild("convention-plugins")
repositories {
google()
mavenCentral()
Expand Down
36 changes: 34 additions & 2 deletions shared/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import com.vanniktech.maven.publish.SonatypeHost
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.androidLibrary)
alias(libs.plugins.kotlin.plugin.serialization)
id("module.publication")
alias(libs.plugins.maven.publish)
}

kotlin {
Expand Down Expand Up @@ -43,7 +44,7 @@ kotlin {
}

android {
namespace = "com.degica.komoju.mobile.sdk"
namespace = "com.komoju.mobile.sdk"
compileSdk =
libs.versions.android.compileSdk
.get()
Expand All @@ -59,3 +60,34 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}
}

mavenPublishing {
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
signAllPublications()
coordinates(groupId = "com.komoju.mobile.sdk", artifactId = "shared", version = "0.0.1")
pom {
name.set("Komoju Mobile SDK")
description.set("Komoju Payment SDK for Mobile")
inceptionYear.set("2024")
url.set("https://github.com/degica/komoju-mobile-sdk/")
licenses {
license {
name.set("MIT")
url.set("https://github.com/degica/komoju-mobile-sdk/blob/main/LICENSE")
distribution.set("repo")
}
}
developers {
developer {
id.set("AmniX")
name.set("Aman Tonk")
url.set("https://github.com/AmniX/")
}
}
scm {
url.set("https://github.com/degica/komoju-mobile-sdk/")
connection.set("scm:git:git://github.com/degica/komoju-mobile-sdk.git")
developerConnection.set("scm:git:ssh://[email protected]/degica/komoju-mobile-sdk.git")
}
}
}

0 comments on commit 5b2700a

Please sign in to comment.