@@ -23,7 +23,22 @@ inThisBuild(
23
23
scalaNativeVersion := " 0.4.2" ,
24
24
version := scalaNativeVersion.value,
25
25
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:[email protected] :scala-native/scala-native-cli.git" ,
38
+ devConnection =
39
+ Some (
" scm:git:[email protected] :scala-native/scala-native-cli.git" )
40
+ )
41
+ )
27
42
)
28
43
)
29
44
val cliPackLibJars =
@@ -58,7 +73,8 @@ lazy val cli = project
58
73
cliAssemblyJarName := s " ${normalizedName.value}-assembly_ ${scalaBinaryVersion.value}- ${scalaNativeVersion.value}.jar " ,
59
74
assembly / assemblyJarName := cliAssemblyJarName.value,
60
75
assembly / mainClass := (Compile / run / mainClass).value,
61
- cliPackSettings
76
+ cliPackSettings,
77
+ publishSettings
62
78
)
63
79
64
80
lazy val cliScriptedTests = project
@@ -218,3 +234,45 @@ lazy val patchSourcesSettings = {
218
234
)
219
235
)
220
236
}
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
+
261
+ id = " wmazur" ,
262
+ name = " Wojciech Mazur" ,
263
+ url = url(" https://github.com/WojciechMazur" )
264
+ ),
265
+ Developer (
266
+
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