Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentTreguier committed Nov 13, 2024
1 parent 414f0ad commit 1177956
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
25 changes: 15 additions & 10 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,32 @@ 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),
HOTFIX(2),
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<Git>().exec(*args)

fun getVersionNumberSuffix(): VersionSuffix {
val ref = git("describe", "--tags", "--always")
val branch = git("branch")
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 1177956

Please sign in to comment.