|
| 1 | +/* |
| 2 | + * |
| 3 | + * Copyright 2024 Esri |
| 4 | + * |
| 5 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | + * you may not use this file except in compliance with the License. |
| 7 | + * You may obtain a copy of the License at |
| 8 | + * |
| 9 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | + * |
| 11 | + * Unless required by applicable law or agreed to in writing, software |
| 12 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | + * See the License for the specific language governing permissions and |
| 15 | + * limitations under the License. |
| 16 | + * |
| 17 | + */ |
| 18 | + |
| 19 | +plugins { |
| 20 | + id("com.android.application") |
| 21 | + id("org.jetbrains.kotlin.android") |
| 22 | + id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin") |
| 23 | +} |
| 24 | + |
| 25 | +secrets { |
| 26 | + // this file doesn't contain secrets, it just provides defaults which can be committed into git. |
| 27 | + defaultPropertiesFileName = "secrets.defaults.properties" |
| 28 | +} |
| 29 | + |
| 30 | +android { |
| 31 | + namespace = "com.arcgismaps.toolkit.popupapp" |
| 32 | + compileSdk = libs.versions.compileSdk.get().toInt() |
| 33 | + |
| 34 | + defaultConfig { |
| 35 | + applicationId ="com.arcgismaps.toolkit.popupapp" |
| 36 | + minSdk = libs.versions.minSdk.get().toInt() |
| 37 | + targetSdk = libs.versions.compileSdk.get().toInt() |
| 38 | + versionCode = 1 |
| 39 | + versionName = "1.0" |
| 40 | + |
| 41 | + testInstrumentationRunner ="androidx.test.runner.AndroidJUnitRunner" |
| 42 | + vectorDrawables { |
| 43 | + useSupportLibrary = true |
| 44 | + } |
| 45 | + } |
| 46 | + |
| 47 | + buildTypes { |
| 48 | + release { |
| 49 | + isMinifyEnabled = true |
| 50 | + isShrinkResources = true |
| 51 | + |
| 52 | + proguardFiles( |
| 53 | + getDefaultProguardFile("proguard-android-optimize.txt"), |
| 54 | + "proguard-rules.pro" |
| 55 | + ) |
| 56 | + } |
| 57 | + } |
| 58 | + compileOptions { |
| 59 | + sourceCompatibility = JavaVersion.VERSION_1_8 |
| 60 | + targetCompatibility = JavaVersion.VERSION_1_8 |
| 61 | + } |
| 62 | + kotlinOptions { |
| 63 | + jvmTarget = "1.8" |
| 64 | + } |
| 65 | + |
| 66 | + buildFeatures { |
| 67 | + compose = true |
| 68 | + buildConfig = true |
| 69 | + } |
| 70 | + |
| 71 | + composeOptions { |
| 72 | + kotlinCompilerExtensionVersion = libs.versions.androidxComposeCompiler.get() |
| 73 | + } |
| 74 | + |
| 75 | + /** |
| 76 | + * Configures the test report for connected (instrumented) tests to be copied to a central |
| 77 | + * folder in the project's root directory. |
| 78 | + */ |
| 79 | + testOptions { |
| 80 | + val connectedTestReportsPath: String by project |
| 81 | + reportDir = "$connectedTestReportsPath/${project.name}" |
| 82 | + } |
| 83 | + |
| 84 | + packaging { |
| 85 | + resources { |
| 86 | + excludes += "/META-INF/{AL2.0,LGPL2.1}" |
| 87 | + } |
| 88 | + } |
| 89 | +} |
| 90 | + |
| 91 | +dependencies { |
| 92 | + implementation(project(":geoview-compose")) |
| 93 | + implementation(arcgis.mapsSdk) |
| 94 | + implementation(project(":popup")) |
| 95 | + implementation(platform(libs.androidx.compose.bom)) |
| 96 | + implementation(libs.bundles.composeCore) |
| 97 | + implementation(libs.bundles.core) |
| 98 | + implementation(libs.androidx.lifecycle.runtime.ktx) |
| 99 | + implementation(libs.androidx.activity.compose) |
| 100 | + implementation(libs.androidx.lifecycle.viewmodel.compose) |
| 101 | + testImplementation(libs.bundles.unitTest) |
| 102 | + androidTestImplementation(platform(libs.androidx.compose.bom)) |
| 103 | + androidTestImplementation(libs.bundles.composeTest) |
| 104 | + debugImplementation(libs.bundles.debug) |
| 105 | +} |
0 commit comments