File tree 6 files changed +26
-10
lines changed
better-gradle-properties/src/main/kotlin/foundry/gradle/properties
foundry-gradle-plugin/src/main/kotlin/foundry/gradle
6 files changed +26
-10
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,15 @@ Changelog
4
4
** Unreleased**
5
5
--------------
6
6
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
+
7
16
0.24.1
8
17
------
9
18
Original file line number Diff line number Diff line change @@ -52,4 +52,4 @@ POM_DEVELOPER_ID=slackhq
52
52
POM_DEVELOPER_NAME =Slack Technologies, Inc.
53
53
POM_DEVELOPER_URL =https://github.com/slackhq
54
54
POM_INCEPTION_YEAR =2022
55
- VERSION_NAME =1.0.0-SNAPSHOT
55
+ VERSION_NAME =0.24.2
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ jvmTarget = "17"
24
24
jewel = " 0.27.0"
25
25
jna = " 5.16.0"
26
26
kaml = " 0.67.0"
27
- kotlin = " 2.1.0 "
27
+ kotlin = " 2.1.10 "
28
28
kotlinx-serialization = " 1.8.0"
29
29
ksp = " 2.1.10-1.0.29"
30
30
kotlinPoet = " 2.0.0"
Original file line number Diff line number Diff line change @@ -137,7 +137,9 @@ public class PropertyResolver(
137
137
blankBehavior : BlankBehavior = BlankBehavior .ERROR ,
138
138
): Provider <String > {
139
139
return providerFor(key)
140
- .let { defaultValue?.let { providers.provider { defaultValue } } ? : it }
140
+ .let { provider ->
141
+ defaultValue?.let { provider.orElse(providers.provider { defaultValue }) } ? : provider
142
+ }
141
143
.filter {
142
144
when (blankBehavior) {
143
145
BlankBehavior .FILTER -> {
Original file line number Diff line number Diff line change @@ -153,6 +153,7 @@ internal abstract class BasicAptOptionsConfig : AptOptionsConfig {
153
153
configure<KaptExtension > {
154
154
arguments {
155
155
baseConfig.globalOptions(foundryProperties).forEach { (key, value) ->
156
+ logger.lifecycle(" Adding kapt args to $path : $key =$value " )
156
157
arg(key, value)
157
158
}
158
159
}
@@ -193,8 +194,8 @@ internal object AptOptionsConfigs {
193
194
object Dagger : BasicAptOptionsConfig() {
194
195
override val targetDependency: String = " dagger-compiler"
195
196
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 )
198
199
199
200
private val DEFAULT_ARGS =
200
201
mapOf (
@@ -214,7 +215,7 @@ internal object AptOptionsConfigs {
214
215
object Moshi : BasicAptOptionsConfig() {
215
216
override val targetDependency: String = " moshi-kotlin-codegen"
216
217
217
- override fun globalOptions (foundryProperties : FoundryProperties ): Map <String , String > =
218
+ override fun globalOptions (properties : FoundryProperties ): Map <String , String > =
218
219
mapOf (" moshi.generated" to " javax.annotation.Generated" )
219
220
}
220
221
}
Original file line number Diff line number Diff line change @@ -735,10 +735,14 @@ internal constructor(
735
735
*/
736
736
public val daggerOptions: Provider <Map <String , String >>
737
737
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
+ }
742
746
743
747
/* * Overrides the kotlin language version if present. */
744
748
public val kaptLanguageVersion: Provider <KotlinVersion >
You can’t perform that action at this time.
0 commit comments