diff --git a/core/src/main/contraband-scala/sbt/librarymanagement/ModuleInfo.scala b/core/src/main/contraband-scala/sbt/librarymanagement/ModuleInfo.scala index 383a144e..46f2d6f7 100644 --- a/core/src/main/contraband-scala/sbt/librarymanagement/ModuleInfo.scala +++ b/core/src/main/contraband-scala/sbt/librarymanagement/ModuleInfo.scala @@ -8,11 +8,11 @@ package sbt.librarymanagement final class ModuleInfo private ( val nameFormal: String, val description: String, - val homepage: Option[java.net.URL], + val homepage: Option[java.net.URI], val startYear: Option[Int], - val licenses: Vector[scala.Tuple2[String, java.net.URL]], + val licenses: Vector[scala.Tuple2[String, java.net.URI]], val organizationName: String, - val organizationHomepage: Option[java.net.URL], + val organizationHomepage: Option[java.net.URI], val scmInfo: Option[sbt.librarymanagement.ScmInfo], val developers: Vector[sbt.librarymanagement.Developer]) extends Serializable { @@ -28,7 +28,7 @@ final class ModuleInfo private ( override def toString: String = { "ModuleInfo(" + nameFormal + ", " + description + ", " + homepage + ", " + startYear + ", " + licenses + ", " + organizationName + ", " + organizationHomepage + ", " + scmInfo + ", " + developers + ")" } - private[this] def copy(nameFormal: String = nameFormal, description: String = description, homepage: Option[java.net.URL] = homepage, startYear: Option[Int] = startYear, licenses: Vector[scala.Tuple2[String, java.net.URL]] = licenses, organizationName: String = organizationName, organizationHomepage: Option[java.net.URL] = organizationHomepage, scmInfo: Option[sbt.librarymanagement.ScmInfo] = scmInfo, developers: Vector[sbt.librarymanagement.Developer] = developers): ModuleInfo = { + private[this] def copy(nameFormal: String = nameFormal, description: String = description, homepage: Option[java.net.URI] = homepage, startYear: Option[Int] = startYear, licenses: Vector[scala.Tuple2[String, java.net.URI]] = licenses, organizationName: String = organizationName, organizationHomepage: Option[java.net.URI] = organizationHomepage, scmInfo: Option[sbt.librarymanagement.ScmInfo] = scmInfo, developers: Vector[sbt.librarymanagement.Developer] = developers): ModuleInfo = { new ModuleInfo(nameFormal, description, homepage, startYear, licenses, organizationName, organizationHomepage, scmInfo, developers) } def withNameFormal(nameFormal: String): ModuleInfo = { @@ -37,19 +37,19 @@ final class ModuleInfo private ( def withDescription(description: String): ModuleInfo = { copy(description = description) } - def withHomepage(homepage: Option[java.net.URL]): ModuleInfo = { + def withHomepage(homepage: Option[java.net.URI]): ModuleInfo = { copy(homepage = homepage) } def withStartYear(startYear: Option[Int]): ModuleInfo = { copy(startYear = startYear) } - def withLicenses(licenses: Vector[scala.Tuple2[String, java.net.URL]]): ModuleInfo = { + def withLicenses(licenses: Vector[scala.Tuple2[String, java.net.URI]]): ModuleInfo = { copy(licenses = licenses) } def withOrganizationName(organizationName: String): ModuleInfo = { copy(organizationName = organizationName) } - def withOrganizationHomepage(organizationHomepage: Option[java.net.URL]): ModuleInfo = { + def withOrganizationHomepage(organizationHomepage: Option[java.net.URI]): ModuleInfo = { copy(organizationHomepage = organizationHomepage) } def withScmInfo(scmInfo: Option[sbt.librarymanagement.ScmInfo]): ModuleInfo = { @@ -62,5 +62,5 @@ final class ModuleInfo private ( object ModuleInfo { def apply(nameFormal: String): ModuleInfo = new ModuleInfo(nameFormal) - def apply(nameFormal: String, description: String, homepage: Option[java.net.URL], startYear: Option[Int], licenses: Vector[scala.Tuple2[String, java.net.URL]], organizationName: String, organizationHomepage: Option[java.net.URL], scmInfo: Option[sbt.librarymanagement.ScmInfo], developers: Vector[sbt.librarymanagement.Developer]): ModuleInfo = new ModuleInfo(nameFormal, description, homepage, startYear, licenses, organizationName, organizationHomepage, scmInfo, developers) + def apply(nameFormal: String, description: String, homepage: Option[java.net.URI], startYear: Option[Int], licenses: Vector[scala.Tuple2[String, java.net.URI]], organizationName: String, organizationHomepage: Option[java.net.URI], scmInfo: Option[sbt.librarymanagement.ScmInfo], developers: Vector[sbt.librarymanagement.Developer]): ModuleInfo = new ModuleInfo(nameFormal, description, homepage, startYear, licenses, organizationName, organizationHomepage, scmInfo, developers) } diff --git a/core/src/main/contraband-scala/sbt/librarymanagement/ModuleInfoFormats.scala b/core/src/main/contraband-scala/sbt/librarymanagement/ModuleInfoFormats.scala index 4707e0bd..aa586ebc 100644 --- a/core/src/main/contraband-scala/sbt/librarymanagement/ModuleInfoFormats.scala +++ b/core/src/main/contraband-scala/sbt/librarymanagement/ModuleInfoFormats.scala @@ -13,11 +13,11 @@ implicit lazy val ModuleInfoFormat: JsonFormat[sbt.librarymanagement.ModuleInfo] unbuilder.beginObject(__js) val nameFormal = unbuilder.readField[String]("nameFormal") val description = unbuilder.readField[String]("description") - val homepage = unbuilder.readField[Option[java.net.URL]]("homepage") + val homepage = unbuilder.readField[Option[java.net.URI]]("homepage") val startYear = unbuilder.readField[Option[Int]]("startYear") - val licenses = unbuilder.readField[Vector[scala.Tuple2[String, java.net.URL]]]("licenses") + val licenses = unbuilder.readField[Vector[scala.Tuple2[String, java.net.URI]]]("licenses") val organizationName = unbuilder.readField[String]("organizationName") - val organizationHomepage = unbuilder.readField[Option[java.net.URL]]("organizationHomepage") + val organizationHomepage = unbuilder.readField[Option[java.net.URI]]("organizationHomepage") val scmInfo = unbuilder.readField[Option[sbt.librarymanagement.ScmInfo]]("scmInfo") val developers = unbuilder.readField[Vector[sbt.librarymanagement.Developer]]("developers") unbuilder.endObject() diff --git a/core/src/main/contraband/librarymanagement.json b/core/src/main/contraband/librarymanagement.json index 42de1b0a..37ede5b9 100644 --- a/core/src/main/contraband/librarymanagement.json +++ b/core/src/main/contraband/librarymanagement.json @@ -365,11 +365,11 @@ "fields": [ { "name": "nameFormal", "type": "String" }, { "name": "description", "type": "String", "default": "\"\"", "since": "0.0.1" }, - { "name": "homepage", "type": "Option[java.net.URL]", "default": "None", "since": "0.0.1" }, + { "name": "homepage", "type": "Option[java.net.URI]", "default": "None", "since": "0.0.1" }, { "name": "startYear", "type": "Option[Int]", "default": "None", "since": "0.0.1" }, - { "name": "licenses", "type": "scala.Tuple2[String, java.net.URL]*", "default": "Vector.empty", "since": "0.0.1" }, + { "name": "licenses", "type": "scala.Tuple2[String, java.net.URI]*", "default": "Vector.empty", "since": "0.0.1" }, { "name": "organizationName", "type": "String", "default": "\"\"", "since": "0.0.1" }, - { "name": "organizationHomepage", "type": "Option[java.net.URL]", "default": "None", "since": "0.0.1" }, + { "name": "organizationHomepage", "type": "Option[java.net.URI]", "default": "None", "since": "0.0.1" }, { "name": "scmInfo", "type": "Option[sbt.librarymanagement.ScmInfo]", "default": "None", "since": "0.0.1" }, { "name": "developers", "type": "sbt.librarymanagement.Developer*", "default": "Vector.empty", "since": "0.0.1" } ]