-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle.kts
103 lines (93 loc) · 3.58 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
/*
*
* Copyright 2024 Esri
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
id("org.jetbrains.kotlin.plugin.compose")
id("artifact-deploy")
id("kotlin-parcelize")
alias(libs.plugins.binary.compatibility.validator) apply true
}
android {
namespace = "com.arcgismaps.toolkit.popup"
compileSdk = libs.versions.compileSdk.get().toInt()
defaultConfig {
minSdk = libs.versions.minSdk.get().toInt()
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}
buildTypes {
release {
isMinifyEnabled = false
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
buildFeatures {
compose = true
}
// If this were not an android project, we would just write `explicitApi()` in the Kotlin scope.
// but as an android project could write `freeCompilerArgs = listOf("-Xexplicit-api=strict")`
// in the kotlinOptions above, but that would enforce api rules on the test code, which we don't want.
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
if ("Test" !in name) {
kotlinOptions.freeCompilerArgs += "-Xexplicit-api=strict"
}
}
/**
* Configures the test report for connected (instrumented) tests to be copied to a central
* folder in the project's root directory.
*/
testOptions {
val connectedTestReportsPath: String by project
reportDir = "$connectedTestReportsPath/${project.name}"
}
}
apiValidation {
// todo: remove when this is resolved https://github.com/Kotlin/binary-compatibility-validator/issues/74
// compose compiler generates public singletons for internal compose functions. this may be resolved in the compose
// compiler.
val composableSingletons = listOf(
"com.arcgismaps.toolkit.popup.internal.ui.ComposableSingletons\$ExpandableCardKt",
"com.arcgismaps.toolkit.popup.internal.ui.fileviewer.ComposableSingletons\$FileViewerKt",
"com.arcgismaps.toolkit.popup.internal.ui.expandablecard.ComposableSingletons\$ExpandableCardKt"
)
ignoredClasses.addAll(composableSingletons)
}
dependencies {
api(arcgis.mapsSdk)
implementation(platform(libs.coil.bom))
implementation(libs.coil.compose)
implementation(platform(libs.androidx.compose.bom))
implementation(libs.bundles.composeCore)
implementation(libs.bundles.core)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.material.icons)
implementation(libs.androidx.media3.exoplayer)
implementation(libs.androidx.media3.exoplayer.dash)
implementation(libs.androidx.media3.ui)
testImplementation(libs.bundles.unitTest)
androidTestImplementation(libs.bundles.composeTest)
debugImplementation(libs.bundles.debug)
}