Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: tooling modernization #1753

Merged
merged 5 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ApiDemos/java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ If prompted for a gradle configuration accept the default settings.

Alternatively use the `gradlew build` command to build the project directly.

This demo app requires that you add your own Google Maps API key. See [Get an API Key](../../docs/GET_AN_API_KEY.md) for more instructions.
This demo app requires that you add your own Google Maps API key. See [Get an API key](https://developers.google.com/maps/documentation/android-sdk/get-api-key) for more instructions.

Support
-------
Expand Down
69 changes: 0 additions & 69 deletions ApiDemos/java/app/build.gradle

This file was deleted.

90 changes: 90 additions & 0 deletions ApiDemos/java/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
/*
* 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 {
id("com.android.application")
id("project-report")
id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin")
}

android {
compileSdk = 34

productFlavors {
create("gms") {
dimension = "version"
applicationIdSuffix = ".gms"
versionNameSuffix = "-gms"
}
}

defaultConfig {
applicationId = "com.example.mapdemo"
minSdk = 21
targetSdk = 34
versionCode = 1
versionName = "1.0"
multiDexEnabled = true
}

buildFeatures {
compose = true
buildConfig = true
}

buildTypes {
getByName("release") {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
}
}

flavorDimensions.add("version")

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

namespace = "com.example.mapdemo"
}

dependencies {
implementation(libs.appcompat)
implementation(libs.recyclerview)
implementation(libs.volley)
implementation(platform(libs.kotlinBom))

// GMS
implementation(libs.playServicesMaps)

// Tests
testImplementation(libs.junit)
androidTestImplementation(libs.androidxJunit)
androidTestImplementation(libs.espressoCore)
}

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"
}
27 changes: 0 additions & 27 deletions ApiDemos/java/build.gradle

This file was deleted.

43 changes: 43 additions & 0 deletions ApiDemos/java/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* 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.
*/

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:8.5.1")
classpath("com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.1")

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
mavenLocal()
google()
mavenCentral()
}
}

tasks.register<Delete>("clean") {
delete(rootProject.layout.projectDirectory)
}
20 changes: 20 additions & 0 deletions ApiDemos/java/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[versions]
appcompat = "1.7.0"
recyclerview = "1.3.2"
volley = "1.2.1"
kotlinBom = "2.0.0"
playServicesMaps = "19.0.0"
junit = "4.13.2"
androidxJunit = "1.2.1"
espresso = "3.6.1"


[libraries]
appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
recyclerview = { group = "androidx.recyclerview", name = "recyclerview", version.ref = "recyclerview" }
volley = { group = "com.android.volley", name = "volley", version.ref = "volley" }
kotlinBom = { group = "org.jetbrains.kotlin", name = "kotlin-bom", version.ref = "kotlinBom" }
playServicesMaps = { group = "com.google.android.gms", name = "play-services-maps", version.ref = "playServicesMaps" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
androidxJunit = { group = "androidx.test.ext", name = "junit", version.ref = "androidxJunit" }
espressoCore = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espresso" }
1 change: 0 additions & 1 deletion ApiDemos/java/settings.gradle

This file was deleted.

17 changes: 17 additions & 0 deletions ApiDemos/java/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* 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.
*/

include(":app")
2 changes: 1 addition & 1 deletion ApiDemos/kotlin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ If prompted for a gradle configuration accept the default settings.

Alternatively use the `gradlew build` command to build the project directly.

This demo app requires that you add your own Google Maps API key. See [Get an API Key](../../docs/GET_AN_API_KEY.md) for more instructions.
This demo app requires that you add your own Google Maps API key. See [Get an API key](https://developers.google.com/maps/documentation/android-sdk/get-api-key) for more instructions.

Support
-------
Expand Down
83 changes: 0 additions & 83 deletions ApiDemos/kotlin/app/build.gradle

This file was deleted.

Loading
Loading