Skip to content

Commit aedc35f

Browse files
authored
Add missing common publishing configuration (#35)
1 parent 76303c1 commit aedc35f

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

build.gradle.kts

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import com.android.build.api.dsl.ApplicationExtension
22
import com.android.build.api.dsl.LibraryExtension
3+
import com.vanniktech.maven.publish.MavenPublishBaseExtension
34
import io.getstream.core.Configuration
45

56
plugins {
@@ -62,3 +63,74 @@ subprojects {
6263
}
6364
}
6465
}
66+
67+
subprojects {
68+
plugins.withId("com.vanniktech.maven.publish") {
69+
extensions.configure<MavenPublishBaseExtension> {
70+
publishToMavenCentral(automaticRelease = true)
71+
72+
pom {
73+
name.set("Stream Android Core")
74+
description.set("Stream Core official Android SDK")
75+
url.set("https://github.com/getstream/stream-core-android")
76+
77+
licenses {
78+
license {
79+
name.set("Stream License")
80+
url.set("https://github.com/GetStream/stream-core-android/blob/main/LICENSE")
81+
}
82+
}
83+
84+
developers {
85+
developer {
86+
id = "aleksandar-apostolov"
87+
name = "Aleksandar Apostolov"
88+
89+
}
90+
developer {
91+
id = "VelikovPetar"
92+
name = "Petar Velikov"
93+
94+
}
95+
developer {
96+
id = "andremion"
97+
name = "André Mion"
98+
99+
}
100+
developer {
101+
id = "rahul-lohra"
102+
name = "Rahul Kumar Lohra"
103+
104+
}
105+
developer {
106+
id = "gpunto"
107+
name = "Gianmarco David"
108+
109+
}
110+
}
111+
112+
scm {
113+
connection.set("scm:git:github.com/getstream/stream-core-android.git")
114+
developerConnection.set("scm:git:ssh://github.com/getstream/stream-core-android.git")
115+
url.set("https://github.com/getstream/stream-core-android/tree/main")
116+
}
117+
}
118+
}
119+
}
120+
}
121+
122+
tasks.register("printAllArtifacts") {
123+
group = "publishing"
124+
description = "Prints all artifacts that will be published"
125+
126+
doLast {
127+
subprojects.forEach { subproject ->
128+
subproject.plugins.withId("com.vanniktech.maven.publish") {
129+
subproject.extensions.findByType(PublishingExtension::class.java)
130+
?.publications
131+
?.filterIsInstance<MavenPublication>()
132+
?.forEach { println("${it.groupId}:${it.artifactId}:${it.version}") }
133+
}
134+
}
135+
}
136+
}

0 commit comments

Comments
 (0)