-
Notifications
You must be signed in to change notification settings - Fork 168
/
Copy pathbuild.gradle.kts
137 lines (121 loc) · 3.6 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
/*
* Copyright (c) 2020 GitLive Ltd. Use of this source code is governed by the Apache 2.0 license.
*/
version = project.property("firebase-crashlytics.version") as String
plugins {
id("com.android.library")
kotlin("multiplatform")
kotlin("native.cocoapods")
}
android {
compileSdk = property("targetSdkVersion") as Int
defaultConfig {
minSdk = property("minSdkVersion") as Int
targetSdk = property("targetSdkVersion") as Int
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled = true
}
sourceSets {
getByName("main") {
manifest.srcFile("src/androidMain/AndroidManifest.xml")
}
getByName("androidTest") {
java.srcDir(file("src/androidInstrumentedTest/kotlin"))
manifest.srcFile("src/androidInstrumentedTest/AndroidManifest.xml")
}
}
testOptions {
unitTests.apply {
isIncludeAndroidResources = true
}
}
packagingOptions {
resources.pickFirsts.add("META-INF/kotlinx-serialization-core.kotlin_module")
resources.pickFirsts.add("META-INF/AL2.0")
resources.pickFirsts.add("META-INF/LGPL2.1")
}
lint {
abortOnError = false
}
}
val supportIosTarget = project.property("skipIosTarget") != "true"
kotlin {
android {
publishAllLibraryVariants()
}
// jvm {
// val main by compilations.getting {
// kotlinOptions {
// jvmTarget = "17"
// }
// }
// val test by compilations.getting {
// kotlinOptions {
// jvmTarget = "17"
// }
// }
// }
if (supportIosTarget) {
ios()
iosSimulatorArm64()
cocoapods {
ios.deploymentTarget = "11.0"
framework {
baseName = "FirebaseCrashlytics"
}
noPodspec()
pod("FirebaseCrashlytics") {
version = "10.7.0"
}
}
}
sourceSets {
all {
languageSettings.apply {
apiVersion = "1.6"
languageVersion = "1.6"
progressiveMode = true
optIn("kotlinx.coroutines.ExperimentalCoroutinesApi")
}
}
val commonMain by getting {
dependencies {
api(project(":firebase-app"))
implementation(project(":firebase-common"))
}
}
val commonTest by getting
val androidMain by getting {
dependencies {
api("com.google.firebase:firebase-crashlytics")
}
}
val androidInstrumentedTest by getting {
dependencies {
dependsOn(commonTest)
}
}
// val jvmMain by getting {
// kotlin.srcDir("src/androidMain/kotlin")
// }
if (supportIosTarget) {
val iosMain by getting
val iosSimulatorArm64Main by getting
iosSimulatorArm64Main.dependsOn(iosMain)
val iosTest by sourceSets.getting
val iosSimulatorArm64Test by sourceSets.getting
iosSimulatorArm64Test.dependsOn(iosTest)
}
}
}
if (project.property("firebase-crashlytics.skipIosTests") == "true") {
tasks.forEach {
if (it.name.contains("ios", true) && it.name.contains("test", true)) { it.enabled = false }
}
}
signing {
val signingKey: String? by project
val signingPassword: String? by project
useInMemoryPgpKeys(signingKey, signingPassword)
sign(publishing.publications)
}