Skip to content

Commit

Permalink
Reduce minSdk version and increase targetSdk version
Browse files Browse the repository at this point in the history
minSdk can drop to 29 because it turns out that the splash screen
is supported on that release too, just not as well.
AndroidStudio has been complaining about the targetSdk not being the
latest, so bump that up at the same time. In doing so move the
dependencies to using libs.versions.toml which is the current way to
handle package versions.
  • Loading branch information
davecraig committed Aug 20, 2024
1 parent c8fcbf3 commit 8754d41
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 44 deletions.
88 changes: 44 additions & 44 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ android {

defaultConfig {
applicationId = "org.scottishtecharmy.soundscape"
minSdk = 31
targetSdk = 34
minSdk = 30
targetSdk = 35
versionCode = 35
versionName = "0.0.34"

Expand Down Expand Up @@ -95,85 +95,85 @@ dependencies {
implementation(libs.androidx.activity.compose)


implementation(platform("androidx.compose:compose-bom:2024.06.00"))
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.compose.material3:material3")
implementation("androidx.compose.material:material-icons-extended")
implementation("com.google.android.gms:play-services-location:21.2.0")
implementation(platform(libs.androidx.compose.bom))
implementation(libs.ui)
implementation(libs.ui.graphics)
implementation(libs.ui.tooling.preview)
implementation(libs.material3)
implementation(libs.androidx.material.icons.extended)
implementation(libs.play.services.location)

implementation(libs.androidx.lifecycle.service)
implementation(libs.androidx.appcompat)
implementation("androidx.core:core-splashscreen:1.0.1")
implementation(libs.androidx.core.splashscreen)
implementation(libs.core.ktx)
implementation(libs.androidx.benchmark.common)
implementation(libs.androidx.lifecycle.runtime.compose.android)


testImplementation("junit:junit:4.13.2")
testImplementation("androidx.arch.core:core-testing:2.2.0")
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.0")
testImplementation ("org.jetbrains.kotlin:kotlin-test-junit:1.9.10")
testImplementation("org.junit.jupiter:junit-jupiter:5.8.1")
testImplementation(libs.junit)
testImplementation(libs.androidx.core.testing)
testImplementation(libs.kotlinx.coroutines.test)
testImplementation (libs.kotlin.test.junit)
testImplementation(libs.junit.jupiter)

androidTestImplementation("androidx.test.ext:junit:1.2.1")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
androidTestImplementation(platform("androidx.compose:compose-bom:2023.08.00"))
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
debugImplementation("androidx.compose.ui:ui-tooling")
debugImplementation("androidx.compose.ui:ui-test-manifest")
androidTestImplementation(libs.androidx.junit.v121)
androidTestImplementation(libs.androidx.espresso.core.v351)
androidTestImplementation(platform(libs.androidx.compose.bom.v20230800))
androidTestImplementation(libs.ui.test.junit4)
debugImplementation(libs.ui.tooling)
debugImplementation(libs.ui.test.manifest)

// Viewmodel
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.8.2")
implementation(libs.androidx.lifecycle.viewmodel.compose)

// Retrofit
implementation("com.squareup.retrofit2:retrofit:2.9.0")
implementation("com.squareup.okhttp3:okhttp:4.11.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1")
implementation("com.squareup.okhttp3:okhttp:5.0.0-alpha.3")
implementation(libs.retrofit)
implementation(libs.okhttp)
implementation(libs.kotlinx.serialization.json)
implementation(libs.okhttp.v500alpha3)
// logging interceptor
implementation ("com.squareup.okhttp3:logging-interceptor:4.10.0")
implementation (libs.logging.interceptor)

// Retrofit with Scalar Converter
implementation("com.squareup.retrofit2:converter-scalars:2.9.0")
implementation(libs.converter.scalars)

// Location permissions
implementation("com.google.android.gms:play-services-location:21.2.0")
implementation("com.google.accompanist:accompanist-permissions:0.33.2-alpha")
implementation(libs.play.services.location.v2120)
implementation(libs.accompanist.permissions)

// GeoJSON parsing
implementation("com.squareup.moshi:moshi:1.15.1")
implementation(libs.moshi)
//kapt("com.squareup.moshi:moshi-kotlin-codegen:1.15.1")
ksp("com.squareup.moshi:moshi-kotlin-codegen:1.15.0")
ksp(libs.moshi.kotlin.codegen)

// Dependency injection
implementation("androidx.hilt:hilt-navigation-compose:1.2.0")
implementation("com.google.dagger:hilt-android:2.50")
ksp("com.google.dagger:hilt-compiler:2.50")
implementation(libs.androidx.hilt.navigation.compose)
implementation(libs.hilt.android)
ksp(libs.hilt.compiler)


// LiveData
implementation("androidx.compose.runtime:runtime-livedata")
implementation(libs.androidx.runtime.livedata)

// Realm for Kotlin
implementation("io.realm.kotlin:library-base:1.16.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0")
implementation(libs.library.base)
implementation(libs.kotlinx.coroutines.core)

// Datastore for onboarding and settings
implementation("androidx.datastore:datastore-preferences:1.0.0")
implementation("androidx.datastore:datastore:1.0.0")
implementation(libs.androidx.datastore.preferences)
implementation(libs.androidx.datastore)

// Audio engine
implementation(files("libs/fmod.jar"))

// Firebase
implementation(platform("com.google.firebase:firebase-bom:33.1.2"))
implementation("com.google.firebase:firebase-crashlytics")
implementation("com.google.firebase:firebase-analytics")
implementation(platform(libs.firebase.bom))
implementation(libs.firebase.crashlytics)
implementation(libs.firebase.analytics)

// GPX parser
implementation ("com.github.ticofab:android-gpx-parser:2.3.1")
implementation (libs.android.gpx.parser)

// Screenshots for tests
//screenshotTestImplementation(libs.androidx.compose.ui.tooling)
Expand Down
68 changes: 68 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
[versions]
accompanistPermissions = "0.33.2-alpha"
agp = "8.3.2"
androidGpxParser = "2.3.1"
androidxJunit = "1.2.1"
composeBomVersion = "2023.08.00"
converterScalars = "2.9.0"
coreSplashscreen = "1.0.1"
coreTesting = "2.2.0"
datastorePreferences = "1.1.1"
espressoCoreVersion = "3.5.1"
firebaseBom = "33.1.2"
hiltAndroid = "2.50"
hiltCompiler = "2.50"
hiltNavigationCompose = "1.2.0"
junitJupiter = "5.8.1"
kotlin = "1.9.22"
coreKtx = "1.13.1"
junit = "4.13.2"
junitVersion = "1.2.0"
espressoCore = "3.6.0"
kotlinTestJunit = "1.9.10"
kotlinxCoroutinesCore = "1.8.0"
kotlinxCoroutinesTest = "1.8.0"
kotlinxSerializationJson = "1.6.0"
libraryBase = "1.16.0"
lifecycleRuntimeKtx = "2.8.2"
activityCompose = "1.9.0"
composeBom = "2024.06.00"
Expand All @@ -13,14 +32,42 @@ lifecycleService = "2.8.2"
lifecycleServiceVersion = "2.8.0"
appcompat = "1.7.0"
coreKtxVersion = "1.6.1"
lifecycleViewmodelCompose = "2.8.4"
loggingInterceptor = "4.10.0"
moshi = "1.15.1"
moshiKotlinCodegen = "1.15.0"
okhttp = "4.11.0"
okhttpVersion = "5.0.0-alpha.3"
playServicesLocation = "21.3.0"
playServicesLocationVersion = "21.2.0"
retrofit = "2.9.0"
screenshot = "0.0.1-alpha03"
benchmarkCommon = "1.2.4"
lifecycleRuntimeComposeAndroid = "2.8.4"

[libraries]
accompanist-permissions = { module = "com.google.accompanist:accompanist-permissions", version.ref = "accompanistPermissions" }
android-gpx-parser = { module = "com.github.ticofab:android-gpx-parser", version.ref = "androidGpxParser" }
androidx-compose-bom-v20230800 = { module = "androidx.compose:compose-bom", version.ref = "composeBomVersion" }
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
androidx-core-splashscreen = { module = "androidx.core:core-splashscreen", version.ref = "coreSplashscreen" }
androidx-core-testing = { module = "androidx.arch.core:core-testing", version.ref = "coreTesting" }
androidx-datastore = { module = "androidx.datastore:datastore", version.ref = "datastorePreferences" }
androidx-datastore-preferences = { module = "androidx.datastore:datastore-preferences", version.ref = "datastorePreferences" }
androidx-espresso-core-v351 = { module = "androidx.test.espresso:espresso-core", version.ref = "espressoCoreVersion" }
androidx-hilt-navigation-compose = { module = "androidx.hilt:hilt-navigation-compose", version.ref = "hiltNavigationCompose" }
androidx-junit-v121 = { module = "androidx.test.ext:junit", version.ref = "androidxJunit" }
androidx-lifecycle-runtime-ktx-v280 = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtxVersion" }
androidx-lifecycle-service-v280 = { module = "androidx.lifecycle:lifecycle-service", version.ref = "lifecycleServiceVersion" }
androidx-lifecycle-viewmodel-compose = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "lifecycleViewmodelCompose" }
androidx-material-icons-extended = { module = "androidx.compose.material:material-icons-extended" }
androidx-runtime-livedata = { module = "androidx.compose.runtime:runtime-livedata" }
converter-scalars = { module = "com.squareup.retrofit2:converter-scalars", version.ref = "converterScalars" }
firebase-analytics = { module = "com.google.firebase:firebase-analytics" }
firebase-bom = { module = "com.google.firebase:firebase-bom", version.ref = "firebaseBom" }
firebase-crashlytics = { module = "com.google.firebase:firebase-crashlytics" }
hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "hiltAndroid" }
hilt-compiler = { module = "com.google.dagger:hilt-compiler", version.ref = "hiltCompiler" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
Expand All @@ -39,6 +86,27 @@ androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version
core-ktx = { group = "androidx.test", name = "core-ktx", version.ref = "coreKtxVersion" }
androidx-benchmark-common = { group = "androidx.benchmark", name = "benchmark-common", version.ref = "benchmarkCommon" }
androidx-lifecycle-runtime-compose-android = { group = "androidx.lifecycle", name = "lifecycle-runtime-compose-android", version.ref = "lifecycleRuntimeComposeAndroid" }
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junitJupiter" }
kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlinTestJunit" }
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinxCoroutinesCore" }
kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinxCoroutinesTest" }
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" }
library-base = { module = "io.realm.kotlin:library-base", version.ref = "libraryBase" }
logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "loggingInterceptor" }
material3 = { module = "androidx.compose.material3:material3" }
moshi = { module = "com.squareup.moshi:moshi", version.ref = "moshi" }
moshi-kotlin-codegen = { module = "com.squareup.moshi:moshi-kotlin-codegen", version.ref = "moshiKotlinCodegen" }
okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" }
okhttp-v500alpha3 = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttpVersion" }
play-services-location = { module = "com.google.android.gms:play-services-location", version.ref = "playServicesLocation" }
play-services-location-v2120 = { module = "com.google.android.gms:play-services-location", version.ref = "playServicesLocationVersion" }
retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" }
ui = { module = "androidx.compose.ui:ui" }
ui-graphics = { module = "androidx.compose.ui:ui-graphics" }
ui-tooling = { module = "androidx.compose.ui:ui-tooling" }
ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4" }
ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest" }
ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" }

[plugins]
androidApplication = { id = "com.android.application", version.ref = "agp" }
Expand Down

0 comments on commit 8754d41

Please sign in to comment.