1- import de .heikoseeberger .sbtheader .license .MIT
2- import PgpKeys .gpgCommand
3-
4- pgpPassphrase := Some (sys.env.getOrElse(" PGP_PASSPHRASE" , " " ).toCharArray)
5- pgpPublicRing := file(s " ${sys.env.getOrElse(" PGP_FOLDER" , " ." )}/pubring.gpg " )
6- pgpSecretRing := file(s " ${sys.env.getOrElse(" PGP_FOLDER" , " ." )}/secring.gpg " )
7-
8- val dev = Seq (Dev (" 47 Degrees (twitter: @47deg)" , " 47 Degrees" ))
9- val gh = GitHubSettings (" com.47deg" , " github4s" , " 47 Degrees" , mit)
10-
11- lazy val buildSettings = Seq (
12- name := gh.proj,
13- organization := gh.org,
14- organizationName := gh.publishOrg,
15- description := " Github API wrapper written in Scala" ,
16- startYear := Option (2016 ),
17- homepage := Option (url(" http://47deg.github.io/github4s/" )),
18- organizationHomepage := Option (new URL (" http://47deg.com" )),
19- scalaVersion := " 2.11.8" ,
20- crossScalaVersions := Seq (" 2.10.6" , scalaVersion.value),
21- scalacOptions ++= (scalaBinaryVersion.value match {
22- case " 2.10" => Seq (" -Xdivergence211" )
23- case _ => Nil
24- }),
25- scalafmtConfig in ThisBuild := Some (file(" .scalafmt" )),
26- headers := Map (
27- " scala" -> MIT (" 2016" , " 47 Degrees, LLC. <http://www.47deg.com>" )
28- )
29- ) ++ reformatOnCompileSettings ++
30- sharedCommonSettings ++
31- miscSettings ++
32- sharedReleaseProcess ++
33- credentialSettings ++
34- sharedPublishSettings(gh, dev)
35-
36- lazy val micrositeSettings = Seq (
37- micrositeName := " github4s" ,
38- micrositeDescription := " Github API wrapper written in Scala" ,
39- micrositeBaseUrl := " github4s" ,
40- micrositeDocumentationUrl := " /github4s/docs.html" ,
41- micrositeGithubOwner := " 47deg" ,
42- micrositeGithubRepo := " github4s" ,
43- includeFilter in makeSite := " *.html" | " *.css" | " *.png" | " *.jpg" | " *.gif" | " *.js" | " *.swf" | " *.md"
44- )
45-
46- lazy val commonDeps =
47- Seq (
48- libraryDependencies ++= Seq (
49- " org.typelevel" %%% " cats" % " 0.9.0" ,
50- " io.circe" %%% " circe-core" % " 0.7.0" ,
51- " io.circe" %%% " circe-generic" % " 0.7.0" ,
52- " io.circe" %%% " circe-parser" % " 0.7.0" ,
53- " org.scalatest" %%% " scalatest" % " 3.0.0" % " test" ,
54- " com.github.marklister" %%% " base64" % " 0.2.3" ,
55- compilerPlugin(
56- " org.scalamacros" % " paradise" % " 2.1.0" cross CrossVersion .full
57- )
58- ))
59-
60- lazy val jvmDeps = Seq (
61- libraryDependencies ++= Seq (
62- " org.scalaj" %% " scalaj-http" % " 2.3.0" ,
63- " org.mock-server" % " mockserver-netty" % " 3.10.4" % " test"
64- ))
65-
66- lazy val jsDeps = Seq (
67- libraryDependencies ++= Seq (
68- " fr.hmil" %%% " roshttp" % " 2.0.0-RC1"
69- )
70- )
71-
72- lazy val docsDependencies = libraryDependencies ++= Seq (
73- " com.ironcorelabs" %% " cats-scalatest" % " 1.1.2" % " test" ,
74- " org.mock-server" % " mockserver-netty" % " 3.10.4" % " test"
75- )
76-
77- lazy val scalazDependencies = Seq (
78- libraryDependencies +=
79- " org.scalaz" %% " scalaz-concurrent" % " 7.2.9"
80- )
1+ pgpPassphrase := Some (getEnvVar(" PGP_PASSPHRASE" ).getOrElse(" " ).toCharArray)
2+ pgpPublicRing := file(s " $gpgFolder/pubring.gpg " )
3+ pgpSecretRing := file(s " $gpgFolder/secring.gpg " )
814
825lazy val root = (project in file(" ." ))
83- .settings( buildSettings : _* )
6+ .dependsOn(github4sJVM, github4sJS, scalaz, docs )
847 .aggregate(github4sJVM, github4sJS, scalaz, docs)
8+ .settings(noPublishSettings : _* )
859
86- /** github4s - cross project that provides cross platform support.*/
8710lazy val github4s = (crossProject in file(" github4s" ))
8811 .settings(moduleName := " github4s" )
8912 .enablePlugins(AutomateHeaderPlugin )
9013 .enablePlugins(BuildInfoPlugin )
9114 .settings(
92- buildInfoKeys := Seq [BuildInfoKey ](name,
93- version,
94- " token" -> sys.env.getOrElse(" GITHUB4S_ACCESS_TOKEN" , " " )),
15+ buildInfoKeys := Seq [BuildInfoKey ](
16+ name,
17+ version,
18+ " token" -> sys.env.getOrElse(" GITHUB4S_ACCESS_TOKEN" , " " )),
9519 buildInfoPackage := " github4s"
9620 )
97- .settings(buildSettings : _* )
9821 .settings(commonDeps : _* )
9922 .jvmSettings(jvmDeps : _* )
10023 .jsSettings(sharedJsSettings : _* )
@@ -107,19 +30,13 @@ lazy val github4sJS = github4s.js
10730lazy val docs = (project in file(" docs" ))
10831 .dependsOn(scalaz)
10932 .settings(moduleName := " github4s-docs" )
110- .settings(buildSettings : _* )
11133 .settings(micrositeSettings : _* )
11234 .settings(docsDependencies : _* )
11335 .settings(noPublishSettings : _* )
11436 .enablePlugins(MicrositesPlugin )
11537
11638lazy val scalaz = (project in file(" scalaz" ))
11739 .settings(moduleName := " github4s-scalaz" )
118- .settings(buildSettings : _* )
11940 .settings(scalazDependencies : _* )
12041 .dependsOn(github4sJVM)
12142 .enablePlugins(AutomateHeaderPlugin )
122-
123- lazy val testSettings = Seq (
124- fork in Test := false
125- )
0 commit comments