@@ -23,7 +23,22 @@ inThisBuild(
2323 scalaNativeVersion := " 0.4.2" ,
2424 version := scalaNativeVersion.value,
2525 scalaVersion := crossScalaVersions212.last,
26- crossScalaVersions := latestsScalaVersions
26+ crossScalaVersions := latestsScalaVersions,
27+ homepage := Some (url(" http://www.scala-native.org" )),
28+ startYear := Some (2021 ),
29+ licenses := Seq (
30+ " BSD-like" -> url(
31+ " https://github.com/scala-native/scala-native-cli/blob/main/LICENSE"
32+ )
33+ ),
34+ scmInfo := Some (
35+ ScmInfo (
36+ browseUrl = url(" https://github.com/scala-native/scala-native-cli" ),
37+ connection = " scm:git:git@github.com:scala-native/scala-native-cli.git" ,
38+ devConnection =
39+ Some (" scm:git:git@github.com:scala-native/scala-native-cli.git" )
40+ )
41+ )
2742 )
2843)
2944val cliPackLibJars =
@@ -58,7 +73,8 @@ lazy val cli = project
5873 cliAssemblyJarName := s " ${normalizedName.value}-assembly_ ${scalaBinaryVersion.value}- ${scalaNativeVersion.value}.jar " ,
5974 assembly / assemblyJarName := cliAssemblyJarName.value,
6075 assembly / mainClass := (Compile / run / mainClass).value,
61- cliPackSettings
76+ cliPackSettings,
77+ publishSettings
6278 )
6379
6480lazy val cliScriptedTests = project
@@ -218,3 +234,45 @@ lazy val patchSourcesSettings = {
218234 )
219235 )
220236}
237+
238+ lazy val publishSettings = Def .settings(
239+ Compile / publishArtifact := true ,
240+ Test / publishArtifact := false ,
241+ publishMavenStyle := true ,
242+ pomIncludeRepository := (_ => false ),
243+ publishTo := {
244+ val nexus = " https://oss.sonatype.org/"
245+ if (isSnapshot.value)
246+ Some (" snapshots" at nexus + " content/repositories/snapshots" )
247+ else
248+ Some (" releases" at nexus + " service/local/staging/deploy/maven2" )
249+ },
250+ credentials ++= {
251+ for {
252+ realm <- sys.env.get(" MAVEN_REALM" )
253+ domain <- sys.env.get(" MAVEN_DOMAIN" )
254+ user <- sys.env.get(" MAVEN_USER" )
255+ password <- sys.env.get(" MAVEN_PASSWORD" )
256+ } yield Credentials (realm, domain, user, password)
257+ }.toSeq,
258+ developers ++= List (
259+ Developer (
260+ email = " wmazur@virtuslab.com" ,
261+ id = " wmazur" ,
262+ name = " Wojciech Mazur" ,
263+ url = url(" https://github.com/WojciechMazur" )
264+ ),
265+ Developer (
266+ email = " jchyb@virtuslab.com" ,
267+ id = " jchyb" ,
268+ name = " Jan Chyb" ,
269+ url = url(" https://github.com/jchyb" )
270+ )
271+ ),
272+ pomExtra := (
273+ <issueManagement >
274+ <system >GitHub Issues </system >
275+ <url >https:// github.com/ scala- native/ scala- native- cli/ issues</url >
276+ </issueManagement >
277+ )
278+ )
0 commit comments