From be403142ee34d569004aaad5df7c6ab56413bdec Mon Sep 17 00:00:00 2001 From: tuuhin Date: Mon, 18 May 2026 23:33:27 +0530 Subject: [PATCH 1/4] Updated project dependencies and build configuration - Upgraded Gradle to 9.5.0, AGP to 9.2.0, and Kotlin to 2.3.21. - Updated external libraries and included min , target and compile sdk into `libs.version.toml` - Removed project-specific res declarations from build.gradle.kts and used a debug string file --- .idea/codeStyles/Project.xml | 117 +++++++++++++++++++++++ .idea/codeStyles/codeStyleConfig.xml | 5 + .idea/icon.svg | 4 + app/build.gradle.kts | 8 +- app/src/debug/res/values/strings.xml | 4 + gradle.properties | 39 +++----- gradle/libs.versions.toml | 32 +++---- gradle/wrapper/gradle-wrapper.properties | 2 +- stability_config.conf | 2 +- 9 files changed, 164 insertions(+), 49 deletions(-) create mode 100644 .idea/codeStyles/Project.xml create mode 100644 .idea/codeStyles/codeStyleConfig.xml create mode 100644 .idea/icon.svg create mode 100644 app/src/debug/res/values/strings.xml diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..4bec4ea --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,117 @@ + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..a55e7a1 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/icon.svg b/.idea/icon.svg new file mode 100644 index 0000000..7693e10 --- /dev/null +++ b/.idea/icon.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 182c22f..f3f852c 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -12,12 +12,12 @@ plugins { android { namespace = "com.eva.bluetoothterminalapp" - compileSdk = 36 + compileSdk = libs.versions.android.compilesdk.get().toInt() defaultConfig { applicationId = "com.eva.bluetoothterminalapp" - minSdk = 29 - targetSdk = 36 + minSdk = libs.versions.android.minsdk.get().toInt() + targetSdk = libs.versions.android.targetsdk.get().toInt() versionCode = 5 versionName = "1.2.1" @@ -56,7 +56,6 @@ android { buildTypes { debug { - resValue("string", "app_name", "BluetoothTerminalApp (Debug)") applicationIdSuffix = ".debug" isMinifyEnabled = false isShrinkResources = false @@ -114,7 +113,6 @@ dependencies { //lifecycle compose runtime implementation(libs.androidx.lifecycle.runtime.compose) //navigation - implementation(libs.compose.destination.animation) implementation(libs.compose.destination.core) ksp(libs.compose.destination.ksp) //kotlinx diff --git a/app/src/debug/res/values/strings.xml b/app/src/debug/res/values/strings.xml new file mode 100644 index 0000000..6a4df40 --- /dev/null +++ b/app/src/debug/res/values/strings.xml @@ -0,0 +1,4 @@ + + + BluetoothTerminalApp (Debug) + \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 8a0bbe1..355cc52 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,34 +1,21 @@ -# Project-wide Gradle settings. -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. -# For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. -org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. For more details, visit -# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects -# org.gradle.parallel=true -# AndroidX package structure to make it clearer which packages are bundled with the -# Android operating system, and which are packaged with your app's APK -# https://developer.android.com/topic/libraries/support-library/androidx-rn -android.useAndroidX=true -# Kotlin code style for this project: "official" or "obsolete": +#Kotlin kotlin.code.style=official -# Enables namespacing of each library's R class so that its R class includes only the -# resources declared in the library itself and none from the library's dependencies, -# thereby reducing the size of the R class for that library +kotlin.daemon.jvmargs=-Xmx3072M +#Gradle +org.gradle.jvmargs=-Xmx3072M -Dfile.encoding=UTF-8 +org.gradle.configuration-cache=true +org.gradle.caching=true +#Android android.nonTransitiveRClass=true -android.defaults.buildfeatures.resvalues=true -android.usesSdkInManifest.disallowed=true +android.useAndroidX=true +android.defaults.buildfeatures.resvalues=false android.sdk.defaultTargetSdkToCompileSdkIfUnset=true android.enableAppCompileTimeRClass=true +android.usesSdkInManifest.disallowed=true android.uniquePackageNames=false android.dependency.useConstraints=true -android.r8.strictFullModeForKeepRules=true +android.r8.strictFullModeForKeepRules=false android.r8.optimizedResourceShrinking=true -android.generateSyncIssueWhenLibraryConstraintsAreEnabled=false android.builtInKotlin=true -android.newDsl=false \ No newline at end of file +android.dependency.excludeLibraryComponentsFromConstraints=true +android.newDsl=true \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 89149e3..5bbe301 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,28 +1,29 @@ [versions] -agp = "9.0.0" -compose_destination_animation_version = "1.11.9" +agp = "9.2.0" +android-minsdk = "29" +android-compilesdk = "37" +android-targetsdk = "37" compose_destination_core_version = "2.3.0" coreSplashscreen = "1.2.0" -datastore = "1.2.0" +datastore = "1.2.1" graphicsShapes = "1.1.0" -kotlin = "2.3.10" -coreKtx = "1.17.0" +kotlin = "2.3.21" +coreKtx = "1.18.0" junit = "4.13.2" junitVersion = "1.3.0" espressoCore = "3.7.0" kotlinxCollectionsImmutable = "0.4.0" -kotlinxDatetime = "0.7.1" -kotlinxSerializationJson = "1.10.0" +kotlinxDatetime = "0.8.0" +kotlinxSerializationJson = "1.11.0" lifecycleRuntimeKtx = "2.10.0" -activityCompose = "1.12.3" -composeBom = "2026.01.01" -koinBom = "4.1.1" +activityCompose = "1.13.0" +composeBom = "2026.05.00" +koinBom = "4.2.1" materialIconsExtended = "1.7.8" -ksp_version = "2.3.4" -protobufJavalite = "4.33.5" +ksp_version = "2.3.8" +protobufJavalite = "4.34.1" protobuf-protoc-gen-javalite = "3.0.0" -protobuf_plugin_version = "0.9.6" -runtime = "1.10.2" +protobuf_plugin_version = "0.10.0" [libraries] #core @@ -48,7 +49,6 @@ androidx-material-icons-extended = { module = "androidx.compose.material:materia #kotlinx immutable kotlinx-collections-immutable = { module = "org.jetbrains.kotlinx:kotlinx-collections-immutable", version.ref = "kotlinxCollectionsImmutable" } #navigation -compose_destination_animation = { module = "io.github.raamcosta.compose-destinations:animations-core", version.ref = "compose_destination_animation_version" } compose_destination_core = { module = "io.github.raamcosta.compose-destinations:core", version.ref = "compose_destination_core_version" } compose_destination_ksp = { module = "io.github.raamcosta.compose-destinations:ksp", version.ref = "compose_destination_core_version" } #koin @@ -74,11 +74,11 @@ kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serializa [plugins] android-application = { id = "com.android.application", version.ref = "agp" } -jetbrainsKotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } google_devtools_ksp = { id = "com.google.devtools.ksp", version.ref = "ksp_version" } google_protobuf = { id = "com.google.protobuf", version.ref = "protobuf_plugin_version" } kotlinx_serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } +kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize:org.jetbrains.kotlin.plugin.parcelize.gradle.plugin", version.ref = "kotlin" } [bundles] compose = ["androidx-ui", "androidx-ui-graphics", "androidx-ui-tooling-preview", "androidx-material3", "androidx-material-icons-extended"] diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index bd2a56a..0d07337 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Sun Mar 31 20:03:44 IST 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.0-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/stability_config.conf b/stability_config.conf index ce8c396..a5a0130 100644 --- a/stability_config.conf +++ b/stability_config.conf @@ -1,6 +1,6 @@ // consider UUID to be stable java.util.UUID // instants should be stable -kotlinx.datetime.Instant +kotlin.time.Instant // specific ble model classes should be stable com.eva.bluetoothterminalapp.domain.bluetooth_le.models.* \ No newline at end of file From 56fc8a4cf90f2a3ced97578478810bcbdaaee632 Mon Sep 17 00:00:00 2001 From: tuuhin Date: Wed, 20 May 2026 21:42:55 +0530 Subject: [PATCH 2/4] Migrated navigation arguments from parcelable to serializable Updated `BluetoothClientConnectArgs` and `BluetoothDeviceArgs` to use `@Serializable` instead of `@Parcelize` and removed `Parcelable` implementation. . Added `/.junie` to `.gitignore`, and some .idea files are updated/added --- .gitignore | 1 + .idea/codeStyles/Project.xml | 34 +++++++++++++++++++ .idea/markdown.xml | 8 +++++ .../bt_client/BTClientViewModel.kt | 6 +++- .../args/BluetoothClientConnectArgs.kt | 11 +++--- .../navigation/args/BluetoothDeviceArgs.kt | 7 ++-- .../bt_classic/BTDeviceProfileScreen.kt | 6 +++- 7 files changed, 61 insertions(+), 12 deletions(-) create mode 100644 .idea/markdown.xml diff --git a/.gitignore b/.gitignore index 073bf60..01f5381 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ .cxx local.properties keystore.properties +/.junie \ No newline at end of file diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index 4bec4ea..472d5ea 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -1,5 +1,39 @@ + + +