Skip to content

Commit 6f7804e

Browse files
committed
remove npm publish
1 parent afceb8e commit 6f7804e

File tree

3 files changed

+3
-94
lines changed

3 files changed

+3
-94
lines changed

README.md

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<h1 align="left">Firebase Kotlin SDK <img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/gitliveapp/firebase-kotlin-sdk?style=flat-square"> <a href="https://git.live"><img src="https://img.shields.io/badge/collaborate-on%20gitlive-blueviolet?style=flat-square"></a></h1>
22
<img align="left" width="75px" src="https://avatars2.githubusercontent.com/u/42865805?s=200&v=4">
33
<b>Built and maintained with 🧡 by <a href="https://git.live">GitLive</a></b><br/>
4-
<i>Real-time code collaboration inside any IDE</i><br/>
4+
<i>Development teams merge faster with GitLive</i><br/>
55
<br/>
66
<br/>
77
The Firebase Kotlin SDK is a Kotlin-first SDK for Firebase. It's API is similar to the <a href="https://firebase.github.io/firebase-android-sdk/reference/kotlin/firebase-ktx/">Firebase Android SDK Kotlin Extensions</a> but also supports multiplatform projects, enabling you to use Firebase directly from your common source targeting <strong>iOS</strong>, <strong>Android</strong> or <strong>JS</strong>.
@@ -23,9 +23,6 @@ The following libraries are available for the various Firebase products.
2323
| [Performance](https://firebase.google.com/docs/perf-mon) | [`dev.gitlive:firebase-perf:1.8.0`](https://search.maven.org/artifact/dev.gitlive/firebase-perf/1.8.0/pom) | ![1%](https://img.shields.io/badge/-1%25-orange?style=flat-square) |
2424
| [Crashlytics](https://firebase.google.com/docs/crashlytics) | [`dev.gitlive:firebase-crashlytics:1.8.0`](https://search.maven.org/artifact/dev.gitlive/firebase-crashlytics/1.8.0/pom) | ![80%](https://img.shields.io/badge/-1%25-orange?style=flat-square) |
2525

26-
27-
28-
2926
Is the Firebase library or API you need missing? [Create an issue](https://github.com/GitLiveApp/firebase-kotlin-sdk/issues/new?labels=API+coverage&template=increase-api-coverage.md&title=Add+%5Bclass+name%5D.%5Bfunction+name%5D+to+%5Blibrary+name%5D+for+%5Bplatform+names%5D) to request additional API coverage or be awesome and [submit a PR](https://github.com/GitLiveApp/firebase-kotlin-sdk/fork)
3027

3128
## Kotlin-first design
@@ -217,23 +214,5 @@ These properties are only accessible from the equivalent target's source set. Fo
217214
.build()
218215
```
219216

220-
### NPM modules
221-
222-
If you are building a Kotlin multiplatform library which will be consumed from JS code you may need to include the SDK in your `package.json`, you can do it as follows:
223-
224-
```json
225-
"dependencies": {
226-
"@gitlive/firebase-auth": "1.8.0",
227-
"@gitlive/firebase-config": "1.8.0",
228-
"@gitlive/firebase-database": "1.8.0",
229-
"@gitlive/firebase-firestore": "1.8.0",
230-
"@gitlive/firebase-functions": "1.8.0",
231-
"@gitlive/firebase-installations": "1.8.0",
232-
"@gitlive/firebase-messaging": "1.8.0",
233-
"@gitlive/firebase-storage": "1.8.0"
234-
"@gitlive/firebase-perf": "1.8.0"
235-
"@gitlive/firebase-crashlytics": "1.8.0"
236-
}
237-
```
238217

239218

build.gradle.kts

Lines changed: 2 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import org.apache.tools.ant.taskdefs.condition.Os
21
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
32
import org.gradle.api.tasks.testing.logging.TestLogEvent
43

@@ -59,18 +58,10 @@ subprojects {
5958
mavenLocal()
6059
google()
6160
mavenCentral()
62-
maven {
63-
name = "github"
64-
url = uri("https://maven.pkg.github.com/gitliveapp/packages")
65-
credentials {
66-
username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME")
67-
password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN")
68-
}
69-
}
7061
}
7162

7263
tasks.withType<Sign>().configureEach {
73-
onlyIf { !project.gradle.startParameter.taskNames.any { "MavenLocal" in it } && !project.gradle.startParameter.taskNames.contains("publishToGitHubPackagesRepository") }
64+
onlyIf { !project.gradle.startParameter.taskNames.any { "MavenLocal" in it } }
7465
}
7566

7667
val skipPublishing = project.name == "test-utils" // skip publishing for test utils
@@ -110,71 +101,12 @@ subprojects {
110101
.replace("firebase-app\": \"([^\"]+)".toRegex(), "firebase-app\": \"${project.property("firebase-app.version")}")
111102
)
112103
}
113-
114-
val copyReadMe by registering(Copy::class) {
115-
from(rootProject.file("README.md"))
116-
into(file("$buildDir/node_module"))
117-
}
118-
119-
val copyPackageJson by registering(Copy::class) {
120-
from(file("package.json"))
121-
into(file("$buildDir/node_module"))
122-
}
123-
124-
val unzipJar by registering(Copy::class) {
125-
val zipFile = File("$buildDir/libs", "${project.name}-js-${project.version}.jar")
126-
from(this.project.zipTree(zipFile))
127-
into("$buildDir/classes/kotlin/js/main/")
128-
}
129-
130-
val copyJS by registering {
131-
mustRunAfter("unzipJar", "copyPackageJson")
132-
doLast {
133-
val from = File("$buildDir/classes/kotlin/js/main/${rootProject.name}-${project.name}.js")
134-
val into = File("$buildDir/node_module/${project.name}.js")
135-
into.createNewFile()
136-
into.writeText(
137-
from.readText()
138-
.replace("require('firebase-kotlin-sdk-", "require('@gitlive/")
139-
// .replace("require('kotlinx-serialization-kotlinx-serialization-runtime')", "require('@gitlive/kotlinx-serialization-runtime')")
140-
)
141-
}
142-
}
143-
144-
val copySourceMap by registering(Copy::class) {
145-
from(file("$buildDir/classes/kotlin/js/main/${project.name}.js.map"))
146-
into(file("$buildDir/node_module"))
147-
}
148-
149-
val prepareForNpmPublish by registering {
150-
dependsOn(
151-
unzipJar,
152-
copyPackageJson,
153-
copySourceMap,
154-
copyReadMe,
155-
copyJS
156-
)
157-
}
158-
159-
val publishToNpm by creating(Exec::class) {
160-
workingDir("$buildDir/node_module")
161-
isIgnoreExitValue = true
162-
if(Os.isFamily(Os.FAMILY_WINDOWS)) {
163-
commandLine("cmd", "/c", "npm publish")
164-
} else {
165-
commandLine("npm", "publish")
166-
}
167-
}
168104
}
169105

170106
afterEvaluate {
171-
// create the projects node_modules if they don't exist
172-
if(!File("$buildDir/node_module").exists()) {
173-
mkdir("$buildDir/node_module")
174-
}
175107

176108
dependencies {
177-
"jvmMainApi"("dev.gitlive:firebase-java-sdk:1.0.18")
109+
"jvmMainApi"("dev.gitlive:firebase-java-sdk:0.1.0")
178110
"jvmMainApi"("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.6.0") {
179111
exclude("com.google.android.gms")
180112
}

settings.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,3 @@ include(
88
"firebase-functions"
99
)
1010

11-
//enableFeaturePreview("GRADLE_METADATA")
12-

0 commit comments

Comments
 (0)