This repository has been archived by the owner on Sep 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
95 lines (79 loc) · 3.18 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
84
85
86
87
88
89
90
91
92
93
94
95
import ReleaseTransformations._
val contentEntityVersion = "2.0.6"
val contentAtomVersion = "3.2.2"
val storyPackageVersion = "2.0.4"
val contentApiModelsVersion = "15.9.1"
val scroogeDependencies = Seq(
"content-api-models",
"story-packages-model-thrift",
"content-atom-model-thrift",
"content-entity-thrift"
)
val libraryDeps = Seq(
"com.gu" % "content-api-models" % contentApiModelsVersion,
"com.gu" % "story-packages-model-thrift" % storyPackageVersion,
"com.gu" % "content-atom-model-thrift" % contentAtomVersion,
"com.gu" % "content-entity-thrift" % contentEntityVersion
)
ThisBuild / organization := "com.gu"
ThisBuild / scalaVersion := "2.12.11"
ThisBuild / licenses += ("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0.html"))
lazy val scalaApiModels = project.in(file("api-models") / "scala")
.settings(
name := "apps-rendering-api-models",
description := "Models used by the apps-rendering API",
scroogeLanguages in Compile := Seq("scala"),
scroogeThriftSourceFolder in Compile := baseDirectory.value / "../thrift/src/main/thrift",
scroogeThriftDependencies in Compile ++= scroogeDependencies,
libraryDependencies ++= Seq(
"org.apache.thrift" % "libthrift" % "0.12.0",
"com.twitter" %% "scrooge-core" % "20.4.1",
"com.gu" %% "content-api-models-scala" % contentApiModelsVersion
) ++ libraryDeps,
publishTo := sonatypePublishToBundle.value,
scmInfo := Some(ScmInfo(
url("https://github.com/guardian/apps-rendering"),
"scm:git:[email protected]:guardian/apps-rendering.git"
)),
homepage := Some(url("https://github.com/guardian/apps-rendering")),
developers := List(Developer(
id = "Guardian",
name = "Guardian",
email = null,
url = url("https://github.com/guardian")
)),
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
publishArtifacts,
releaseStepCommand("sonatypeBundleRelease"),
setNextVersion,
commitNextVersion,
pushChanges
)
)
lazy val tsApiModels = project.in(file("api-models") / "ts")
.enablePlugins(ScroogeTypescriptGen)
.settings(
name := "apps-rendering-api-models-ts",
scroogeTypescriptNpmPackageName := "@guardian/apps-rendering-api-models",
Compile / scroogeDefaultJavaNamespace := scroogeTypescriptNpmPackageName.value,
description := "Models used by the apps-rendering API",
scroogeTypescriptPackageLicense := "Apache-2.0",
scroogeThriftSourceFolder in Compile := baseDirectory.value / "../thrift/src/main/thrift",
scroogeLanguages in Compile := Seq("typescript"),
scroogeThriftDependencies in Compile ++= scroogeDependencies,
scroogeTypescriptPackageMapping := Map(
"content-api-models" -> "@guardian/content-api-models",
"content-entity-thrift" -> "@guardian/content-entity-model",
"content-atom-model-thrift" -> "@guardian/content-atom-model",
"story-packages-model-thrift" -> "@guardian/story-packages-model"
),
libraryDependencies ++= libraryDeps,
)