@@ -2,84 +2,80 @@ apply plugin: 'maven-publish'
22apply plugin : ' signing'
33apply plugin : ' org.jetbrains.dokka'
44
5- task androidSourcesJar (type : Jar ) {
6- archiveClassifier. set(' sources' )
7- if (project. plugins. findPlugin(" com.android.library" )) {
8- from android. sourceSets. main. java. srcDirs
9- from android. sourceSets. main. kotlin. srcDirs
10- } else {
11- from sourceSets. main. java. srcDirs
12- from sourceSets. main. kotlin. srcDirs
5+ if (project. plugins. findPlugin(" com.android.library" )) {
6+ android {
7+ publishing {
8+ singleVariant(" release" ) {
9+ withJavadocJar()
10+ withSourcesJar()
11+ }
1312 }
13+ }
14+ } else {
15+ java {
16+ withSourcesJar()
17+ withJavadocJar()
18+ }
1419}
1520
1621tasks. withType(dokkaHtmlPartial. getClass()). configureEach {
17- pluginsMapConfiguration. set(
18- [" org.jetbrains.dokka.base.DokkaBase" : """ { "separateInheritedMembers": true}""" ]
19- )
20- }
21-
22- task javadocJar (type : Jar , dependsOn : dokkaJavadoc) {
23- archiveClassifier. set(' javadoc' )
24- from dokkaJavadoc. outputDirectory
25- }
26-
27- artifacts {
28- archives androidSourcesJar
29- archives javadocJar
22+ pluginsMapConfiguration. set(
23+ [" org.jetbrains.dokka.base.DokkaBase" : """ { "separateInheritedMembers": true}""" ]
24+ )
3025}
3126
3227group = PUBLISH_GROUP_ID
3328version = PUBLISH_VERSION
3429
3530afterEvaluate {
36- publishing {
37- publications {
38- release(MavenPublication ) {
39- groupId PUBLISH_GROUP_ID
40- artifactId PUBLISH_ARTIFACT_ID
41- version PUBLISH_VERSION
42- if (project. plugins. findPlugin(" com.android.library" )) {
43- from components. release
44- } else {
45- from components. java
46- }
47-
48- artifact androidSourcesJar
49- artifact javadocJar
31+ publishing {
32+ publications {
33+ release(MavenPublication ) {
34+ groupId PUBLISH_GROUP_ID
35+ artifactId PUBLISH_ARTIFACT_ID
36+ version PUBLISH_VERSION
37+ if (project. plugins. findPlugin(" com.android.library" )) {
38+ from components. release
39+ } else {
40+ from components. java
41+ }
5042
51- pom {
52- name = PUBLISH_ARTIFACT_ID
53- description = ' Result and error models for standardizing responses on Kotlin and Android.'
54- url = ' https://github.com/getstream/stream-result'
55- licenses {
56- license {
57- name = ' The Apache Software License, Version 2.0'
58- url = ' http://www.apache.org/licenses/LICENSE-2.0.txt'
59- }
60- }
61- developers {
62- developer {
63- id = ' skydoves'
64- name = ' Jaewoong Eum'
65- }
66- }
67- scm {
68- connection = ' scm:git:github.com/getstream/stream-result.git'
69- developerConnection = ' scm:git:ssh://github.com/getstream/stream-result.git'
70- url = ' https://github.com/getstream/stream-result/tree/main'
71- }
72- }
43+ pom {
44+ name = PUBLISH_ARTIFACT_ID
45+ description = ' Result and error models for standardizing responses on Kotlin and Android.'
46+ url = ' https://github.com/getstream/stream-result'
47+ licenses {
48+ license {
49+ name = ' The Apache Software License, Version 2.0'
50+ url = ' http://www.apache.org/licenses/LICENSE-2.0.txt'
51+ }
52+ }
53+ developers {
54+ developer {
55+ id = ' jcminarro'
56+ name = ' Jc Miñarro'
57+ }
58+ developer {
59+ id = ' skydoves'
60+ name = ' Jaewoong Eum'
7361 }
62+ }
63+ scm {
64+ connection = ' scm:git:github.com/getstream/stream-result.git'
65+ developerConnection = ' scm:git:ssh://github.com/getstream/stream-result.git'
66+ url = ' https://github.com/getstream/stream-result/tree/main'
67+ }
7468 }
69+ }
7570 }
71+ }
7672}
7773
7874signing {
79- useInMemoryPgpKeys(
80- rootProject. ext[" signing.keyId" ],
81- rootProject. ext[" signing.key" ],
82- rootProject. ext[" signing.password" ],
83- )
84- sign publishing. publications
75+ useInMemoryPgpKeys(
76+ rootProject. ext[" signing.keyId" ],
77+ rootProject. ext[" signing.key" ],
78+ rootProject. ext[" signing.password" ],
79+ )
80+ sign publishing. publications
8581}
0 commit comments