|
1 | 1 | import com.android.build.api.dsl.ApplicationExtension |
2 | 2 | import com.android.build.api.dsl.LibraryExtension |
| 3 | +import com.vanniktech.maven.publish.MavenPublishBaseExtension |
3 | 4 | import io.getstream.core.Configuration |
4 | 5 |
|
5 | 6 | plugins { |
@@ -62,3 +63,74 @@ subprojects { |
62 | 63 | } |
63 | 64 | } |
64 | 65 | } |
| 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