|
1 |
| -import org.apache.tools.ant.taskdefs.condition.Os |
2 | 1 | import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
3 | 2 | import org.gradle.api.tasks.testing.logging.TestLogEvent
|
4 | 3 |
|
@@ -59,18 +58,10 @@ subprojects {
|
59 | 58 | mavenLocal()
|
60 | 59 | google()
|
61 | 60 | 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 |
| - } |
70 | 61 | }
|
71 | 62 |
|
72 | 63 | 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 } } |
74 | 65 | }
|
75 | 66 |
|
76 | 67 | val skipPublishing = project.name == "test-utils" // skip publishing for test utils
|
@@ -110,71 +101,12 @@ subprojects {
|
110 | 101 | .replace("firebase-app\": \"([^\"]+)".toRegex(), "firebase-app\": \"${project.property("firebase-app.version")}")
|
111 | 102 | )
|
112 | 103 | }
|
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 |
| - } |
168 | 104 | }
|
169 | 105 |
|
170 | 106 | 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 |
| - } |
175 | 107 |
|
176 | 108 | dependencies {
|
177 |
| - "jvmMainApi"("dev.gitlive:firebase-java-sdk:1.0.18") |
| 109 | + "jvmMainApi"("dev.gitlive:firebase-java-sdk:0.1.0") |
178 | 110 | "jvmMainApi"("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.6.0") {
|
179 | 111 | exclude("com.google.android.gms")
|
180 | 112 | }
|
|
0 commit comments