Skip to content

Commit

Permalink
Merge pull request #6 from skydoves/maven/updates
Browse files Browse the repository at this point in the history
Update maven scripts
  • Loading branch information
skydoves authored Nov 11, 2023
2 parents bf67fbc + 355fc86 commit 217a5d0
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Add the `compileOnly` dependency below to your **module**'s `build.gradle.kts` f

```gradle
dependencies {
compileOnly("com.github.skydoves:compose-stable-marker:1.0.2")
compileOnly("com.github.skydoves:compose-stable-marker:1.0.3")
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ object Configurations {
const val minSdk = 21
const val majorVersion = 1
const val minorVersion = 0
const val patchVersion = 1
const val patchVersion = 3
const val versionName = "$majorVersion.$minorVersion.$patchVersion"
const val versionCode = 2
const val versionCode = 4
const val snapshotVersionName = "$majorVersion.$minorVersion.${patchVersion + 1}-SNAPSHOT"
const val artifactGroup = "com.github.skydoves"
}
16 changes: 16 additions & 0 deletions compose-stable-marker/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ plugins {
id(libs.plugins.nexus.plugin.get().pluginId)
}

apply(from = "${rootDir}/scripts/publish-module.gradle.kts")

mavenPublishing {
val artifactId = "compose-stable-marker"
coordinates(
Configurations.artifactGroup,
artifactId,
rootProject.extra.get("libVersion").toString()
)

pom {
name.set(artifactId)
description.set("Compose stable markers for KMP to tell stable/immutable guarantees to the compose compiler.")
}
}

kotlin {
jvmToolchain(11)

Expand Down
7 changes: 0 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,6 @@ systemProp.org.gradle.internal.publish.checksums.insecure=true
# Increase timeout when pushing to Sonatype (otherwise we get timeouts)
systemProp.org.gradle.internal.http.socketTimeout=120000

GROUP=com.github.skydoves
VERSION_NAME=1.0.2

POM_ARTIFACT_ID=compose-stable-marker
POM_NAME=compose-stable-marker
POM_DESCRIPTION=Compose stable markers to tell stable/immutable guarantees to the compose compiler.

POM_URL=https://github.com/skydoves/compose-stable-marker/
POM_SCM_URL=https://github.com/skydoves/compose-stable-marker/
POM_SCM_CONNECTION=scm:git:git://github.com/skydoves/compose-stable-marker.git
Expand Down
13 changes: 13 additions & 0 deletions scripts/publish-module.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import com.github.skydoves.Configurations

apply(plugin = "com.vanniktech.maven.publish")

rootProject.extra.apply {
val snapshot = System.getenv("SNAPSHOT").toBoolean()
val libVersion = if (snapshot) {
Configurations.snapshotVersionName
} else {
Configurations.versionName
}
set("libVersion", libVersion)
}

0 comments on commit 217a5d0

Please sign in to comment.