Skip to content

Commit

Permalink
Merge pull request #6371 from eed3si9n/wip/bintray_less
Browse files Browse the repository at this point in the history
[1.4.x] Drop Bintray from release
  • Loading branch information
eed3si9n authored Mar 7, 2021
2 parents 0641643 + 0ec6fbb commit a417fe3
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 89 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ npm-debug.log
.bloop
.metals
.bsp/
/project/metals.sbt
metals.sbt
77 changes: 37 additions & 40 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import java.nio.file.{ Files, Path => JPath }

import scala.util.Try

// ThisBuild settings take lower precedence,
// but can be shared across the multi projects.
ThisBuild / version := {
val v = "1.4.3-SNAPSHOT"
nightlyVersion.getOrElse(v)
Expand All @@ -16,6 +18,30 @@ ThisBuild / scalafmtOnCompile := !(Global / insideCI).value
ThisBuild / Test / scalafmtOnCompile := !(Global / insideCI).value
ThisBuild / turbo := true
ThisBuild / usePipelining := false // !(Global / insideCI).value
ThisBuild / organization := "org.scala-sbt"
ThisBuild / description := "sbt is an interactive build tool"
ThisBuild / licenses := List("Apache-2.0" -> url("https://github.com/sbt/sbt/blob/develop/LICENSE"))
ThisBuild / javacOptions ++= Seq("-source", "1.8", "-target", "1.8")
ThisBuild / Compile / doc / javacOptions := Nil
ThisBuild / developers := List(
Developer("harrah", "Mark Harrah", "@harrah", url("https://github.com/harrah")),
Developer("eed3si9n", "Eugene Yokota", "@eed3si9n", url("https://github.com/eed3si9n")),
Developer("jsuereth", "Josh Suereth", "@jsuereth", url("https://github.com/jsuereth")),
Developer("dwijnand", "Dale Wijnand", "@dwijnand", url("https://github.com/dwijnand")),
Developer("eatkins", "Ethan Atkins", "@eatkins", url("https://github.com/eatkins")),
Developer(
"gkossakowski",
"Grzegorz Kossakowski",
"@gkossakowski",
url("https://github.com/gkossakowski")
),
Developer("Duhemm", "Martin Duhem", "@Duhemm", url("https://github.com/Duhemm"))
)
ThisBuild / homepage := Some(url("https://github.com/sbt/sbt"))
ThisBuild / scmInfo := Some(
ScmInfo(url("https://github.com/sbt/sbt"), "git@github.com:sbt/sbt.git")
)
ThisBuild / resolvers += Resolver.mavenLocal

val excludeLint = SettingKey[Set[Def.KeyedInitialize[_]]]("excludeLintKeys")
Global / excludeLint := (Global / excludeLint).?.value.getOrElse(Set.empty)
Expand All @@ -24,37 +50,6 @@ Global / excludeLint += whitesourceIgnoredScopes
Global / excludeLint += scriptedBufferLog
Global / excludeLint += checkPluginCross

// ThisBuild settings take lower precedence,
// but can be shared across the multi projects.
def buildLevelSettings: Seq[Setting[_]] =
inThisBuild(
Seq(
organization := "org.scala-sbt",
description := "sbt is an interactive build tool",
bintrayPackage := sys.env.get("BINTRAY_PACKAGE").getOrElse("sbt"),
licenses := List("Apache-2.0" -> url("https://github.com/sbt/sbt/blob/develop/LICENSE")),
javacOptions ++= Seq("-source", "1.8", "-target", "1.8"),
Compile / doc / javacOptions := Nil,
developers := List(
Developer("harrah", "Mark Harrah", "@harrah", url("https://github.com/harrah")),
Developer("eed3si9n", "Eugene Yokota", "@eed3si9n", url("https://github.com/eed3si9n")),
Developer("jsuereth", "Josh Suereth", "@jsuereth", url("https://github.com/jsuereth")),
Developer("dwijnand", "Dale Wijnand", "@dwijnand", url("https://github.com/dwijnand")),
Developer("eatkins", "Ethan Atkins", "@eatkins", url("https://github.com/eatkins")),
Developer(
"gkossakowski",
"Grzegorz Kossakowski",
"@gkossakowski",
url("https://github.com/gkossakowski")
),
Developer("Duhemm", "Martin Duhem", "@Duhemm", url("https://github.com/Duhemm"))
),
homepage := Some(url("https://github.com/sbt/sbt")),
scmInfo := Some(ScmInfo(url("https://github.com/sbt/sbt"), "git@github.com:sbt/sbt.git")),
resolvers += Resolver.mavenLocal,
)
)

def commonBaseSettings: Seq[Setting[_]] = Def.settings(
headerLicense := Some(
HeaderLicense.Custom(
Expand All @@ -69,7 +64,6 @@ def commonBaseSettings: Seq[Setting[_]] = Def.settings(
componentID := None,
resolvers += Resolver.typesafeIvyRepo("releases").withName("typesafe-sbt-build-ivy-releases"),
resolvers += Resolver.sonatypeRepo("snapshots"),
resolvers += "bintray-sbt-maven-releases" at "https://dl.bintray.com/sbt/maven-releases/",
resolvers += Resolver.url(
"bintray-scala-hedgehog",
url("https://dl.bintray.com/hedgehogqa/scala-hedgehog")
Expand Down Expand Up @@ -113,7 +107,7 @@ def utilCommonSettings: Seq[Setting[_]] =

def minimalSettings: Seq[Setting[_]] =
commonSettings ++ customCommands ++
publishPomSettings ++ Release.javaVersionCheckSettings
publishPomSettings

def baseSettings: Seq[Setting[_]] =
minimalSettings ++ Seq(projectComponent) ++ baseScalacOptions ++ Licensed.settings
Expand Down Expand Up @@ -170,7 +164,6 @@ lazy val sbtRoot: Project = (project in file("."))
.enablePlugins(ScriptedPlugin) // , SiteScaladocPlugin, GhpagesPlugin)
.aggregate(nonRoots: _*)
.settings(
buildLevelSettings,
minimalSettings,
onLoadMessage := {
val version = sys.props("java.specification.version")
Expand Down Expand Up @@ -225,21 +218,17 @@ lazy val sbtRoot: Project = (project in file("."))
// This is used to configure an sbt-launcher for this version of sbt.
lazy val bundledLauncherProj =
(project in file("launch"))
.enablePlugins(SbtLauncherPlugin)
.settings(
minimalSettings,
inConfig(Compile)(Transform.configSettings),
Release.launcherSettings(sbtLaunchJar)
)
.enablePlugins(SbtLauncherPlugin)
.settings(
name := "sbt-launch",
moduleName := "sbt-launch",
description := "sbt application launcher",
autoScalaLibrary := false,
crossPaths := false,
// mimaSettings, // TODO: Configure MiMa, deal with Proguard
publish := Release.deployLauncher.value,
publishLauncher := Release.deployLauncher.value,
packageBin in Compile := sbtLaunchJar.value,
mimaSettings,
mimaPreviousArtifacts := Set()
Expand Down Expand Up @@ -1434,7 +1423,6 @@ def otherRootSettings =
publishLocalBinAll := {
val _ = (Compile / publishLocalBin).all(scriptedProjects).value
},
aggregate in bintrayRelease := false,
) ++ inConfig(Scripted.RepoOverrideTest)(
Seq(
scriptedLaunchOpts := List(
Expand Down Expand Up @@ -1534,6 +1522,15 @@ def customCommands: Seq[Setting[_]] = Seq(
},
)

ThisBuild / pomIncludeRepository := { _ =>
false
}
ThisBuild / publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value) Some("snapshots" at nexus + "content/repositories/snapshots")
else Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
ThisBuild / publishMavenStyle := true
ThisBuild / whitesourceProduct := "Lightbend Reactive Platform"
ThisBuild / whitesourceAggregateProjectName := {
// note this can get detached on tag build etc
Expand Down
12 changes: 1 addition & 11 deletions project/HouseRulesPlugin.scala
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
import sbt._
import Keys._
import bintray.BintrayPlugin
import bintray.BintrayPlugin.autoImport._

object HouseRulesPlugin extends AutoPlugin {
override def requires = plugins.JvmPlugin && BintrayPlugin
override def requires = plugins.JvmPlugin
override def trigger = allRequirements

override def buildSettings: Seq[Def.Setting[_]] = baseBuildSettings
override def projectSettings: Seq[Def.Setting[_]] = baseSettings

lazy val baseBuildSettings: Seq[Def.Setting[_]] = Seq(
bintrayOrganization := Some("sbt"),
bintrayRepository := sys.env.get("BINTRAY_REPOSITORY").getOrElse("maven-releases"),
)

lazy val baseSettings: Seq[Def.Setting[_]] = Seq(
bintrayPackage := (ThisBuild / bintrayPackage).value,
bintrayRepository := (ThisBuild / bintrayRepository).value,
scalacOptions ++= Seq("-encoding", "utf8"),
scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked", "-Xlint"),
scalacOptions += "-language:higherKinds",
Expand Down
34 changes: 0 additions & 34 deletions project/Release.scala

This file was deleted.

2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.4.5
sbt.version=1.4.7
3 changes: 1 addition & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ ThisBuild / useCoursier := false
scalacOptions ++= Seq("-feature", "-language:postfixOps", "-Ywarn-unused:_,-imports")

addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.0.0")
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.6")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.0")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.3.0")
addSbtPlugin("org.scala-sbt" % "sbt-contraband" % "0.5.0")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "3.0.2")
Expand Down

0 comments on commit a417fe3

Please # to comment.