Avoid deprecated URL constructor

This commit is contained in:
xuwei-k 2026-03-20 08:38:11 +09:00 committed by kenji yoshida
parent be305eb3a5
commit e13186fd22
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ val publishPort = 3030
// Publish to HTTP server (localhost) - ivyless publish uses PUT
// Resolver.url expects java.net.URL; in build.sbt "url" is sbt.URI, so use java.net.URL explicitly
publishTo := Some(
Resolver.url("test-repo", new java.net.URL(s"http://localhost:$publishPort/"))(Resolver.ivyStylePatterns)
Resolver.url("test-repo", new java.net.URI(s"http://localhost:$publishPort/").toURL)(Resolver.ivyStylePatterns)
.withAllowInsecureProtocol(true)
)

View File

@ -2,7 +2,7 @@ scalaVersion := "2.12.8"
resolvers += Resolver.url(
"jitpack",
new URL("https://jitpack.io")
new URI("https://jitpack.io").toURL
)(
// patterns should be ignored - and the repo be considered a maven one - because
// isMavenCompatible is true