-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update java demo build file to Kotlin and version catalog (#770)
* chore: update java demo build file to Kotlin and version catalog * chore: updates the project name in the settings file
- Loading branch information
Showing
9 changed files
with
135 additions
and
89 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
plugins { | ||
alias(libs.plugins.android.application) | ||
alias(libs.plugins.secrets.gradle.plugin) | ||
} | ||
|
||
android { | ||
namespace = "com.example.placesdemo" | ||
compileSdk = 35 | ||
|
||
defaultConfig { | ||
applicationId = "com.example.placesdemo" | ||
minSdk = 23 | ||
targetSdk = 35 | ||
versionCode = 1 | ||
versionName = "1.0" | ||
|
||
multiDexEnabled = true | ||
} | ||
|
||
java { | ||
toolchain { | ||
languageVersion.set(JavaLanguageVersion.of(21)) | ||
} | ||
} | ||
|
||
buildFeatures { | ||
viewBinding = true | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation(libs.constraintlayout) | ||
implementation(libs.activity) | ||
implementation(libs.fragment) | ||
implementation(libs.navigation.fragment) | ||
implementation(libs.navigation.ui) | ||
|
||
implementation(libs.appcompat) | ||
implementation(libs.material) | ||
|
||
implementation(libs.volley) | ||
implementation(libs.glide) | ||
implementation(libs.viewbinding) | ||
implementation(libs.multidex) | ||
|
||
// Places and Maps SDKs | ||
implementation(libs.places) | ||
implementation(libs.play.services.maps) | ||
implementation(libs.android.maps.utils) | ||
} | ||
|
||
// Secrets for Google Maps API Keys | ||
secrets { | ||
// To add your Google Maps Platform API key to this project: | ||
// 1. Copy local.defaults.properties to secrets.properties | ||
// 2. In the secrets.properties file, replace PLACES_API_KEY=DEFAULT_API_KEY with a key from a | ||
// project with Places API enabled | ||
// 3. In the secrets.properties file, replace MAPS_API_KEY=DEFAULT_API_KEY with a key from a | ||
// project with Maps SDK for Android enabled (can be the same project and key as in Step 2) | ||
defaultPropertiesFileName = "local.defaults.properties" | ||
|
||
// Optionally specify a different file name containing your secrets. | ||
// The plugin defaults to "local.properties" | ||
propertiesFileName = "secrets.properties" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
demo-java/app/src/main/java/com/example/placesdemo/CurrentPlaceActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Top-level build file where you can add configuration options common to all sub-projects/modules. | ||
|
||
plugins { | ||
alias(libs.plugins.android.application) apply false | ||
alias(libs.plugins.secrets.gradle.plugin) apply false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
[versions] | ||
activity = "1.9.3" | ||
androidGradlePlugin = "8.6.1" | ||
androidMapsUtils = "3.8.2" | ||
appcompat = "1.7.0" | ||
constraintlayout = "2.2.0" | ||
fragment = "1.8.5" | ||
glide = "4.16.0" | ||
mapsSecretsGradlePlugin = "2.0.1" | ||
material = "1.12.0" | ||
multidex = "2.0.1" | ||
navigationFragment = "2.8.3" | ||
places = "4.0.0" | ||
playServicesMaps = "19.0.0" | ||
viewbinding = "8.7.2" | ||
volley = "1.2.1" | ||
|
||
[libraries] | ||
activity = { module = "androidx.activity:activity", version.ref = "activity" } | ||
android-maps-utils = { module = "com.google.maps.android:android-maps-utils", version.ref = "androidMapsUtils" } | ||
appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" } | ||
constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintlayout" } | ||
fragment = { module = "androidx.fragment:fragment", version.ref = "fragment" } | ||
glide = { module = "com.github.bumptech.glide:glide", version.ref = "glide" } | ||
material = { module = "com.google.android.material:material", version.ref = "material" } | ||
multidex = { module = "androidx.multidex:multidex", version.ref = "multidex" } | ||
navigation-fragment = { module = "androidx.navigation:navigation-fragment", version.ref = "navigationFragment" } | ||
navigation-ui = { module = "androidx.navigation:navigation-ui", version.ref = "navigationFragment" } | ||
places = { module = "com.google.android.libraries.places:places", version.ref = "places" } | ||
play-services-maps = { module = "com.google.android.gms:play-services-maps", version.ref = "playServicesMaps" } | ||
viewbinding = { module = "com.android.databinding:viewbinding", version.ref = "viewbinding" } | ||
volley = { module = "com.android.volley:volley", version.ref = "volley" } | ||
|
||
[plugins] | ||
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" } | ||
secrets-gradle-plugin = { id = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin", version.ref = "mapsSecretsGradlePlugin" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,23 @@ | ||
include ':app' | ||
pluginManagement { | ||
repositories { | ||
google { | ||
content { | ||
includeGroupByRegex("com\\.android.*") | ||
includeGroupByRegex("com\\.google.*") | ||
includeGroupByRegex("androidx.*") | ||
} | ||
} | ||
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
} | ||
dependencyResolutionManagement { | ||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) | ||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
} | ||
|
||
rootProject.name = "Android Places Java Demo" | ||
include(":app") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters