diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 5a3d00e..dcfc54c 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -22,10 +22,6 @@ if (localPropertiesFile.exists()) { localPropertiesFile.inputStream().use(localProperties::load) } -fun getValue(name: String): String? = - System.getenv(name.replace('.', '_').uppercase()) - ?: localProperties.getProperty(name) - enum class VersionSuffix(val value: Int) { DEV(0), RELEASE(1), @@ -33,16 +29,25 @@ enum class VersionSuffix(val value: Int) { MAIN(3) } +interface Git { + @get:Inject val operations: ExecOperations -fun git(vararg args: String): String { - val outputStream = ByteArrayOutputStream() - exec { - commandLine("git", *args) - standardOutput = outputStream + fun exec(vararg args: String): String { + val outputStream = ByteArrayOutputStream() + operations.exec { + commandLine("git", *args) + standardOutput = outputStream + } + return outputStream.toString().trim() } - return outputStream.toString().trim() } +fun getValue(name: String): String? = + System.getenv(name.replace('.', '_').uppercase()) + ?: localProperties.getProperty(name) + +fun git(vararg args: String) = project.objects.newInstance().exec(*args) + fun getVersionNumberSuffix(): VersionSuffix { val ref = git("describe", "--tags", "--always") val branch = git("branch") diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a0084fc..21dc412 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -4,7 +4,7 @@ kotlinPlugin = "2.0.21" sentryPlugin = "4.13.0" openapiPlugin = "7.9.0" protobufPlugin = "0.9.4" -kspPlugin = "2.0.21-1.0.26" +kspPlugin = "2.0.21-1.0.27" androidxComposeBom = "2024.10.01" androidxActivity = "1.9.3" androidxComposeAnimation = "1.7.5" @@ -19,7 +19,7 @@ androidxJunit = "1.2.1" androidxWork = "2.10.0" coilCompose = "2.7.0" conscrypt = "2.5.3" -desugar = "2.1.2" +desugar = "2.1.3" hilt = "2.52" junit = "4.13.2" kotlinxCouroutines = "1.9.0" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index df97d72..94113f2 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME