Skip to content

Commit

Permalink
[#586] Move remaining versions to TOML and remove Versions.kt from bu…
Browse files Browse the repository at this point in the history
…ildSrc
  • Loading branch information
ryan-conway committed Jan 6, 2025
1 parent 83c2d30 commit 3913d3f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 18 deletions.
13 changes: 7 additions & 6 deletions template-compose/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ val getVersionCode: () -> Int = {
if (project.hasProperty("versionCode")) {
(project.property("versionCode") as String).toInt()
} else {
Versions.ANDROID_VERSION_CODE
libs.versions.androidVersionCode.get().toInt()
}
}

android {
namespace = "co.nimblehq.template.compose"
compileSdk = Versions.ANDROID_COMPILE_SDK
compileSdk = libs.versions.androidCompileSdk.get().toInt()

defaultConfig {
applicationId = "co.nimblehq.template.compose"
minSdk = Versions.ANDROID_MIN_SDK
targetSdk = Versions.ANDROID_TARGET_SDK
minSdk = libs.versions.androidMinSdk.get().toInt()
targetSdk = libs.versions.androidTargetSdk.get().toInt()
versionCode = getVersionCode()
versionName = Versions.ANDROID_VERSION_NAME
versionName = libs.versions.androidVersionName.get()

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down Expand Up @@ -97,8 +97,9 @@ android {
buildConfig = true
}

// TODO Remove this block in https://github.com/nimblehq/android-templates/issues/587
composeOptions {
kotlinCompilerExtensionVersion = Versions.COMPOSE_COMPILER
kotlinCompilerExtensionVersion = "1.5.3"
}

packaging {
Expand Down
10 changes: 0 additions & 10 deletions template-compose/buildSrc/src/main/java/Versions.kt

This file was deleted.

4 changes: 2 additions & 2 deletions template-compose/data/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ plugins {

android {
namespace = "co.nimblehq.template.compose.data"
compileSdk = Versions.ANDROID_COMPILE_SDK
compileSdk = libs.versions.androidCompileSdk.get().toInt()

defaultConfig {
minSdk = Versions.ANDROID_MIN_SDK
minSdk = libs.versions.androidMinSdk.get().toInt()

consumerProguardFiles("consumer-rules.pro")
}
Expand Down
6 changes: 6 additions & 0 deletions template-compose/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
[versions]
androidCompileSdk = "35"
androidMinSdk = "24"
androidTargetSdk = "35"
androidVersionCode = "1"
androidVersionName = "0.37.0"

accompanist = "0.30.1"
chucker = "3.5.2"
composeBom = "2023.09.02"
Expand Down

0 comments on commit 3913d3f

Please sign in to comment.