@@ -12,8 +12,10 @@ val Versions = new {
1212
1313inThisBuild(
1414 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" )),
1719 scalacOptions ++= Seq (
1820 " -deprecation" ,
1921 " -unchecked" ,
@@ -24,7 +26,20 @@ inThisBuild(
2426 scmInfo := Some (
2527 ScmInfo (url(" https://github.com/kornilova-l/scala-native-bindgen" ),
2628 " scm:git:[email protected] :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+ 34+ url = url(" https://github.com/kornilova-l" )
35+ ),
36+ Developer (
37+ id = " jonas" ,
38+ name = " Jonas Fonseca" ,
39+ 40+ url = url(" https://github.com/jonas" )
41+ )
42+ )
2843 ))
2944
3045val root = project(" scala-native-bindgen" )
@@ -36,10 +51,31 @@ val root = project("scala-native-bindgen")
3651 sbtPlugin,
3752 docs
3853 )
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+ )
3974
4075lazy val tests = project(" tests" )
4176 .dependsOn(tools)
4277 .settings(
78+ skip in publish := true ,
4379 fork in Test := true ,
4480 javaOptions in Test += {
4581 val rootDir = (ThisBuild / baseDirectory).value
@@ -57,6 +93,7 @@ lazy val samples = project("samples")
5793 .in(file(" tests/samples" ))
5894 .enablePlugins(ScalaNativePlugin )
5995 .settings(
96+ skip in publish := true ,
6097 scalaVersion := Versions .scala211,
6198 libraryDependencies += " com.lihaoyi" %%% " utest" % " 0.6.3" % " test" ,
6299 testFrameworks += new TestFramework (" utest.runner.Framework" ),
@@ -121,6 +158,7 @@ lazy val sbtPlugin = project("sbt-scala-native-bindgen", ScriptedPlugin)
121158lazy val docs = project(" docs" )
122159 .enablePlugins(GhpagesPlugin , ParadoxSitePlugin , ParadoxMaterialThemePlugin )
123160 .settings(
161+ skip in publish := true ,
124162 paradoxProperties in Paradox ++= Map (
125163 " github.base_url" -> scmInfo.value.get.browseUrl.toString
126164 ),
@@ -134,15 +172,31 @@ lazy val docs = project("docs")
134172
135173def project (name : String , plugged : AutoPlugin * ) = {
136174 val unplugged = Seq (ScriptedPlugin ).filterNot(plugged.toSet)
175+
137176 Project (id = name, base = file(name))
138177 .disablePlugins(unplugged : _* )
178+ .enablePlugins(GitPlugin )
179+ .enablePlugins(GitVersioning )
139180 .settings(
181+ versionWithGit,
182+ git.useGitDescribe := true ,
183+ git.remoteRepo := scmInfo.value.get.connection.replace(" scm:git:" , " " ),
140184 crossSbtVersions := List (Versions .sbt013, Versions .sbt1),
141185 scalaVersion := {
142186 (pluginCrossBuild / sbtBinaryVersion).value match {
143187 case " 0.13" => Versions .scala210
144188 case _ => Versions .scala212
145189 }
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
147198 )
148199}
200+
201+ lazy val setReleaseVersions : String => State => State =
202+ v => _.put(ReleaseKeys .versions, (v, v))
0 commit comments