Skip to content

Commit

Permalink
Removes sbt-org-policies (#436)
Browse files Browse the repository at this point in the history
  • Loading branch information
juanpedromoreno committed Apr 8, 2020
1 parent e56c58c commit dc18de3
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 44 deletions.
4 changes: 1 addition & 3 deletions build.sbt
@@ -1,5 +1,3 @@
pgpPassphrase := Some(getEnvVar("PGP_PASSPHRASE").getOrElse("").toCharArray)

lazy val root = (project in file("."))
.settings(moduleName := "github4s-root")
.aggregate(github4s)
Expand Down Expand Up @@ -33,4 +31,4 @@ lazy val docs = (project in file("docs"))
.enablePlugins(MicrositesPlugin)

addCommandAlias("ci-test", "+scalafmtCheck; +scalafmtSbtCheck; +docs/mdoc; +test")
addCommandAlias("ci-docs", "docs/mdoc")
addCommandAlias("ci-docs", "docs/mdoc; headerCreateAll")
48 changes: 16 additions & 32 deletions project/ProjectPlugin.scala
Expand Up @@ -3,21 +3,16 @@ import microsites._
import microsites.MicrositesPlugin.autoImport._
import sbt.Keys._
import sbt._
import sbtorgpolicies.OrgPoliciesKeys.orgBadgeListSetting
import sbtorgpolicies.OrgPoliciesPlugin
import sbtorgpolicies.OrgPoliciesPlugin.autoImport._
import sbtorgpolicies.templates.badges._
import sbtorgpolicies.runnable.syntax._
import scoverage.ScoverageKeys
import scoverage.ScoverageKeys._
import com.alejandrohdezma.sbt.github.SbtGithubPlugin
import mdoc.MdocPlugin.autoImport._
import sbtorgpolicies.model.GitHubSettings

object ProjectPlugin extends AutoPlugin {

override def trigger: PluginTrigger = allRequirements

override def requires: Plugins = OrgPoliciesPlugin
override def requires: Plugins = SbtGithubPlugin

object autoImport {

Expand All @@ -35,6 +30,13 @@ object ProjectPlugin extends AutoPlugin {
val silencer: String = "1.6.0"
}

lazy val noPublishSettings = Seq(
publish := ((): Unit),
publishLocal := ((): Unit),
publishArtifact := false,
publishMavenStyle := false // suppress warnings about intransitive deps (not published anyway)
)

lazy val micrositeSettings = Seq(
micrositeName := "Github4s",
micrositeDescription := "Github API wrapper written in Scala",
Expand Down Expand Up @@ -102,19 +104,13 @@ object ProjectPlugin extends AutoPlugin {
override def projectSettings: Seq[Def.Setting[_]] =
Seq(
name := "github4s",
orgGithubSetting := GitHubSettings(
organization = "47degrees",
project = (name in LocalRootProject).value,
organizationName = "47 Degrees",
groupId = "com.47deg",
organizationHomePage = url("http://47deg.com"),
organizationEmail = "hello@47deg.com"
),
orgProjectName := "Github4s",
organization := "com.47deg",
organizationName := "47 Degrees",
organizationHomepage := Some(url("https://www.47deg.com")),
homepage := Option(url("https://47degrees.github.io/github4s/")),
description := "Github API wrapper written in Scala",
startYear := Option(2016),
resolvers += Resolver.sonatypeRepo("snapshots"),
scalaVersion := V.scala213,
crossScalaVersions := Seq(V.scala212, V.scala213),
scalacOptions := {
val withStripedLinter = scalacOptions.value filterNot Set("-Xlint", "-Xfuture").contains
Expand All @@ -123,20 +119,8 @@ object ProjectPlugin extends AutoPlugin {
case _ => withStripedLinter
}) :+ "-language:higherKinds"
},
orgGithubTokenSetting := "GITHUB_TOKEN",
orgBadgeListSetting := List(
TravisBadge.apply(_),
GitterBadge.apply(_),
CodecovBadge.apply(_),
MavenCentralBadge.apply(_),
LicenseBadge.apply(_),
ScalaLangBadge.apply(_),
GitHubIssuesBadge.apply(_)
),
orgScriptTaskListSetting ++= List(
(ScoverageKeys.coverageAggregate in Test).asRunnableItemFull,
"docs/mdoc".asRunnableItem
),
coverageMinimum := 70d,
coverageFailOnMinimum := true,
coverageExcludedPackages := "<empty>;github4s\\.scalaz\\..*",
// This is necessary to prevent packaging the BuildInfo with
// sensible information like the Github token. Do not remove.
Expand All @@ -146,5 +130,5 @@ object ProjectPlugin extends AutoPlugin {
!toPath.startsWith("github4s/BuildInfo")
}
}
) ++ shellPromptSettings ++ sharedScoverageSettings(70d)
)
}
20 changes: 12 additions & 8 deletions project/plugins.sbt
@@ -1,8 +1,12 @@
addSbtPlugin("com.47deg" % "sbt-org-policies" % "0.13.3")
addSbtPlugin("com.47deg" % "sbt-microsites" % "1.1.5")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.1.5")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.3.2")
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.11")
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.2")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0")
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.2")
addSbtPlugin("com.47deg" % "sbt-microsites" % "1.1.5")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.3.2")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.1.5")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.4.0")
addSbtPlugin("com.alejandrohdezma" %% "sbt-github" % "0.6.0")
addSbtPlugin("com.alejandrohdezma" % "sbt-github-header" % "0.6.0")
addSbtPlugin("com.alejandrohdezma" % "sbt-github-mdoc" % "0.6.0")
addSbtPlugin("com.alejandrohdezma" % "sbt-mdoc-toc" % "0.2")
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.11")
Binary file removed secret_key.asc.enc
Binary file not shown.
1 change: 0 additions & 1 deletion version.sbt

This file was deleted.

0 comments on commit dc18de3

Please sign in to comment.