@@ -12,8 +12,10 @@ val Versions = new {
12
12
13
13
inThisBuild(
14
14
Def .settings(
15
- organization := " org.scalanative.bindgen" ,
16
- version := " 0.2-SNAPSHOT" ,
15
+ organization := " org.scala-native.bindgen" ,
16
+ licenses := Seq (
17
+ " BSD 3-Clause" -> url(" https://www.scala-lang.org/license/" )),
18
+ homepage := Some (url(" https://kornilova-l.github.io/scala-native-bindgen" )),
17
19
scalacOptions ++= Seq (
18
20
" -deprecation" ,
19
21
" -unchecked" ,
@@ -24,7 +26,20 @@ inThisBuild(
24
26
scmInfo := Some (
25
27
ScmInfo (url(" https://github.com/kornilova-l/scala-native-bindgen" ),
26
28
" scm:git:git@github.com:kornilova-l/scala-native-bindgen.git" )),
27
- git.remoteRepo := scmInfo.value.get.connection.replace(" scm:git:" , " " )
29
+ developers := List (
30
+ Developer (
31
+ id = " kornilova-l" ,
32
+ name = " Liudmila Kornilova" ,
33
+ email = " kornilova-l@users.noreply.github.com" ,
34
+ url = url(" https://github.com/kornilova-l" )
35
+ ),
36
+ Developer (
37
+ id = " jonas" ,
38
+ name = " Jonas Fonseca" ,
39
+ email = " jonas@users.noreply.github.com" ,
40
+ url = url(" https://github.com/jonas" )
41
+ )
42
+ )
28
43
))
29
44
30
45
val root = project(" scala-native-bindgen" )
@@ -36,10 +51,31 @@ val root = project("scala-native-bindgen")
36
51
sbtPlugin,
37
52
docs
38
53
)
54
+ .enablePlugins(ReleasePlugin )
55
+ .settings(
56
+ skip in publish := true ,
57
+ releaseCrossBuild := false ,
58
+ releaseVersionFile := target.value / " unused-version.sbt" ,
59
+ releaseProcess := {
60
+ import ReleaseTransformations ._
61
+ Seq [ReleaseStep ](
62
+ checkSnapshotDependencies,
63
+ setReleaseVersions(version.in(ThisBuild ).value),
64
+ runClean,
65
+ releaseStepCommandAndRemaining(" verify" ),
66
+ setReleaseVersion,
67
+ tagRelease,
68
+ releaseStepCommandAndRemaining(" ^publish" ),
69
+ pushChanges,
70
+ releaseStepTask(docs / ghpagesPushSite)
71
+ )
72
+ }
73
+ )
39
74
40
75
lazy val tests = project(" tests" )
41
76
.dependsOn(tools)
42
77
.settings(
78
+ skip in publish := true ,
43
79
fork in Test := true ,
44
80
javaOptions in Test += {
45
81
val rootDir = (ThisBuild / baseDirectory).value
@@ -57,6 +93,7 @@ lazy val samples = project("samples")
57
93
.in(file(" tests/samples" ))
58
94
.enablePlugins(ScalaNativePlugin )
59
95
.settings(
96
+ skip in publish := true ,
60
97
scalaVersion := Versions .scala211,
61
98
libraryDependencies += " com.lihaoyi" %%% " utest" % " 0.6.3" % " test" ,
62
99
testFrameworks += new TestFramework (" utest.runner.Framework" ),
@@ -121,6 +158,7 @@ lazy val sbtPlugin = project("sbt-scala-native-bindgen", ScriptedPlugin)
121
158
lazy val docs = project(" docs" )
122
159
.enablePlugins(GhpagesPlugin , ParadoxSitePlugin , ParadoxMaterialThemePlugin )
123
160
.settings(
161
+ skip in publish := true ,
124
162
paradoxProperties in Paradox ++= Map (
125
163
" github.base_url" -> scmInfo.value.get.browseUrl.toString
126
164
),
@@ -134,15 +172,31 @@ lazy val docs = project("docs")
134
172
135
173
def project (name : String , plugged : AutoPlugin * ) = {
136
174
val unplugged = Seq (ScriptedPlugin ).filterNot(plugged.toSet)
175
+
137
176
Project (id = name, base = file(name))
138
177
.disablePlugins(unplugged : _* )
178
+ .enablePlugins(GitPlugin )
179
+ .enablePlugins(GitVersioning )
139
180
.settings(
181
+ versionWithGit,
182
+ git.useGitDescribe := true ,
183
+ git.remoteRepo := scmInfo.value.get.connection.replace(" scm:git:" , " " ),
140
184
crossSbtVersions := List (Versions .sbt013, Versions .sbt1),
141
185
scalaVersion := {
142
186
(pluginCrossBuild / sbtBinaryVersion).value match {
143
187
case " 0.13" => Versions .scala210
144
188
case _ => Versions .scala212
145
189
}
146
- }
190
+ },
191
+ bintrayOrganization := Some (" scala-native-bindgen" ),
192
+ bintrayRepository := {
193
+ if (Keys .sbtPlugin.value) " sbt-plugins"
194
+ else " maven"
195
+ },
196
+ publishMavenStyle := Keys .sbtPlugin.value == false ,
197
+ publishArtifact in Test := false
147
198
)
148
199
}
200
+
201
+ lazy val setReleaseVersions : String => State => State =
202
+ v => _.put(ReleaseKeys .versions, (v, v))
0 commit comments