1
1
plugins {
2
2
id(" com.android.library" )
3
3
id(" org.jetbrains.kotlin.android" )
4
+ id(" maven-publish" )
5
+ id(" signing" )
4
6
id(" org.jetbrains.dokka" )
5
7
}
6
8
@@ -49,7 +51,7 @@ dependencies {
49
51
implementation(co.ycharts.dependency.YChartDependency .CORE_KTX )
50
52
implementation(co.ycharts.dependency.YChartDependency .APPCOMPAT )
51
53
implementation(co.ycharts.dependency.YChartDependency .MATERIAL )
52
- implementation (co.ycharts.dependency.YChartDependency .MATERIAL_3 )
54
+ implementation(co.ycharts.dependency.YChartDependency .MATERIAL_3 )
53
55
implementation(co.ycharts.dependency.YChartDependency .COMPOSE_UI )
54
56
implementation(co.ycharts.dependency.YChartDependency .COMPOSE_ACTIVITY )
55
57
implementation(co.ycharts.dependency.YChartDependency .COMPOSE_MATERIAL )
@@ -61,3 +63,84 @@ dependencies {
61
63
androidTestImplementation(co.ycharts.dependency.YChartDependency .TEST_EXTN )
62
64
androidTestImplementation(co.ycharts.dependency.YChartDependency .ESPRESSO_CORE )
63
65
}
66
+ val dokkaOutputDir = " $buildDir /dokka"
67
+
68
+ tasks.dokkaHtml {
69
+ outputDirectory.set(file(dokkaOutputDir))
70
+ }
71
+
72
+ val deleteDokkaOutputDir by tasks.register<Delete >(" deleteDokkaOutputDirectory" ) {
73
+ delete(dokkaOutputDir)
74
+ }
75
+ val javadocJar = tasks.register<Jar >(" javadocJar" ) {
76
+ dependsOn(deleteDokkaOutputDir, tasks.dokkaHtml)
77
+ archiveClassifier.set(" javadoc" )
78
+ from(dokkaOutputDir)
79
+ }
80
+ publishing {
81
+ repositories {
82
+ maven {
83
+ name = " YCharts"
84
+ setUrl(" https://s01.oss.sonatype.org/service/local/staging/deploy/maven2" )
85
+ credentials {
86
+ username = project.findProperty(" mavenCentralUsername" ).toString()
87
+ password = project.findProperty(" mavenCentralPassword" ).toString()
88
+ }
89
+ }
90
+ }
91
+ publications {
92
+ register<MavenPublication >(" release" ) {
93
+ groupId = " co.yml"
94
+ artifactId = " ycharts"
95
+ version = " 1.0.0"
96
+ afterEvaluate {
97
+ from(components[" release" ])
98
+ }
99
+ artifact(javadocJar)
100
+ pom {
101
+ name.set(" YCharts" )
102
+ description.set(" YCharts is a light and extensible chart library for Jetpack Compose system." )
103
+ url.set(" https://github.com/yml-org/YCharts" )
104
+ licenses {
105
+ license {
106
+ name.set(" The Apache License, Version 2.0" )
107
+ url.set(" http://www.apache.org/licenses/LICENSE-2.0.txt" )
108
+ distribution.set(" http://www.apache.org/licenses/LICENSE-2.0.txt" )
109
+ }
110
+ }
111
+ developers {
112
+ developer {
113
+ id.set(" dkk009" )
114
+ name.set(" Deepak KK" )
115
+ url.set(" https://github.com/dkk009" )
116
+ }
117
+ developer {
118
+ id.set(" preetham1316" )
119
+ name.set(" Preetham Ivan Dsouza" )
120
+ url.set(" https://github.com/preetham1316" )
121
+ }
122
+ developer {
123
+ id.set(" kikoso" )
124
+ name.set(" Enrique López Mañas" )
125
+ url.set(" https://github.com/kikoso" )
126
+ }
127
+ }
128
+ scm {
129
+ url.set(" https://github.com/yml-org/YCharts" )
130
+ connection.set(" scm:git:git://github.com/yml-org/YCharts.git" )
131
+ developerConnection.set(
" scm:git:ssh://[email protected] :yml-org/YCharts.git" )
132
+ }
133
+ }
134
+ }
135
+ }
136
+ }
137
+
138
+
139
+ signing {
140
+ useInMemoryPgpKeys(
141
+ project.findProperty(" signing.keyId" ).toString(),
142
+ project.findProperty(" signing.InMemoryKey" ).toString(),
143
+ project.findProperty(" signing.password" ).toString()
144
+ )
145
+ sign(publishing.publications)
146
+ }
0 commit comments