Skip to content

Commit a8433ef

Browse files
committed
chore: Centralize and update application version
This commit updates the application version from 1.0.0 to 1.1.0 and centralizes version management by reading the version number from a new `version.properties` file at the root of the project. ### Key Changes: * **`version.properties`:** * A new `version.properties` file has been created to store the application version (`PACKAGE_VERSION=1.1.0`). * **`composeApp/build.gradle.kts`:** * The Gradle script now reads the `packageVersion` from `version.properties`, ensuring a single source of truth for the version number. * A check is included to throw a `GradleException` if the `version.properties` file is not found. * **`AppLinks.kt`:** * The hardcoded `VERSION` constant has been updated to `1.1.0` to match the new version.
1 parent a4236fa commit a8433ef

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

composeApp/build.gradle.kts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
2+
import java.util.Properties
23

34
plugins {
45
alias(libs.plugins.kotlinMultiplatform)
@@ -99,7 +100,7 @@ compose {
99100
TargetFormat.Deb // Linux
100101
)
101102
packageName = "DevAnalyzer"
102-
packageVersion = "1.0.0"
103+
packageVersion = customPackageVersion
103104
includeAllModules = true
104105
description = "Deep insights into your development environment."
105106
vendor = "Meet"
@@ -132,4 +133,13 @@ compose {
132133
}
133134
}
134135
}
135-
}
136+
}
137+
138+
val versionProps = Properties()
139+
val versionPropertiesFile = rootProject.file("version.properties")
140+
if (versionPropertiesFile.exists()) {
141+
versionPropertiesFile.inputStream().use { versionProps.load(it) }
142+
} else {
143+
throw GradleException("Root project version.properties not found! Please ensure it exists with the version number.")
144+
}
145+
val customPackageVersion: String = versionProps.getProperty("PACKAGE_VERSION")

composeApp/src/jvmMain/kotlin/com/meet/dev/analyzer/core/utility/AppLinks.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import androidx.compose.material.icons.filled.Work
1111
import androidx.compose.ui.graphics.vector.ImageVector
1212

1313
object AppLinks {
14-
const val VERSION = "1.0.0"
14+
const val VERSION = "1.1.0"
1515
const val WEBSITE = "https://coding-meet.github.io/DevAnalyzer/"
1616
const val GITHUB_PROJECT =
1717
"https://www.github.com/Coding-Meet/DevAnalyzer"

version.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PACKAGE_VERSION=1.1.0

0 commit comments

Comments
 (0)