File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed
main/kotlin/io/cloudshiftdev/gradle/codeartifact
test/kotlin/io/cloudshiftdev/gradle/codeartifact Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ description=CodeArtifact settings plugin for Gradle
33kotlin.code.style =official
44
55group =io.cloudshiftdev.codeartifact
6- version =1.0.2
6+ version =1.0.3
77
88org.gradle.jvmargs =-Dfile.encoding\=UTF-8
99org.gradle.vfs.watch =true
Original file line number Diff line number Diff line change @@ -42,12 +42,11 @@ internal class LocalCache {
4242 val cacheFile = cacheFile(endpoint)
4343
4444 try {
45+ logger.debug(" Reading cached CodeArtifact token with key {}" , endpoint.cacheKey)
4546 val decryptedBytes = decrypt(cacheFile.readBytes(), endpoint.cacheKey)
4647 val token: CodeArtifactToken = mapper.readValue(decryptedBytes)
47- if (! token.expired) {
48- logger.debug(" CodeArtifact token expired {}" , token.expiration)
49- return token
50- }
48+ if (! token.expired) return token
49+ logger.debug(" CodeArtifact token expired {}" , token.expiration)
5150 } catch (thrown: Exception ) {
5251 logger.debug(
5352 " Failed to read cached CodeArtifact token {}: {}" ,
Original file line number Diff line number Diff line change @@ -42,7 +42,9 @@ class CodeArtifactEndpointTest : FunSpec() {
4242 }
4343
4444 test(" url parsing works" ) {
45- val endpoint = " https://my_domain-111122223333.d.codeartifact.us-west-2.amazonaws.com/npm/my_repo/" .toCodeArtifactEndpoint()
45+ val endpoint =
46+ " https://my_domain-111122223333.d.codeartifact.us-west-2.amazonaws.com/npm/my_repo/"
47+ .toCodeArtifactEndpoint()
4648 endpoint.domain.shouldBe(" my_domain" )
4749 endpoint.domainOwner.shouldBe(" 111122223333" )
4850 endpoint.region.shouldBe(" us-west-2" )
You can’t perform that action at this time.
0 commit comments