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

Upgrade project to kotlin 2.0.20 #389

Merged
merged 7 commits into from
Oct 3, 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
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ Component library for Android that uses Google Maps and returns a latitude, long

### Prerequisites

minSdkVersion >= 21<br/>
Google Play Services = 18.1.0<br/>
minSdkVersion >= 23<br/>
Google Play Services = 19.0.0<br/>
AndroidX

### Download
Expand All @@ -81,14 +81,14 @@ Include the dependency in your app `build.gradle`:

```groovy
dependencies {
implementation 'com.adevinta.android:leku:11.1.4'
implementation 'com.adevinta.android:leku:12.0.0'
}
```

Alternatively, if you are using a different version of Google Play Services and AndroidX use this instead:

```groovy
implementation ('com.adevinta.android:leku:11.1.4') {
implementation ('com.adevinta.android:leku:12.0.0') {
exclude group: 'com.google.android.gms'
exclude group: 'androidx.appcompat'
}
Expand All @@ -107,7 +107,7 @@ If you find this issue:
The workaround for this is:

```groovy
// Add this to your app build.gradle file
// Add this to your app build.gradle.kts file
configurations.all {
// this is a workaround for the issue:
// https://stackoverflow.com/questions/52521302/how-to-solve-program-type-already-present-com-google-common-util-concurrent-lis
Expand Down Expand Up @@ -667,7 +667,7 @@ For bugs, questions and discussions please use the [Github Issues](https://githu
License
-------

Copyright 2016-2023 Adevinta Spain S.L.
Copyright 2016-2024 Adevinta Spain S.L.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
79 changes: 0 additions & 79 deletions app/build.gradle

This file was deleted.

84 changes: 84 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import org.jlleitschuh.gradle.ktlint.reporter.ReporterType

plugins {
id("com.android.application")
id("kotlin-android")
id("org.jlleitschuh.gradle.ktlint")
id("io.gitlab.arturbosch.detekt")
id("org.jetbrains.kotlin.plugin.compose") version "2.0.20"
}

android {
defaultConfig {
applicationId = "com.schibsted.mappicker"
minSdk = 23
compileSdk = 34
targetSdk = 34
versionCode = 1
versionName = "1.0"
vectorDrawables.useSupportLibrary = true
multiDexEnabled = true
}
buildTypes {
getByName("release") {
isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.15"
}
lint {
disable.add("ObsoleteLintCustomCheck")
}
namespace = "com.adevinta.mappicker"
}

configurations.all {
exclude(group = "com.google.guava", module = "listenablefuture")
}

detekt {
buildUponDefaultConfig = true
allRules = false
config = files("$rootDir/config/detekt/detekt-config.yml")

reports {
html.enabled = true
xml.enabled = true
txt.enabled = true
sarif.enabled = true
}
}

ktlint {
reporters {
reporter(ReporterType.PLAIN)
reporter(ReporterType.CHECKSTYLE)
}
}

dependencies {
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
implementation("androidx.multidex:multidex:2.0.1")
implementation("com.google.android.material:material:1.12.0")
implementation("com.google.android.gms:play-services-maps:19.0.0")

implementation("androidx.activity:activity-compose:1.9.2")
implementation("androidx.compose.material:material:1.7.3")
implementation("androidx.compose.animation:animation:1.7.3")
implementation("androidx.compose.ui:ui-tooling:1.7.3")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.8.6")

implementation(project(":leku"))
}
2 changes: 1 addition & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# By default, the flags in this file are appended to flags specified
# in /Users/ferranpons/Documents/Android-sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
# directive in build.gradle.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
<string name="launch_legacy_map_picker" translatable="false">LAUNCH LEGACY MAP LOCATION ACTIVITY</string>
<string name="launch_map_picker_with_pois" translatable="false">LAUNCH MAP WITH POIS</string>
<string name="launch_map_picker_with_style" translatable="false">LAUNCH MAP WITH STYLE</string>
<string name="leku_lib_version" translatable="false">version 11.1.4</string>
<string name="leku_lib_version" translatable="false">version 12.0.0</string>
</resources>
33 changes: 0 additions & 33 deletions build.gradle

This file was deleted.

32 changes: 32 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
buildscript {
val kotlinVersion = "2.0.20"
repositories {
maven {
url = uri("https://maven.google.com/")
}
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:8.7.0")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
classpath("io.github.gradle-nexus:publish-plugin:1.1.0")
classpath("io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.22.0")
}
}

plugins {
id("io.gitlab.arturbosch.detekt") version "1.18.0"
id("org.jlleitschuh.gradle.ktlint") version "10.3.0"
}

allprojects {
repositories {
google()
mavenCentral()
maven("https://jitpack.io")
}
}

apply(plugin = "io.github.gradle-nexus.publish-plugin")
apply(from = "$rootDir/scripts/publish-root.gradle")
6 changes: 3 additions & 3 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ Include the dependency in your app `build.gradle`:

```groovy
dependencies {
implementation 'com.adevinta.android:leku:11.1.4'
implementation 'com.adevinta.android:leku:12.0.0'
}
```

Alternatively, if you are using a different version of Google Play Services and AndroidX use this instead:

```groovy
implementation ('com.adevinta.android:leku:11.1.4') {
implementation ('com.adevinta.android:leku:12.0.0') {
exclude group: 'com.google.android.gms'
exclude group: 'androidx.appcompat'
}
Expand All @@ -44,7 +44,7 @@ If you find this issue:
The workaround for this is:

```groovy
// Add this to your app build.gradle file
// Add this to your app build.gradle.kts file
configurations.all {
// this is a workaround for the issue:
// https://stackoverflow.com/questions/52521302/how-to-solve-program-type-already-present-com-google-common-util-concurrent-lis
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx2048m
org.gradle.configureondemand=false
android.useAndroidX=true
libGroup=com.adevinta.android
libVersion=11.1.4
libVersion=12.0.0

android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 3 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Mon Aug 21 11:21:37 CEST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading