File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
buildSrc/subprojects/license-texts/src/main/kotlin/com/github/vlsi/gradle/license
plugins/stage-vote-release-plugin/src/main/kotlin/com/github/vlsi/gradle/release Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -161,18 +161,21 @@ open class EnumGeneratorTask @Inject constructor(objectFactory: ObjectFactory) :
161
161
)
162
162
.addFunction(
163
163
FunSpec .builder(" fromId" )
164
+ .returns(className)
164
165
.addParameter(" id" , String ::class )
165
166
.addStatement(" return idToInstance.getValue(id)" )
166
167
.build()
167
168
)
168
169
.addFunction(
169
170
FunSpec .builder(" fromIdOrNull" )
171
+ .returns(className.copy(nullable = true ))
170
172
.addParameter(" id" , String ::class )
171
173
.addStatement(" return idToInstance[id]" )
172
174
.build()
173
175
)
174
176
.addFunction(
175
177
FunSpec .builder(" fromUri" )
178
+ .returns(className)
176
179
.addParameter(" uri" , URI ::class )
177
180
.addStatement(
178
181
" return fromUriOrNull(uri) ?: throw %T(%P)" ,
@@ -183,6 +186,7 @@ open class EnumGeneratorTask @Inject constructor(objectFactory: ObjectFactory) :
183
186
)
184
187
.addFunction(
185
188
FunSpec .builder(" fromUriOrNull" )
189
+ .returns(className.copy(nullable = true ))
186
190
.addParameter(" uri" , URI ::class )
187
191
.addStatement(" return uriToInstance[uri.toHttps()]" )
188
192
.build()
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ import org.gradle.api.Project
23
23
class NexusRepositoryIdStore (private val project : Project ) {
24
24
private val savedIds = ConcurrentHashMap <String , String >()
25
25
26
- private fun storeDir () = " ${project.lay } /stagingRepositories"
26
+ private fun storeDir () = " ${project.buildDir } /stagingRepositories"
27
27
28
28
private fun filePath (repositoryName : String ) = " ${storeDir()} /$repositoryName .txt"
29
29
You can’t perform that action at this time.
0 commit comments