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

chore: updated Kotlin to 2.0.0 and migration Catalogue #256

Merged
merged 4 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
chore: updated Kotlin to 2.0.0 and migration Catalogue
  • Loading branch information
kikoso committed May 27, 2024
commit fb39c73ff18d4c81c291de05fc56b38138fe3cbd
28 changes: 14 additions & 14 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2023 Google Inc.
* Copyright 2024 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -23,12 +23,12 @@ plugins {
}

android {
compileSdk 34
compileSdk libs.versions.androidCompileSdk.get().toInteger()

defaultConfig {
applicationId "com.google.maps.android.ktx.demo"
minSdk 21
targetSdk 34
minSdk libs.versions.androidMinSdk.get().toInteger()
targetSdk libs.versions.androidTargetSdk.get().toInteger()
versionCode 1
versionName "1.0"
multiDexEnabled true
Expand Down Expand Up @@ -58,18 +58,18 @@ android {
}

dependencies {
implementation "androidx.appcompat:appcompat:1.6.1"
implementation "androidx.core:core-ktx:1.12.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.9.24"
implementation 'androidx.multidex:multidex:2.0.1'
implementation "com.google.android.gms:play-services-maps:18.2.0"
implementation "androidx.fragment:fragment-ktx:1.6.2"
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.7.0'
implementation 'com.google.android.material:material:1.11.0'
implementation 'com.android.volley:volley:1.2.1'
implementation libs.appcompat
implementation libs.core.ktx
implementation libs.kotlin.stdlib
implementation libs.multidex
implementation libs.play.services.maps
implementation libs.fragment.ktx
implementation libs.lifecycle.runtime.ktx
implementation libs.material
implementation libs.volley

// Hilt
implementation "com.google.dagger:hilt-android:2.51"
implementation libs.hilt.android
kapt "com.google.dagger:hilt-android-compiler:2.51.1"

implementation project(':places-ktx')
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2023 Google Inc.
* Copyright 2024 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -21,10 +21,10 @@ buildscript {
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:8.4.0'
classpath 'org.jetbrains.dokka:dokka-gradle-plugin:1.9.10'
classpath 'com.android.tools.build:gradle:8.4.1'
classpath 'org.jetbrains.dokka:dokka-gradle-plugin:1.9.20'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.24"
classpath "com.google.dagger:hilt-android-gradle-plugin:2.51"
classpath "com.google.dagger:hilt-android-gradle-plugin:2.51.1"
classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.1"
classpath 'com.mxalbert.gradle:jacoco-android:0.2.1'
}
Expand Down
46 changes: 46 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[versions]
androidCompileSdk = "34"
androidMinSdk = "21"
androidTargetSdk = "34"

appcompat = "1.6.1"
coreKtx = "1.13.1"
fragmentKtx = "1.7.1"
hiltAndroid = "2.51.1"
kotlin = "2.0.0"
kotlinx-coroutines-core = "1.8.1"
lifecycle-viewmodel-ktx = "2.8.0"
material = "1.12.0"
playServicesMaps = "18.2.0"
truth = "1.4.2"
volley = "1.2.1"
multidex = "2.0.1"
kotlinx-coroutines-play-services = "1.8.1"
places = "3.4.0"
junit-ext = "1.1.5"
test-core = "1.5.0"
mockito-kotlin = "2.2.0"
junit = "4.13.2"
mockito-core = "5.9.0"

[libraries]
appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" }
fragment-ktx = { module = "androidx.fragment:fragment-ktx", version.ref = "fragmentKtx" }
hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "hiltAndroid" }
kotlin-stdlib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "kotlin" }
kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "kotlinx-coroutines-core" }
lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycle-viewmodel-ktx" }
lifecycle-viewmodel-ktx = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "lifecycle-viewmodel-ktx" }
material = { module = "com.google.android.material:material", version.ref = "material" }
play-services-maps = { module = "com.google.android.gms:play-services-maps", version.ref = "playServicesMaps" }
truth = { module = "com.google.truth:truth", version.ref = "truth" }
volley = { group = "com.android.volley", name = "volley", version.ref = "volley" }
multidex = { group = "androidx.multidex", name = "multidex", version.ref = "multidex" }
kotlinx-coroutines-play-services = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-play-services", version.ref = "kotlinx-coroutines-play-services" }
places = { group = "com.google.android.libraries.places", name = "places", version.ref = "places" }
junit-ext = { group = "androidx.test.ext", name = "junit", version.ref = "junit-ext" }
test-core = { group = "androidx.test", name = "core", version.ref = "test-core" }
mockito-kotlin = { group = "com.nhaarman.mockitokotlin2", name = "mockito-kotlin", version.ref = "mockito-kotlin" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
mockito-core = { group = "org.mockito", name = "mockito-core", version.ref = "mockito-core" }
41 changes: 17 additions & 24 deletions places-ktx/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020 Google Inc.
* Copyright 2024 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,11 +19,11 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
compileSdk 34
compileSdk libs.versions.androidCompileSdk.get().toInteger()

defaultConfig {
minSdk 21
targetSdk 34
minSdk libs.versions.androidMinSdk.get().toInteger()
targetSdk libs.versions.androidTargetSdk.get().toInteger()
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
multiDexEnabled true
Expand All @@ -42,30 +42,23 @@ android {
testOptions {
unitTests.returnDefaultValues = true
}

buildTypes {
debug {
testCoverageEnabled = true
}
}

namespace "com.google.android.libraries.places.ktx"
}

dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.9.24'
implementation('org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1')
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.0"
implementation "com.android.volley:volley:1.2.1"
implementation 'androidx.multidex:multidex:2.0.1'
api "org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.8.1"
api 'com.google.android.libraries.places:places:3.4.0'
implementation libs.kotlin.stdlib
implementation libs.kotlinx.coroutines.core
implementation libs.lifecycle.viewmodel.ktx
implementation libs.volley
implementation libs.multidex
api libs.kotlinx.coroutines.play.services
api libs.places

// Tests
testImplementation "androidx.test.ext:junit:1.1.5"
testImplementation "androidx.test:core:1.5.0"
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0"
testImplementation "junit:junit:4.13.2"
testImplementation "org.mockito:mockito-core:5.11.0"
testImplementation "com.google.truth:truth:1.4.2"
testImplementation libs.junit.ext
testImplementation libs.test.core
testImplementation libs.mockito.kotlin
testImplementation libs.junit
testImplementation libs.mockito.core
testImplementation libs.truth
}
Loading