@@ -3,13 +3,108 @@ plugins {
3
3
id(" co.yml.ytag.library.compose" )
4
4
id(" co.yml.ytag.library" )
5
5
id(" co.yml.ytag.library.jacoco" )
6
+ id(" maven-publish" )
7
+ id(" signing" )
8
+ id(" org.jetbrains.dokka" )
6
9
}
7
10
8
11
android {
9
12
namespace = " co.yml.ytag.ui"
13
+ buildTypes {
14
+ release {
15
+ isMinifyEnabled = false
16
+ proguardFiles(
17
+ getDefaultProguardFile(" proguard-android-optimize.txt" ),
18
+ " proguard-rules.pro"
19
+ )
20
+ }
21
+ }
10
22
}
11
23
12
24
dependencies {
13
25
testImplementation(project(mapOf (" path" to " :core:test" )))
14
26
androidTestImplementation(project(mapOf (" path" to " :core:test" )))
15
27
}
28
+ val dokkaOutputDir = " $buildDir /dokka"
29
+
30
+ tasks.dokkaHtml {
31
+ outputDirectory.set(file(dokkaOutputDir))
32
+ }
33
+
34
+ val deleteDokkaOutputDir by tasks.register<Delete >(" deleteDokkaOutputDirectory" ) {
35
+ delete(dokkaOutputDir)
36
+ }
37
+ val javadocJar = tasks.register<Jar >(" javadocJar" ) {
38
+ dependsOn(deleteDokkaOutputDir, tasks.dokkaHtml)
39
+ archiveClassifier.set(" javadoc" )
40
+ from(dokkaOutputDir)
41
+ }
42
+
43
+ publishing {
44
+ repositories {
45
+ maven {
46
+ name = " YTag"
47
+ setUrl(" https://s01.oss.sonatype.org/service/local/staging/deploy/maven2" )
48
+ credentials {
49
+ username = project.findProperty(" mavenCentralUsername" )?.toString() ? : System .getenv(" MAVEN_USERNAME" )
50
+ password = project.findProperty(" mavenCentralPassword" )?.toString() ? : System .getenv(" MAVEN_PASSWORD" )
51
+ }
52
+ }
53
+ }
54
+ publications {
55
+ register<MavenPublication >(" release" ) {
56
+ groupId = " co.yml"
57
+ artifactId = " ytag"
58
+ version = " 1.0.0"
59
+ afterEvaluate {
60
+ println (" Components:${components.names} " )
61
+ from(components[" productionRelease" ])
62
+ }
63
+ artifact(javadocJar)
64
+ pom {
65
+ name.set(" YTag" )
66
+ description.set(" Y Tag is a UI element in Android (some times referred to as chips) which displays a piece of information. It consist of a leading icon(optional), Text and a trailing icon (optional)." )
67
+ url.set(" https://github.com/yml-org/YTag-android" )
68
+ licenses {
69
+ license {
70
+ name.set(" The Apache License, Version 2.0" )
71
+ url.set(" http://www.apache.org/licenses/LICENSE-2.0.txt" )
72
+ distribution.set(" http://www.apache.org/licenses/LICENSE-2.0.txt" )
73
+ }
74
+ }
75
+ developers {
76
+ developer {
77
+ id.set(" sreekuttancj" )
78
+ name.set(" Sreekuttan C J" )
79
+ url.set(" https://github.com/sreekuttancj" )
80
+ }
81
+ developer {
82
+ id.set(" dkk009" )
83
+ name.set(" Deepak KK" )
84
+ url.set(" https://github.com/dkk009" )
85
+ }
86
+ developer {
87
+ id.set(" kikoso" )
88
+ name.set(" Enrique López Mañas" )
89
+ url.set(" https://github.com/kikoso" )
90
+ }
91
+ }
92
+ scm {
93
+ url.set(" https://github.com/yml-org/YTag-android" )
94
+ connection.set(" scm:git:git://github.com/yml-org/YTag-android.git" )
95
+ developerConnection.set(
" scm:git:ssh://[email protected] :yml-org/YTag-android.git" )
96
+ }
97
+ }
98
+ }
99
+ }
100
+ }
101
+
102
+
103
+ signing {
104
+ useInMemoryPgpKeys(
105
+ project.findProperty(" signing.keyId" )?.toString() ? : System .getenv(" SIGNINGKEY" ),
106
+ project.findProperty(" signing.InMemoryKey" )?.toString() ? : System .getenv(" MEMORY_KEY" ),
107
+ project.findProperty(" signing.password" )?.toString()? : System .getenv(" SIGNINGPASSWORD" )
108
+ )
109
+ sign(publishing.publications)
110
+ }
0 commit comments