Skip to content

Commit

Permalink
Avoid calling search.maven.org with Ktor client
Browse files Browse the repository at this point in the history
  • Loading branch information
sd-yip committed Aug 12, 2021
1 parent 43f900c commit d43fe40
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions buildSrc/src/main/kotlin/PackageManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import org.w3c.dom.NodeList
import utility.SuspendedLazy
import utility.cache
import utility.withRetry
import java.net.URL
import java.util.*
import javax.xml.parsers.DocumentBuilderFactory

Expand All @@ -44,12 +45,9 @@ object PackageManager {
val allCdkModules = SuspendedLazy {
println("Start to get list of CDK modules")
println(requestUrl)
val response =
kotlin.run {
client.get<String>(requestUrl)
}
val obj = jacksonObjectMapper().readValue<ResponseJson>(URL(requestUrl))
println("Completed getting list of CDK modules")
val obj = jacksonObjectMapper().readValue<ResponseJson>(response)

obj.response.docs.filter {
it.ec.containsAll(
listOf(
Expand Down

0 comments on commit d43fe40

Please sign in to comment.