Skip to content

Commit

Permalink
Apply maven central publishing plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
cheonjaeung committed Aug 31, 2024
1 parent ca16fbd commit 3b9022c
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.maven.publish) apply false
}

allprojects {
Expand Down
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ androidGradlePlugin = "8.5.1"
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" }
maven-publish = { id = "com.vanniktech.maven.publish", version = "0.28.0" }

[libraries]
# Library Dependencies
Expand Down
36 changes: 36 additions & 0 deletions simplecarousel/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import com.vanniktech.maven.publish.SonatypeHost

plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.maven.publish)
}

android {
Expand All @@ -26,3 +29,36 @@ dependencies {
implementation(libs.androidx.core)
api(libs.androidx.recyclerview)
}

mavenPublishing {
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
signAllPublications()
coordinates("${project.group}", "simplecarousel", "${project.version}")

pom {
name.set("SimpleCarousel for Android")
description.set("Simple components to make carousel UI for Android.")
url.set("https://github.com/cheonjaeung/simplecarousel-android")

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

developers {
developer {
id.set("cheonjaeung")
name.set("Jaeung Cheon")
email.set("cheonjaewoong@gmail.com")
}
}

scm {
url.set("https://github.com/cheonjaeung/simplecarousel-android")
connection.set("scm:git:git://github.com/cheonjaeung/simplecarousel-android.git")
developerConnection.set("scm:git:ssh://git@github.com/cheonjaeung/simplecarousel-android.git")
}
}
}

0 comments on commit 3b9022c

Please sign in to comment.