11import de.undercouch.gradle.tasks.download.Download
2+ import org.apache.tools.ant.taskdefs.condition.Os
23
34plugins {
45 kotlin(" multiplatform" ) version " 1.3.70" apply false
@@ -38,12 +39,11 @@ tasks {
3839 into(" $buildDir " )
3940 outputs.upToDateWhen { File (" $rootDir /$buildDir /Firebase" ).isDirectory }
4041 }
41-
42+
4243}
4344
4445subprojects {
4546
46-
4747 group = " dev.gitlive"
4848
4949 repositories {
@@ -92,10 +92,13 @@ subprojects {
9292 copySourceMap,
9393 copyReadMe
9494 )
95-
95+
9696 workingDir(" $buildDir /node_module" )
97- // commandLine("npm", "publish")
98- commandLine(" ls" )
97+ if (Os .isFamily(Os .FAMILY_WINDOWS )) {
98+ commandLine(" cmd" , " /c" , " npm publish" )
99+ } else {
100+ commandLine(" npm" , " publish" )
101+ }
99102 }
100103 }
101104
@@ -130,10 +133,10 @@ subprojects {
130133
131134 apply (plugin= " maven-publish" )
132135 apply (plugin= " signing" )
133-
136+
134137
135138 configure<PublishingExtension > {
136-
139+
137140 repositories {
138141 maven {
139142 url = uri(" https://oss.sonatype.org/service/local/staging/deploy/maven2" )
@@ -143,47 +146,46 @@ subprojects {
143146 }
144147 }
145148 }
146-
149+
147150 publications.all {
148151 this as MavenPublication
149-
152+
150153 pom {
151154 name.set(" firebase-kotlin-sdk" )
152155 description.set(" The Firebase Kotlin SDK is a Kotlin-first SDK for Firebase. It's API is similar to the Firebase Android SDK Kotlin Extensions but also supports multiplatform projects, enabling you to use Firebase directly from your common source targeting iOS, Android or JS." )
153156 url.set(" https://github.com/GitLiveApp/firebase-kotlin-sdk" )
154157 inceptionYear.set(" 2019" )
155158
156- scm {
157- url.set(" https://github.com/GitLiveApp/firebase-kotlin-sdk" )
158- connection.set(" scm:git:https://github.com/GitLiveApp/firebase-kotlin-sdk.git" )
159- developerConnection.set(" scm:git:https://github.com/GitLiveApp/firebase-kotlin-sdk.git" )
160- tag.set(" HEAD" )
161- }
159+ scm {
160+ url.set(" https://github.com/GitLiveApp/firebase-kotlin-sdk" )
161+ connection.set(" scm:git:https://github.com/GitLiveApp/firebase-kotlin-sdk.git" )
162+ developerConnection.set(" scm:git:https://github.com/GitLiveApp/firebase-kotlin-sdk.git" )
163+ tag.set(" HEAD" )
164+ }
162165
163- issueManagement {
164- system.set(" GitHub Issues" )
165- url.set(" https://github.com/GitLiveApp/firebase-kotlin-sdk/issues" )
166- }
166+ issueManagement {
167+ system.set(" GitHub Issues" )
168+ url.set(" https://github.com/GitLiveApp/firebase-kotlin-sdk/issues" )
169+ }
167170
168- developers {
169- developer {
170- name.set(" Nicholas Bransby-Williams" )
171- email.set(" nbransby@gmail.com" )
172- }
171+ developers {
172+ developer {
173+ name.set(" Nicholas Bransby-Williams" )
174+ email.set(" nbransby@gmail.com" )
173175 }
176+ }
174177
175- licenses {
176- license {
177- name.set(" The Apache Software License, Version 2.0" )
178- url.set(" http://www.apache.org/licenses/LICENSE-2.0.txt" )
179- distribution.set(" repo" )
180- comments.set(" A business-friendly OSS license" )
181- }
178+ licenses {
179+ license {
180+ name.set(" The Apache Software License, Version 2.0" )
181+ url.set(" http://www.apache.org/licenses/LICENSE-2.0.txt" )
182+ distribution.set(" repo" )
183+ comments.set(" A business-friendly OSS license" )
182184 }
183-
184185 }
186+
185187 }
186-
188+ }
187189
188190 }
189191
0 commit comments