-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.sbt
83 lines (75 loc) · 2.59 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType}
lazy val scala213 = "2.13.10"
lazy val scala212 = "2.12.17"
lazy val supportedScalaVersions = List(scala213, scala212)
ThisBuild / scalaVersion := scala213
ThisBuild / organization := "com.hypertino"
lazy val library = crossProject(JSPlatform, JVMPlatform)
.crossType(CrossType.Full) // [Pure, Full, Dummy], default: CrossType.Full
.settings(
crossScalaVersions := supportedScalaVersions,
name := "inflector",
version := "1.0.14",
libraryDependencies += "org.scalatest" %%% "scalatest" % "3.2.15" % "test",
publishArtifact := true,
Test / publishArtifact := false
).settings(publishSettings:_*)
.jsSettings(
// JS-specific settings here
).jvmSettings(
// JVM-specific settings here
)
lazy val js = library.js
lazy val jvm = library.jvm
lazy val publishSettings = Seq(
pomExtra := <url>https://github.com/hypertino/inflector</url>
<licenses>
<license>
<name>BSD-style</name>
<url>http://opensource.org/licenses/BSD-3-Clause</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>[email protected]:hypertino/inflector.git</url>
<connection>scm:git:[email protected]:hypertino/inflector.git</connection>
</scm>
<developers>
<developer>
<id>maqdev</id>
<name>Magomed Abdurakhmanov</name>
<url>https://github.com/maqdev</url>
</developer>
<developer>
<id>hypertino</id>
<name>Hypertino</name>
<url>https://github.com/hypertino</url>
</developer>
</developers>,
pgpSecretRing := file("./travis/script/ht-oss-private.asc"),
pgpPublicRing := file("./travis/script/ht-oss-public.asc"),
usePgpKeyHex("F8CDEF49B0EDEDCC"),
useGpg := false,
pgpPassphrase := Option(System.getenv().get("oss_gpg_passphrase")).map(_.toCharArray),
publishMavenStyle := true,
pomIncludeRepository := { _ => false},
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
credentials ++= (for {
username <- Option(System.getenv().get("sonatype_username"))
password <- Option(System.getenv().get("sonatype_password"))
} yield Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", username, password)).toSeq
)
lazy val `inflector-root` = project
.in(file("."))
.settings(publishSettings:_*)
.aggregate(js, jvm)
.settings(
crossScalaVersions := Nil,
publish / skip := true
)