Skip to content

Commit

Permalink
feat: tooling modernization
Browse files Browse the repository at this point in the history
  • Loading branch information
kikoso committed Aug 14, 2024
1 parent 6ef2569 commit cfcf96f
Show file tree
Hide file tree
Showing 86 changed files with 2,253 additions and 1,302 deletions.
67 changes: 0 additions & 67 deletions ApiDemos/java/app/build.gradle

This file was deleted.

88 changes: 88 additions & 0 deletions ApiDemos/java/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/*
* 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 {
// Optionally specify a different file name containing your secrets.
// The plugin defaults to "local.properties"
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")
81 changes: 0 additions & 81 deletions ApiDemos/kotlin/app/build.gradle

This file was deleted.

Loading

0 comments on commit cfcf96f

Please sign in to comment.