1+ import com.vanniktech.maven.publish.SonatypeHost
2+
13plugins {
24 alias(libs.plugins.android.library)
35 alias(libs.plugins.kotlin.android)
6+ alias(libs.plugins.maven.publish)
47}
58
9+ group = findProperty(" GROUP" ) as String? ? : " com.pelagornis"
10+ version = findProperty(" VERSION_NAME" ) as String? ? : " 0.3.13"
11+
612android {
7- namespace = " com.pelagornis.library "
13+ namespace = " com.pelagornis.refineui.icons "
814 compileSdk = 36
915
1016 defaultConfig {
1117 minSdk = 24
1218 consumerProguardFiles(" consumer-rules.pro" )
13- versionCode = 1
14- versionName = " 0.3.13"
1519 }
1620
1721 buildTypes {
@@ -36,4 +40,63 @@ dependencies {
3640 implementation(libs.androidx.core.ktx)
3741 implementation(libs.androidx.appcompat)
3842 implementation(libs.material)
43+ }
44+
45+ // Maven Central Publishing via Central Portal
46+ // https://central.sonatype.com/api/v1/
47+ mavenPublishing {
48+ // Publish to Maven Central via Central Portal
49+ publishToMavenCentral(SonatypeHost .CENTRAL_PORTAL )
50+
51+ // Enable GPG signing for all publications
52+ signAllPublications()
53+
54+ // Configure coordinates
55+ coordinates(
56+ groupId = findProperty(" GROUP" ) as String? ? : " com.pelagornis" ,
57+ artifactId = findProperty(" POM_ARTIFACT_ID" ) as String? ? : " refineui-system-icons" ,
58+ version = findProperty(" VERSION_NAME" ) as String? ? : project.version.toString()
59+ )
60+
61+ // Configure POM
62+ pom {
63+ name.set(findProperty(" POM_NAME" ) as String? ? : " RefineUI System Icons" )
64+ description.set(findProperty(" POM_DESCRIPTION" ) as String? ? : " A comprehensive system icon library for Android with 5,000+ icons" )
65+ url.set(findProperty(" POM_URL" ) as String? ? : " https://github.com/pelagornis/refineui-system-icons" )
66+ inceptionYear.set(findProperty(" POM_INCEPTION_YEAR" ) as String? ? : " 2024" )
67+
68+ licenses {
69+ license {
70+ name.set(findProperty(" POM_LICENSE_NAME" ) as String? ? : " MIT License" )
71+ url.set(findProperty(" POM_LICENSE_URL" ) as String? ? : " https://opensource.org/licenses/MIT" )
72+ distribution.set(findProperty(" POM_LICENSE_DIST" ) as String? ? : " repo" )
73+ }
74+ }
75+
76+ developers {
77+ developer {
78+ id.set(findProperty(" POM_DEVELOPER_ID" ) as String? ? : " pelagornis" )
79+ name.set(findProperty(" POM_DEVELOPER_NAME" ) as String? ? : " Pelagornis" )
80+ url.set(findProperty(" POM_DEVELOPER_URL" ) as String? ? : " https://github.com/pelagornis" )
81+ }
82+ }
83+
84+ scm {
85+ url.set(findProperty(" POM_SCM_URL" ) as String? ? : " https://github.com/pelagornis/refineui-system-icons" )
86+ connection.set(findProperty(" POM_SCM_CONNECTION" ) as String? ? : " scm:git:git://github.com/pelagornis/refineui-system-icons.git" )
87+ developerConnection.set(findProperty(" POM_SCM_DEV_CONNECTION" ) as String? ? : " scm:git:ssh://git@github.com/pelagornis/refineui-system-icons.git" )
88+ }
89+ }
90+ }
91+
92+ // Debug Task
93+ tasks.register(" printPublicationInfo" ) {
94+ doLast {
95+ println (" =" .repeat(60 ))
96+ println (" Publication Info" )
97+ println (" Group ID: ${project.group} " )
98+ println (" Artifact ID: refineui-system-icons" )
99+ println (" Version: ${project.version} " )
100+ println (" =" .repeat(60 ))
101+ }
39102}
0 commit comments