Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENCE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [2023] [pseudoankit]
Copyright [2023] [ankitk77]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
plugins {
id("publication.root")
alias(libs.plugins.android.app) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.compose.multiplatform) apply false
alias(libs.plugins.compose.compiler) apply false
id("com.vanniktech.maven.publish") version "0.28.0" apply false
}

72 changes: 71 additions & 1 deletion coachmark/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import com.vanniktech.maven.publish.SonatypeHost
import com.vanniktech.maven.publish.KotlinMultiplatform
import java.util.Properties

plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.compose.multiplatform)
alias(libs.plugins.compose.compiler)
id("publication.module")
id("com.vanniktech.maven.publish") version "0.28.0"
signing
}

composeCompiler {
Expand Down Expand Up @@ -60,3 +65,68 @@ android {
targetCompatibility = JavaVersion.VERSION_11
}
}

// Read your local properties file manually to guarantee Gradle parses it
val properties = Properties().apply {
val file = rootProject.file("gradle.properties")
if (file.exists()) {
file.inputStream().use { load(it) }
}
}

signing {
val keyId = properties.getProperty("signing.keyId")
val password = properties.getProperty("signing.password")
val secretKey = properties.getProperty("signing.secretKey")

if (!keyId.isNullOrEmpty() && !secretKey.isNullOrEmpty()) {
// Force-injects the keys cleanly directly into the signing engine
useInMemoryPgpKeys(keyId, secretKey, password)
}
}

mavenPublishing {
// Coordinates
coordinates(
groupId = "io.github.ankitk77",
artifactId = "coachmark",
version = "4.0.0"
)

// POM configuration
pom {
name.set("Coachmark")
description.set("A lightweight compose multiplatform library to create better onboarding experiences.")
inceptionYear.set("2024")
url.set("https://github.com/ankitk77/coachmark")

licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}

developers {
developer {
id.set("ankitk77")
name.set("Ankit Kumar")
}
}

scm {
url.set("https://github.com/ankitk77/coachmark")
connection.set("scm:git:git://github.com/ankitk77/coachmark.git")
developerConnection.set("scm:git:ssh://github.com/ankitk77/coachmark.git")
}
}

// Configure the target to publish all KMP targets automatically
configure(KotlinMultiplatform(javadocJar = com.vanniktech.maven.publish.JavadocJar.Empty()))

// Publish to the NEW Sonatype Central portal
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, automaticRelease = true)

// Enable GPG signing
signAllPublications()
}
4 changes: 2 additions & 2 deletions demo/shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ kotlin {
sourceSets {
val commonMain by getting {
dependencies {
// implementation(libs.compose.coachmark)
implementation(project(":coachmark"))
implementation(libs.compose.coachmark)
// implementation(project(":coachmark"))
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.material3)
Expand Down
7 changes: 7 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,10 @@ android.nonTransitiveRClass=true
org.jetbrains.compose.experimental.jscanvas.enabled=true
#iOS
org.jetbrains.compose.experimental.uikit.enabled=true

mavenCentralUsername=
mavenCentralPassword=
signing.keyId=
signing.password=
# Your ASCII-armored private key string (replace newlines with literal \n or load directly)
signing.secretKey=
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ compileSdk = "34"
targetSdk = "34"

[libraries]
compose-coachmark = "io.github.pseudoankit:coachmark:2.0.3"
compose-coachmark = "io.github.ankitk77:coachmark:4.0.0"
compose-lint = "com.slack.lint.compose:compose-lint-checks:1.3.1"

gradle-publish = "io.github.gradle-nexus.publish-plugin:io.github.gradle-nexus.publish-plugin.gradle.plugin:2.0.0-rc-1"
Expand Down
Loading