-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.sbt
113 lines (93 loc) · 3.28 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
enablePlugins(GitPlugin)
ThisBuild / version := Version.mkVersion(
"9.802.0",
git.gitCurrentBranch.value,
git.gitDescribedVersion.value,
git.gitUncommittedChanges.value
)
lazy val scala3 = "3.3.4"
lazy val scala213 = "2.13.15"
lazy val scala212 = "2.12.20"
ThisBuild / scalaVersion := scala3
val buildCommit = settingKey[String]("Build info: commit")
val buildTimestamp = settingKey[String]("Build info: timestamp")
ThisBuild / buildCommit := Version.commit(git.gitHeadCommit.value)
ThisBuild / buildTimestamp := Version.timestamp
ThisBuild / name := "telegramium"
ThisBuild / organization := "io.github.apimorphism"
ThisBuild / homepage := Some(url("https://github.com/apimorphism/telegramium"))
ThisBuild / licenses := List(("MIT", url("https://opensource.org/licenses/MIT")))
ThisBuild / scmInfo := Some(
ScmInfo(
url("https://github.com/apimorphism/telegramium"),
"[email protected]:apimorphism/telegramium.git"
)
)
ThisBuild / developers := List(
Developer(
"sherzod",
"Sherzod Gapirov",
url("https://github.com/sherzodv")
)
)
ThisBuild / publishMavenStyle := true
ThisBuild / publishTo := sonatypePublishToBundle.value
ThisBuild / githubWorkflowScalaVersions := Seq(scala3, scala213, scala212)
ThisBuild / githubWorkflowJavaVersions :=
Seq(JavaSpec.temurin("17"), JavaSpec.temurin("11"), JavaSpec.temurin("8"))
ThisBuild / githubWorkflowPublishTargetBranches := Seq.empty
ThisBuild / githubWorkflowBuildPreamble ++=
Seq(
WorkflowStep.Sbt(List("scalafixAll --check")),
WorkflowStep.Sbt(List("scalafmtCheckAll")),
WorkflowStep.Sbt(List("scalafmtSbtCheck"))
)
Global / onChangedBuildSource := ReloadOnSourceChanges
val settings = Compiler.settings ++ Seq()
lazy val `telegramium-core` = (projectMatrix in file("telegramium-core"))
.jvmPlatform(scalaVersions = Seq(scala3, scala213, scala212))
.enablePlugins(BuildInfoPlugin)
.disablePlugins(ScalafixPlugin)
.settings(settings: _*)
.settings(libraryDependencies ++= Dependencies.telegramiumCore)
.settings(
buildInfoKeys := Seq[BuildInfoKey](
buildCommit,
buildTimestamp
),
buildInfoPackage := "telegramium.bots.buildinfo"
)
lazy val `telegramium-high` = (projectMatrix in file("telegramium-high"))
.jvmPlatform(scalaVersions = Seq(scala3, scala213, scala212))
.dependsOn(`telegramium-core`)
.settings(settings: _*)
.settings(
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision
)
.settings(libraryDependencies ++= Dependencies.telegramiumHigh)
lazy val `telegramium-examples` = (projectMatrix in file("telegramium-examples"))
.jvmPlatform(scalaVersions = Seq(scala3))
.dependsOn(
`telegramium-core`,
`telegramium-high`
)
.settings(settings: _*)
.settings(
publish / skip := true,
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision
)
.settings(libraryDependencies ++= Dependencies.telegramiumExam)
lazy val telegramium = (project in file("."))
.settings(
name := "F[Tg]",
publish / skip := true
)
.aggregate(
`telegramium-core`.projectRefs ++
`telegramium-high`.projectRefs ++
`telegramium-examples`.projectRefs: _*
)
addCommandAlias("fmtAll", "scalafixAll; scalafmtAll; scalafmtSbt")