WIP support for `releaseNotesURL`

This commit is contained in:
Arman Bilge 2023-02-10 06:19:39 +00:00
parent 78f9b318e2
commit 3ce8008ae7
2 changed files with 9 additions and 2 deletions

View File

@ -200,6 +200,7 @@ object Defaults extends BuildCommon {
autoCompilerPlugins :== true, autoCompilerPlugins :== true,
scalaHome :== None, scalaHome :== None,
apiURL := None, apiURL := None,
releaseNotesURL := None
javaHome :== None, javaHome :== None,
discoveredJavaHomes := CrossJava.discoverJavaHomes, discoveredJavaHomes := CrossJava.discoverJavaHomes,
javaHomes :== ListMap.empty, javaHomes :== ListMap.empty,
@ -3344,7 +3345,12 @@ object Classpaths {
p1.extra(SbtPomExtraProperties.VERSION_SCHEME_KEY -> x) p1.extra(SbtPomExtraProperties.VERSION_SCHEME_KEY -> x)
case _ => p1 case _ => p1
} }
p2 val p3 = releaseNotesURL.value match {
case Some(u) =>
p1.extra("info.releaseNotesUrl" -> u.toExternalForm)
case _ => p2
}
p3
} }
def pluginProjectID: Initialize[ModuleID] = def pluginProjectID: Initialize[ModuleID] =
Def.setting { Def.setting {

View File

@ -346,6 +346,7 @@ object Keys {
val entryApiURL = AttributeKey[URL]("entryApiURL", "Base URL for the API documentation for a classpath entry.") val entryApiURL = AttributeKey[URL]("entryApiURL", "Base URL for the API documentation for a classpath entry.")
val apiMappings = taskKey[Map[File, URL]]("Mappings from classpath entry to API documentation base URL.").withRank(BMinusSetting) val apiMappings = taskKey[Map[File, URL]]("Mappings from classpath entry to API documentation base URL.").withRank(BMinusSetting)
val autoAPIMappings = settingKey[Boolean]("If true, automatically manages mappings to the API doc URL.").withRank(BMinusSetting) val autoAPIMappings = settingKey[Boolean]("If true, automatically manages mappings to the API doc URL.").withRank(BMinusSetting)
val releaseNotesURL = settingKey[Option[URL]]("URL for release notes.").withRank(BMinusSetting)
val scmInfo = settingKey[Option[ScmInfo]]("Basic SCM information for the project.").withRank(BMinusSetting) val scmInfo = settingKey[Option[ScmInfo]]("Basic SCM information for the project.").withRank(BMinusSetting)
val projectInfo = settingKey[ModuleInfo]("Addition project information like formal name, homepage, licenses etc.").withRank(CSetting) val projectInfo = settingKey[ModuleInfo]("Addition project information like formal name, homepage, licenses etc.").withRank(CSetting)
val defaultConfiguration = settingKey[Option[Configuration]]("Defines the configuration used when none is specified for a dependency in ivyXML.").withRank(CSetting) val defaultConfiguration = settingKey[Option[Configuration]]("Defines the configuration used when none is specified for a dependency in ivyXML.").withRank(CSetting)