@@ -4,20 +4,53 @@ plugins {
44 alias(libs.plugins.compose)
55 alias(libs.plugins.compose.compiler)
66 alias(libs.plugins.dokka)
7- `maven- publish`
7+ alias(libs.plugins.maven.publish)
8+ id(" signing" )
89}
910
10- group = properties[" library.group" ].toString()
11- version =
12- run {
13- System .getenv(" GITHUB_REF_NAME" )?.removePrefix(" release." )
14- ? : properties[" library.version" ].toString()
15- }
16-
1711kotlin {
1812 androidTarget {
19- mavenPublication {
20- artifactId = properties[" library.artifactId" ].toString()
13+ mavenPublishing {
14+ publishToMavenCentral()
15+ signAllPublications()
16+
17+ coordinates(
18+ groupId = properties[" library.group" ].toString(),
19+ artifactId = properties[" library.artifactId" ].toString(),
20+ version = properties[" library.version" ].toString()
21+ )
22+
23+ pom {
24+ name.set(" Mudita MMD Library" )
25+ description.set(
26+ " A UI component library optimized for e‑ink displays on Android, " +
27+ " built on top of Jetpack Compose Material 3 guidelines and classes. " +
28+ " Our goal is to provide a consistent, " +
29+ " predictable set of components that respects Material Design " +
30+ " while addressing the specifics of e‑ink displays." ,
31+ )
32+ inceptionYear.set(" 2025" )
33+ url.set(" https://github.com/mudita/MMD" )
34+ licenses {
35+ license {
36+ name.set(" The Apache License, Version 2.0" )
37+ url.set(" http://www.apache.org/licenses/LICENSE-2.0.txt" )
38+ distribution.set(" http://www.apache.org/licenses/LICENSE-2.0.txt" )
39+ }
40+ }
41+ developers {
42+ developer {
43+ id.set(" krystianbroniszewskimudita" )
44+ name.set(" Krystian Broniszewski" )
45+ 46+ }
47+ }
48+ scm {
49+ connection.set(" scm:git:github.com/mudita/MMD.git" )
50+ developerConnection.set(" scm:git:ssh://github.com/mudita/MMD.git" )
51+ url.set(" https://github.com/mudita/MMD/tree/main" )
52+ }
53+ }
2154 }
2255
2356 publishLibraryVariants(" release" )
@@ -64,3 +97,13 @@ android {
6497 }
6598 }
6699}
100+
101+ signing {
102+ val keyFile = rootProject.file(" secring.gpg" )
103+ val password = project.findProperty(" signing.password" ) as ? String
104+
105+ if (keyFile.exists() && password != null ) {
106+ useInMemoryPgpKeys(keyFile.readText(), password)
107+ sign(publishing.publications)
108+ }
109+ }
0 commit comments