android-samples/snippets/app-rx/build.gradle.kts
Enrique López-Mañas 7cfb154178
chore: added Lint flow to modules (#2308)
* chore: added Lint flow to modules

* chore: header for lint

* chore: removed abort on error

* chore: remove lint

* chore: fixed lints

* chore: fix permission
2025-10-13 10:40:58 -06:00

106 lines
3.3 KiB
Plaintext

/*
* Copyright 2024 Google LLC
*
* 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 {
alias(libs.plugins.android.application)
alias(libs.plugins.jetbrains.kotlin.android)
alias(libs.plugins.secrets.gradle.plugin)
}
android {
namespace = "com.google.maps.example.rx"
compileSdk = libs.versions.compileSdk.get().toInt()
defaultConfig {
applicationId = "com.google.maps.example.rx"
minSdk = libs.versions.minSdk.get().toInt()
targetSdk = libs.versions.targetSdk.get().toInt()
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildFeatures {
buildConfig = true
}
buildTypes {
release {
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
lint {
disable += setOf("MissingInflatedId")
sarifOutput = layout.buildDirectory.file("reports/lint-results-debug.sarif").get().asFile
}
kotlin {
compilerOptions {
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21)
}
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}
}
// [START maps_android_maps_rx_install]
dependencies {
// RxJava bindings for the Maps SDK
implementation(libs.maps.rx)
// RxJava bindings for the Places SDK
implementation(libs.places.rx)
// It is recommended to also include the latest Maps SDK, Places SDK and RxJava so you
// have the latest features and bug fixes.
implementation("com.google.android.gms:play-services-maps:19.2.0")
implementation("com.google.android.libraries.places:places:4.4.1")
implementation("io.reactivex.rxjava3:rxjava:3.1.12")
// [START_EXCLUDE silent]
implementation(libs.appcompat)
implementation(libs.lifecycle.runtime.ktx)
implementation(libs.material)
implementation(libs.rxlifecycle.android.lifecycle.kotlin)
implementation(libs.maps.ktx)
implementation(libs.kotlin.stdlib.jdk8)
// [END_EXCLUDE silent]
}
// [END maps_android_maps_rx_install]
secrets {
// To add your Maps API key to this project:
// 1. If the secrets.properties file does not exist, create it in the same folder as the local.properties file.
// 2. Add this line, where YOUR_API_KEY is your API key:
// MAPS_API_KEY=YOUR_API_KEY
propertiesFileName = "secrets.properties"
// A properties file containing default secret values. This file can be
// checked in version control.
defaultPropertiesFileName = "local.defaults.properties"
}