Skip to content

Commit 42f3887

Browse files
authored
feat: tooling modernization (#1753)
* feat: tooling modernization * chore: headers * chore: headers * feat: tooling modernization * removed script
1 parent 8e47cfb commit 42f3887

File tree

88 files changed

+2220
-1402
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+2220
-1402
lines changed

ApiDemos/java/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ If prompted for a gradle configuration accept the default settings.
3333

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

36-
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.
36+
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.
3737

3838
Support
3939
-------

ApiDemos/java/app/build.gradle

Lines changed: 0 additions & 69 deletions
This file was deleted.

ApiDemos/java/app/build.gradle.kts

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
/*
2+
* Copyright 2024 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
plugins {
18+
id("com.android.application")
19+
id("project-report")
20+
id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin")
21+
}
22+
23+
android {
24+
compileSdk = 34
25+
26+
productFlavors {
27+
create("gms") {
28+
dimension = "version"
29+
applicationIdSuffix = ".gms"
30+
versionNameSuffix = "-gms"
31+
}
32+
}
33+
34+
defaultConfig {
35+
applicationId = "com.example.mapdemo"
36+
minSdk = 21
37+
targetSdk = 34
38+
versionCode = 1
39+
versionName = "1.0"
40+
multiDexEnabled = true
41+
}
42+
43+
buildFeatures {
44+
compose = true
45+
buildConfig = true
46+
}
47+
48+
buildTypes {
49+
getByName("release") {
50+
isMinifyEnabled = false
51+
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
52+
}
53+
}
54+
55+
flavorDimensions.add("version")
56+
57+
compileOptions {
58+
sourceCompatibility = JavaVersion.VERSION_17
59+
targetCompatibility = JavaVersion.VERSION_17
60+
}
61+
62+
namespace = "com.example.mapdemo"
63+
}
64+
65+
dependencies {
66+
implementation(libs.appcompat)
67+
implementation(libs.recyclerview)
68+
implementation(libs.volley)
69+
implementation(platform(libs.kotlinBom))
70+
71+
// GMS
72+
implementation(libs.playServicesMaps)
73+
74+
// Tests
75+
testImplementation(libs.junit)
76+
androidTestImplementation(libs.androidxJunit)
77+
androidTestImplementation(libs.espressoCore)
78+
}
79+
80+
secrets {
81+
// To add your Maps API key to this project:
82+
// 1. If the secrets.properties file does not exist, create it in the same folder as the local.properties file.
83+
// 2. Add this line, where YOUR_API_KEY is your API key:
84+
// MAPS_API_KEY=YOUR_API_KEY
85+
propertiesFileName = "secrets.properties"
86+
87+
// A properties file containing default secret values. This file can be
88+
// checked in version control.
89+
defaultPropertiesFileName = "local.defaults.properties"
90+
}

ApiDemos/java/build.gradle

Lines changed: 0 additions & 27 deletions
This file was deleted.

ApiDemos/java/build.gradle.kts

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Copyright 2024 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
// Top-level build file where you can add configuration options common to all sub-projects/modules.
18+
19+
buildscript {
20+
repositories {
21+
google()
22+
mavenCentral()
23+
}
24+
dependencies {
25+
classpath("com.android.tools.build:gradle:8.5.1")
26+
classpath("com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.1")
27+
28+
// NOTE: Do not place your application dependencies here; they belong
29+
// in the individual module build.gradle files
30+
}
31+
}
32+
33+
allprojects {
34+
repositories {
35+
mavenLocal()
36+
google()
37+
mavenCentral()
38+
}
39+
}
40+
41+
tasks.register<Delete>("clean") {
42+
delete(rootProject.layout.projectDirectory)
43+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[versions]
2+
appcompat = "1.7.0"
3+
recyclerview = "1.3.2"
4+
volley = "1.2.1"
5+
kotlinBom = "2.0.0"
6+
playServicesMaps = "19.0.0"
7+
junit = "4.13.2"
8+
androidxJunit = "1.2.1"
9+
espresso = "3.6.1"
10+
11+
12+
[libraries]
13+
appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
14+
recyclerview = { group = "androidx.recyclerview", name = "recyclerview", version.ref = "recyclerview" }
15+
volley = { group = "com.android.volley", name = "volley", version.ref = "volley" }
16+
kotlinBom = { group = "org.jetbrains.kotlin", name = "kotlin-bom", version.ref = "kotlinBom" }
17+
playServicesMaps = { group = "com.google.android.gms", name = "play-services-maps", version.ref = "playServicesMaps" }
18+
junit = { group = "junit", name = "junit", version.ref = "junit" }
19+
androidxJunit = { group = "androidx.test.ext", name = "junit", version.ref = "androidxJunit" }
20+
espressoCore = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espresso" }

ApiDemos/java/settings.gradle

Lines changed: 0 additions & 1 deletion
This file was deleted.

ApiDemos/java/settings.gradle.kts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* Copyright 2024 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
include(":app")

ApiDemos/kotlin/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ If prompted for a gradle configuration accept the default settings.
3434

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

37-
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.
37+
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.
3838

3939
Support
4040
-------

ApiDemos/kotlin/app/build.gradle

Lines changed: 0 additions & 83 deletions
This file was deleted.

0 commit comments

Comments
 (0)