This repository has been archived by the owner on Oct 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.sbt
70 lines (63 loc) · 2.27 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
inThisBuild(
List(
organization := "com.kubukoz",
homepage := Some(url("https://github.com/pitgull/caliban-gitlab")),
licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
developers := List(
Developer(
"kubukoz",
"Jakub Kozłowski",
"kubukoz@gmail.com",
url("https://blog.kubukoz.com")
),
Developer(
"majk-p",
"Michał Pawlik",
"admin@michalp.net",
url("https://michalp.net")
)
),
Compile / doc / sources := Seq()
)
)
val Scala213 = "2.13.14"
val Scala3 = "3.0.2"
def crossPlugin(x: sbt.librarymanagement.ModuleID) = compilerPlugin(x.cross(CrossVersion.full))
val compilerPlugins = List(
crossPlugin("org.typelevel" % "kind-projector" % "0.11.0"),
crossPlugin("com.github.cb372" % "scala-typed-holes" % "0.1.5"),
crossPlugin("com.kubukoz" % "better-tostring" % "0.2.4"),
compilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1")
)
val GraalVM11 = "graalvm-ce-java11@20.3.0"
ThisBuild / scalaVersion := Scala213
ThisBuild / crossScalaVersions := Seq(Scala213, Scala3)
ThisBuild / githubWorkflowJavaVersions := Seq(GraalVM11)
//sbt-ci-release settings
ThisBuild / githubWorkflowTargetTags ++= Seq("v*")
ThisBuild / githubWorkflowPublishTargetBranches := Seq(RefPredicate.StartsWith(Ref.Branch("master")), RefPredicate.StartsWith(Ref.Tag("v")))
ThisBuild / githubWorkflowPublishPreamble := Seq(WorkflowStep.Use(UseRef.Public("olafurpg", "setup-gpg", "v3")))
ThisBuild / githubWorkflowPublish := Seq(WorkflowStep.Sbt(List("ci-release")))
ThisBuild / githubWorkflowEnv ++= List("PGP_PASSPHRASE", "PGP_SECRET", "SONATYPE_PASSWORD", "SONATYPE_USERNAME").map { envKey =>
envKey -> s"$${{ secrets.$envKey }}"
}.toMap
val core = project
.settings(
name := "caliban-gitlab",
libraryDependencies ++= List("com.github.ghostdogpr" %% "caliban-client" % "1.1.1")
)
val root = project
.in(file("."))
.settings(
addCommandAlias(
"codegen",
"calibanGenClient https://gitlab.com/api/graphql core/src/main/scala/io/pg/gitlab/graphql.scala --packageName io.pg.gitlab"
),
addCommandAlias(
"release",
"+publishSigned;sonatypeBundleRelease"
),
publish / skip := true
)
.aggregate(core)
.enablePlugins(CalibanPlugin)