Skip to content

Commit 8f85ffb

Browse files
committed
Chore : Setup Maven Central publishing configuration
1 parent 24f58fa commit 8f85ffb

2 files changed

Lines changed: 42 additions & 1 deletion

File tree

gradle/libs.versions.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ material = "1.12.0"
1313
ktlint = "11.5.1"
1414
foundationAndroid = "1.7.8"
1515
kotlinxDateTime = "0.6.2"
16+
mavenPublish = "0.29.0"
1617

1718
[libraries]
1819
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
@@ -40,4 +41,4 @@ kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
4041
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
4142
android-library = { id = "com.android.library", version.ref = "agp" }
4243
ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint" }
43-
44+
maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "mavenPublish" }

timepicker/build.gradle.kts

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
import com.vanniktech.maven.publish.SonatypeHost
2+
13
plugins {
24
alias(libs.plugins.android.library)
35
alias(libs.plugins.kotlin.android)
46
alias(libs.plugins.kotlin.compose)
7+
alias(libs.plugins.maven.publish)
58
}
69

710
android {
@@ -50,3 +53,40 @@ dependencies {
5053
androidTestImplementation(libs.androidx.junit)
5154
androidTestImplementation(libs.androidx.espresso.core)
5255
}
56+
57+
mavenPublishing {
58+
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
59+
60+
signAllPublications()
61+
62+
coordinates("io.github.dongchyeon", "time-picker", "1.0.0")
63+
64+
pom {
65+
name.set("TimePicker")
66+
description.set("This project features a customizable Jetpack Compose time picker component.")
67+
url.set("https://github.com/DongChyeon/TimePicker.git")
68+
inceptionYear.set("2025")
69+
70+
licenses {
71+
license {
72+
name.set("The Apache License, Version 2.0")
73+
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
74+
distribution.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
75+
}
76+
}
77+
78+
developers {
79+
developer {
80+
id.set("DongChyeon")
81+
name.set("DongChyeon")
82+
url.set("https://github.com/DongChyeon")
83+
}
84+
}
85+
86+
scm {
87+
url.set("https://github.com/DongChyeon/TimePicker.git")
88+
connection.set("scm:git:git://github.com/DongChyeon/TimePicker.git")
89+
developerConnection.set("scm:git:ssh://git@github.com/DongChyeon/TimePicker.git")
90+
}
91+
}
92+
}

0 commit comments

Comments
 (0)