Skip to content

Commit d3b0e6e

Browse files
committed
fix: adjust SpdxLicense generator after bump of kotlin-poet
1 parent 860a0f7 commit d3b0e6e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

buildSrc/subprojects/license-texts/src/main/kotlin/com/github/vlsi/gradle/license/EnumGeneratorTask.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,18 +161,21 @@ open class EnumGeneratorTask @Inject constructor(objectFactory: ObjectFactory) :
161161
)
162162
.addFunction(
163163
FunSpec.builder("fromId")
164+
.returns(className)
164165
.addParameter("id", String::class)
165166
.addStatement("return idToInstance.getValue(id)")
166167
.build()
167168
)
168169
.addFunction(
169170
FunSpec.builder("fromIdOrNull")
171+
.returns(className.copy(nullable = true))
170172
.addParameter("id", String::class)
171173
.addStatement("return idToInstance[id]")
172174
.build()
173175
)
174176
.addFunction(
175177
FunSpec.builder("fromUri")
178+
.returns(className)
176179
.addParameter("uri", URI::class)
177180
.addStatement(
178181
"return fromUriOrNull(uri) ?: throw %T(%P)",
@@ -183,6 +186,7 @@ open class EnumGeneratorTask @Inject constructor(objectFactory: ObjectFactory) :
183186
)
184187
.addFunction(
185188
FunSpec.builder("fromUriOrNull")
189+
.returns(className.copy(nullable = true))
186190
.addParameter("uri", URI::class)
187191
.addStatement("return uriToInstance[uri.toHttps()]")
188192
.build()

plugins/stage-vote-release-plugin/src/main/kotlin/com/github/vlsi/gradle/release/NexusRepositoryIdStore.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import org.gradle.api.Project
2323
class NexusRepositoryIdStore(private val project: Project) {
2424
private val savedIds = ConcurrentHashMap<String, String>()
2525

26-
private fun storeDir() = "${project.lay}/stagingRepositories"
26+
private fun storeDir() = "${project.buildDir}/stagingRepositories"
2727

2828
private fun filePath(repositoryName: String) = "${storeDir()}/$repositoryName.txt"
2929

0 commit comments

Comments
 (0)