Skip to content

Commit 0dfe624

Browse files
committed
Prepare for release 0.24.2.
1 parent 8b7603d commit 0dfe624

File tree

6 files changed

+26
-10
lines changed

6 files changed

+26
-10
lines changed

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ Changelog
44
**Unreleased**
55
--------------
66

7+
0.24.2
8+
------
9+
10+
_2025-01-30_
11+
12+
- Fix loading of optional properties with defined default values.
13+
- Update to Kotlin `2.1.10`.
14+
- Build against KSP `2.1.10-1.0.29`.
15+
716
0.24.1
817
------
918

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ POM_DEVELOPER_ID=slackhq
5252
POM_DEVELOPER_NAME=Slack Technologies, Inc.
5353
POM_DEVELOPER_URL=https://github.com/slackhq
5454
POM_INCEPTION_YEAR=2022
55-
VERSION_NAME=1.0.0-SNAPSHOT
55+
VERSION_NAME=0.24.2

gradle/libs.versions.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jvmTarget = "17"
2424
jewel = "0.27.0"
2525
jna = "5.16.0"
2626
kaml = "0.67.0"
27-
kotlin = "2.1.0"
27+
kotlin = "2.1.10"
2828
kotlinx-serialization = "1.8.0"
2929
ksp = "2.1.10-1.0.29"
3030
kotlinPoet = "2.0.0"

platforms/gradle/better-gradle-properties/src/main/kotlin/foundry/gradle/properties/PropertyResolver.kt

+3-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ public class PropertyResolver(
137137
blankBehavior: BlankBehavior = BlankBehavior.ERROR,
138138
): Provider<String> {
139139
return providerFor(key)
140-
.let { defaultValue?.let { providers.provider { defaultValue } } ?: it }
140+
.let { provider ->
141+
defaultValue?.let { provider.orElse(providers.provider { defaultValue }) } ?: provider
142+
}
141143
.filter {
142144
when (blankBehavior) {
143145
BlankBehavior.FILTER -> {

platforms/gradle/foundry-gradle-plugin/src/main/kotlin/foundry/gradle/AnnotationProcessing.kt

+4-3
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ internal abstract class BasicAptOptionsConfig : AptOptionsConfig {
153153
configure<KaptExtension> {
154154
arguments {
155155
baseConfig.globalOptions(foundryProperties).forEach { (key, value) ->
156+
logger.lifecycle("Adding kapt args to $path: $key=$value")
156157
arg(key, value)
157158
}
158159
}
@@ -193,8 +194,8 @@ internal object AptOptionsConfigs {
193194
object Dagger : BasicAptOptionsConfig() {
194195
override val targetDependency: String = "dagger-compiler"
195196

196-
override fun globalOptions(foundryProperties: FoundryProperties): Map<String, String> =
197-
foundryProperties.daggerOptions.getOrElse(DEFAULT_ARGS)
197+
override fun globalOptions(properties: FoundryProperties): Map<String, String> =
198+
properties.daggerOptions.getOrElse(DEFAULT_ARGS)
198199

199200
private val DEFAULT_ARGS =
200201
mapOf(
@@ -214,7 +215,7 @@ internal object AptOptionsConfigs {
214215
object Moshi : BasicAptOptionsConfig() {
215216
override val targetDependency: String = "moshi-kotlin-codegen"
216217

217-
override fun globalOptions(foundryProperties: FoundryProperties): Map<String, String> =
218+
override fun globalOptions(properties: FoundryProperties): Map<String, String> =
218219
mapOf("moshi.generated" to "javax.annotation.Generated")
219220
}
220221
}

platforms/gradle/foundry-gradle-plugin/src/main/kotlin/foundry/gradle/FoundryProperties.kt

+8-4
Original file line numberDiff line numberDiff line change
@@ -735,10 +735,14 @@ internal constructor(
735735
*/
736736
public val daggerOptions: Provider<Map<String, String>>
737737
get() =
738-
resolver.optionalStringProvider("foundry.dagger.options", defaultValue = "").map { value ->
739-
if (value.isBlank()) return@map emptyMap<String, String>()
740-
value.splitToSequence(',').associate { kv -> kv.trim().split('=').let { it[0] to it[1] } }
741-
}
738+
resolver
739+
.optionalStringProvider(
740+
key = "foundry.dagger.options",
741+
blankBehavior = PropertyResolver.BlankBehavior.FILTER,
742+
)
743+
.map { value ->
744+
value.splitToSequence(',').associate { kv -> kv.trim().split('=').let { it[0] to it[1] } }
745+
}
742746

743747
/** Overrides the kotlin language version if present. */
744748
public val kaptLanguageVersion: Provider<KotlinVersion>

0 commit comments

Comments
 (0)