Skip to content

Commit

Permalink
Merge pull request #111 from Abrynos/renovate/major-kotlin-monorepo
Browse files Browse the repository at this point in the history
Update plugin org.jetbrains.kotlin.android to v2
  • Loading branch information
Abrynos committed Jul 7, 2024
2 parents 87c07b6 + 3c07f56 commit d1cbf4a
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 33 deletions.
52 changes: 22 additions & 30 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import com.android.sdklib.AndroidVersion.VersionCodes

/*
* _____ _ _ _ _ _
* / ___| | (_) | | (_) | |
Expand Down Expand Up @@ -25,9 +27,10 @@
*/

plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("com.google.devtools.ksp")
alias(libs.plugins.android.application)
alias(libs.plugins.jetbrains.kotlin.android)
alias(libs.plugins.ksp)
alias(libs.plugins.compose)
}

kotlin {
Expand All @@ -36,17 +39,15 @@ kotlin {

android {
namespace = "pl.edu.pjwstk.s999844.shoppinglist"
compileSdk = 34
compileSdk = VersionCodes.UPSIDE_DOWN_CAKE

defaultConfig {
applicationId = "pl.edu.pjwstk.s999844.shoppinglist"
minSdk = 25
targetSdk = 34
minSdk = VersionCodes.N_MR1
targetSdk = VersionCodes.UPSIDE_DOWN_CAKE
versionCode = 17
versionName = "v1.15.0"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

vectorDrawables {
useSupportLibrary = true
}
Expand Down Expand Up @@ -74,15 +75,12 @@ android {
}
dataBinding.enable = true
viewBinding.enable = true
composeOptions {
kotlinCompilerExtensionVersion = "1.5.14"
}
lint {
abortOnError = true
warningsAsErrors = true
checkAllWarnings = true
showAll = true
// sometimes we use the same string for similuar but non-equal purposes
// sometimes we use the same string for similar but non-equal purposes
disable.add("DuplicateStrings")
// This is an open source project and we don't have a person of each language sitting around translating stuff for us
disable.add("MissingTranslation")
Expand All @@ -96,29 +94,23 @@ android {
disable.add("UnusedIds")
// I'm not a french person so I have no idea what is correct here - let the translators take care of this
disable.add("TypographyQuotes")
// SDK 35 is not stable yet - August 2024
disable.add("OldTargetApi")
}
}

dependencies {
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.2")

val androidxNavigationVersion = "2.7.7"
implementation("androidx.navigation:navigation-fragment-ktx:$androidxNavigationVersion")
implementation("androidx.navigation:navigation-ui-ktx:$androidxNavigationVersion")
implementation(libs.androidx.lifecycle.runtime)

val roomVersion = "2.6.1"
implementation("androidx.room:room-runtime:$roomVersion")
annotationProcessor("androidx.room:room-compiler:$roomVersion")
ksp("androidx.room:room-compiler:$roomVersion")
implementation(libs.androidx.navigation.fragment)
implementation(libs.androidx.navigation.ui)

implementation("androidx.core:core-ktx:1.13.1")
implementation("androidx.appcompat:appcompat:1.7.0")
implementation("androidx.compose.material3:material3:1.2.1")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation(libs.room.runtime)
annotationProcessor(libs.room.compiler)
ksp(libs.room.compiler)

testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.2.1")
androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")
androidTestImplementation(platform("androidx.compose:compose-bom:2024.06.00"))
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
implementation(libs.androidx.core)
implementation(libs.androidx.appcompat)
implementation(libs.androidx.material3)
implementation(libs.androidx.constraintlayout)
}
7 changes: 4 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@

// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.android.application") version "8.5.0" apply false
id("org.jetbrains.kotlin.android") version "1.9.24" apply false
id("com.google.devtools.ksp") version "1.9.24-1.0.20" apply false
alias(libs.plugins.android.application) apply false
alias(libs.plugins.jetbrains.kotlin.android) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.compose) apply false
}
repositories {
google()
Expand Down
32 changes: 32 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[versions]
android = "8.5.0"
devtools = "2.0.0-1.0.22"
kotlin = "2.0.0"

lifecycleRuntime = "2.8.2"
androidxNavigation = "2.7.7"
roomVersion = "2.6.1"
appcompat = "1.7.0"
constraintlayout = "2.1.4"
androidxcore = "1.13.1"
material3 = "1.2.1"

[plugins]
android-application = { id = "com.android.application", version.ref = "android" }
ksp = { id = "com.google.devtools.ksp", version.ref = "devtools" }
jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }

[libraries]
androidx-lifecycle-runtime = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycleRuntime" }

androidx-navigation-fragment = { module = "androidx.navigation:navigation-fragment-ktx", version.ref = "androidxNavigation" }
androidx-navigation-ui = { module = "androidx.navigation:navigation-ui-ktx", version.ref = "androidxNavigation" }

room-runtime = { module = "androidx.room:room-runtime", version.ref = "roomVersion" }
room-compiler = { module = "androidx.room:room-compiler", version.ref = "roomVersion" }

androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintlayout" }
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
androidx-core = { module = "androidx.core:core-ktx", version.ref = "androidxcore" }
androidx-material3 = { module = "androidx.compose.material3:material3", version.ref = "material3" }

0 comments on commit d1cbf4a

Please sign in to comment.