@@ -19,7 +19,7 @@ buildscript {
1919 }
2020 }
2121 dependencies {
22- classpath(" com.android.tools.build:gradle:3.6 .1" )
22+ classpath(" com.android.tools.build:gradle:4.0 .1" )
2323 classpath(" de.undercouch:gradle-download-task:4.0.4" )
2424 classpath(" com.adarshr:gradle-test-logger-plugin:2.0.0" )
2525 }
@@ -28,29 +28,7 @@ buildscript {
2828val targetSdkVersion by extra(28 )
2929val minSdkVersion by extra(16 )
3030
31-
3231tasks {
33- val downloadIOSFirebaseZipFile by creating(Download ::class ) {
34- src(" https://github.com/firebase/firebase-ios-sdk/releases/download/6.17.0/Firebase-6.17.0.zip" )
35- dest(File (buildDir, " Firebase-6.17.0.zip" ))
36- if (System .getenv(" token" ) != null ) {
37- username(System .getenv(" token" ))
38- }
39- overwrite(false )
40- }
41-
42- val unzipIOSFirebase by creating(Copy ::class ) {
43- if (! File (" $buildDir /Firebase" ).exists()) {
44- val zipFile = File (buildDir, " Firebase-6.17.0.zip" )
45- if (! zipFile.exists()) {
46- dependsOn(downloadIOSFirebaseZipFile)
47- }
48- from(zipTree(zipFile))
49- into(buildDir)
50- }
51- outputs.upToDateWhen { File (" $buildDir /Firebase" ).isDirectory }
52- }
53-
5432 val updateVersions by registering {
5533 dependsOn(
5634 " firebase-app:updateVersion" , " firebase-app:updateDependencyVersion" ,
@@ -61,7 +39,6 @@ tasks {
6139 " firebase-functions:updateVersion" , " firebase-functions:updateDependencyVersion"
6240 )
6341 }
64-
6542}
6643
6744subprojects {
@@ -172,6 +149,29 @@ subprojects {
172149 )
173150 }
174151 }
152+
153+ listOf (" bootstrap" , " update" ).forEach {
154+ task<Exec >(" carthage${it.capitalize()} " ) {
155+ group = " carthage"
156+ executable = " carthage"
157+ args(
158+ it,
159+ " --project-directory" , " src/iosMain/c_interop" ,
160+ " --platform" , " iOS" ,
161+ " --cache-builds"
162+ )
163+ }
164+ }
165+
166+ withType(org.jetbrains.kotlin.gradle.tasks.CInteropProcess ::class ) {
167+ dependsOn(" carthageBootstrap" )
168+ }
169+
170+ create(" carthageClean" , Delete ::class .java) {
171+ group = " carthage"
172+ delete(File (" $projectDir /src/iosMain/c_interop/Carthage" ))
173+ delete(File (" $projectDir /src/iosMain/c_interop/Cartfile.resolved" ))
174+ }
175175 }
176176
177177// tasks.withType<KotlinCompile<*>> {
@@ -188,34 +188,33 @@ subprojects {
188188 mkdir(" $buildDir /node_module" )
189189 }
190190
191- if (Os .isFamily(Os .FAMILY_MAC )) {
192- tasks.getByPath(" compileKotlinIos" ).dependsOn(rootProject.tasks.named(" unzipIOSFirebase" ))
193- } else {
194- println (" Skipping Firebase zip download" )
191+ tasks.named<Delete >(" clean" ) {
192+ dependsOn(" carthageClean" )
195193 }
196194
197-
198195 dependencies {
199196 " commonMainImplementation" (kotlin(" stdlib-common" ))
200- " commonMainImplementation" (" org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.6 " )
197+ " commonMainImplementation" (" org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.8 " )
201198 " jsMainImplementation" (kotlin(" stdlib-js" ))
202- " jsMainImplementation" (" org.jetbrains.kotlinx:kotlinx-coroutines-core-js:1.3.6 " )
203- " androidMainImplementation" (" org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.6 " )
199+ " jsMainImplementation" (" org.jetbrains.kotlinx:kotlinx-coroutines-core-js:1.3.8 " )
200+ " androidMainImplementation" (" org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.8 " )
204201 " androidMainImplementation" (" org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.3.6" )
205- " iosMainImplementation" (" org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.6 " )
206- " iosMainImplementation" (" org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.6 " )
202+ " iosMainImplementation" (" org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.8 " )
203+ " iosMainImplementation" (" org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.8 " )
207204 " commonTestImplementation" (kotlin(" test-common" ))
208205 " commonTestImplementation" (kotlin(" test-annotations-common" ))
209- " commonTestImplementation" (" org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.6 " )
210- " commonTestImplementation" (" org.jetbrains.kotlinx:kotlinx-coroutines-test:1.3.6 " )
206+ " commonTestImplementation" (" org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.8 " )
207+ " commonTestImplementation" (" org.jetbrains.kotlinx:kotlinx-coroutines-test:1.3.8 " )
211208 " jsTestImplementation" (kotlin(" test-js" ))
212209 " androidAndroidTestImplementation" (kotlin(" test-junit" ))
213- " androidAndroidTestImplementation" (" junit:junit:4.12 " )
210+ " androidAndroidTestImplementation" (" junit:junit:4.13 " )
214211 " androidAndroidTestImplementation" (" androidx.test:core:1.2.0" )
215- " androidAndroidTestImplementation" (" org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.6 " )
212+ " androidAndroidTestImplementation" (" org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.8 " )
216213 " androidAndroidTestImplementation" (" androidx.test.ext:junit:1.1.1" )
217- " androidAndroidTestImplementation" (" androidx.test:runner:1.1 .0" )
214+ " androidAndroidTestImplementation" (" androidx.test:runner:1.2 .0" )
218215 }
216+
217+
219218 }
220219
221220 apply (plugin= " maven-publish" )
0 commit comments