mirror of https://github.com/sbt/sbt.git
Use Bintray for nightly
This commit is contained in:
parent
f8f9ed0c67
commit
349a4134e5
50
build.sbt
50
build.sbt
|
|
@ -7,9 +7,18 @@ val _ = {
|
|||
sys.props += ("line.separator" -> "\n")
|
||||
}
|
||||
|
||||
ThisBuild / version := {
|
||||
val old = (ThisBuild / version).value
|
||||
nightlyVersion match {
|
||||
case Some(v) => v
|
||||
case _ =>
|
||||
if ((ThisBuild / isSnapshot).value) "1.4.0-SNAPSHOT"
|
||||
else old
|
||||
}
|
||||
}
|
||||
ThisBuild / versionScheme := Some("early-semver")
|
||||
ThisBuild / organization := "org.scala-sbt"
|
||||
ThisBuild / bintrayPackage := "librarymanagement"
|
||||
ThisBuild / bintrayPackage := sys.env.get("BINTRAY_PACKAGE").getOrElse("librarymanagement")
|
||||
ThisBuild / homepage := Some(url("https://github.com/sbt/librarymanagement"))
|
||||
ThisBuild / description := "Library management module for sbt"
|
||||
ThisBuild / scmInfo := {
|
||||
|
|
@ -238,11 +247,16 @@ lazy val lmCore = (project in file("core"))
|
|||
exclude[ReversedMissingMethodProblem](
|
||||
"sbt.librarymanagement.MavenRepository.allowInsecureProtocol"
|
||||
),
|
||||
exclude[IncompatibleResultTypeProblem]("sbt.librarymanagement.ResolverFunctions.validateURLRepository"),
|
||||
exclude[IncompatibleResultTypeProblem]("sbt.librarymanagement.ResolverFunctions.validateMavenRepo"),
|
||||
exclude[IncompatibleResultTypeProblem]("sbt.librarymanagement.ResolverFunctions.validateArtifact"),
|
||||
exclude[IncompatibleResultTypeProblem](
|
||||
"sbt.librarymanagement.ResolverFunctions.validateURLRepository"
|
||||
),
|
||||
exclude[IncompatibleResultTypeProblem](
|
||||
"sbt.librarymanagement.ResolverFunctions.validateMavenRepo"
|
||||
),
|
||||
exclude[IncompatibleResultTypeProblem](
|
||||
"sbt.librarymanagement.ResolverFunctions.validateArtifact"
|
||||
),
|
||||
exclude[IncompatibleResultTypeProblem]("sbt.librarymanagement.*.validateProtocol"),
|
||||
|
||||
),
|
||||
)
|
||||
.configure(addSbtIO, addSbtUtilLogging, addSbtUtilPosition, addSbtUtilCache)
|
||||
|
|
@ -366,32 +380,6 @@ def customCommands: Seq[Setting[_]] = Seq(
|
|||
}
|
||||
)
|
||||
|
||||
ThisBuild / version := {
|
||||
val old = (ThisBuild / version).value
|
||||
nightlyVersion match {
|
||||
case Some(v) => v
|
||||
case _ =>
|
||||
if ((ThisBuild / isSnapshot).value) "1.4.0-SNAPSHOT"
|
||||
else old
|
||||
}
|
||||
}
|
||||
def githubPackageRegistry: Option[Resolver] =
|
||||
sys.env.get("RELEASE_GITHUB_PACKAGE_REGISTRY") map { repo =>
|
||||
s"GitHub Package Registry ($repo)" at s"https://maven.pkg.github.com/$repo"
|
||||
}
|
||||
ThisBuild / publishTo := {
|
||||
val old = (ThisBuild / publishTo).value
|
||||
githubPackageRegistry orElse old
|
||||
}
|
||||
ThisBuild / resolvers ++= githubPackageRegistry.toList
|
||||
ThisBuild / credentials ++= {
|
||||
sys.env.get("GITHUB_TOKEN") match {
|
||||
case Some(token) =>
|
||||
List(Credentials("GitHub Package Registry", "maven.pkg.github.com", "unused", token))
|
||||
case _ => Nil
|
||||
}
|
||||
}
|
||||
|
||||
inThisBuild(
|
||||
Seq(
|
||||
whitesourceProduct := "Lightbend Reactive Platform",
|
||||
|
|
|
|||
|
|
@ -44,12 +44,12 @@ object DatatypeConfig {
|
|||
|
||||
case "sbt.librarymanagement.CrossVersion" => { _ =>
|
||||
"sbt.librarymanagement.CrossVersionFormats" ::
|
||||
"sbt.librarymanagement.DisabledFormats" ::
|
||||
"sbt.librarymanagement.BinaryFormats" ::
|
||||
"sbt.librarymanagement.ConstantFormats" ::
|
||||
"sbt.librarymanagement.PatchFormats" ::
|
||||
"sbt.librarymanagement.FullFormats" ::
|
||||
Nil
|
||||
"sbt.librarymanagement.DisabledFormats" ::
|
||||
"sbt.librarymanagement.BinaryFormats" ::
|
||||
"sbt.librarymanagement.ConstantFormats" ::
|
||||
"sbt.librarymanagement.PatchFormats" ::
|
||||
"sbt.librarymanagement.FullFormats" ::
|
||||
Nil
|
||||
}
|
||||
|
||||
// TODO: These are handled by BasicJsonProtocol, and sbt-datatype should handle them by default, imo
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
package lmbuild
|
||||
|
||||
import sbt._
|
||||
import Keys._
|
||||
import bintray.BintrayPlugin
|
||||
|
|
@ -12,7 +14,7 @@ object HouseRulesPlugin extends AutoPlugin {
|
|||
|
||||
lazy val baseBuildSettings: Seq[Def.Setting[_]] = Seq(
|
||||
bintrayOrganization := Some("sbt"),
|
||||
bintrayRepository := "maven-releases",
|
||||
bintrayRepository := sys.env.get("BINTRAY_REPOSITORY").getOrElse("maven-releases"),
|
||||
)
|
||||
|
||||
lazy val baseSettings: Seq[Def.Setting[_]] = Seq(
|
||||
|
|
|
|||
|
|
@ -16,10 +16,12 @@ object Util {
|
|||
lastCompilation.map(_.getStartTime) getOrElse 0L
|
||||
}
|
||||
|
||||
def generateVersionFile(version: String,
|
||||
dir: File,
|
||||
s: TaskStreams,
|
||||
analysis: CompileAnalysis): Seq[File] = {
|
||||
def generateVersionFile(
|
||||
version: String,
|
||||
dir: File,
|
||||
s: TaskStreams,
|
||||
analysis: CompileAnalysis
|
||||
): Seq[File] = {
|
||||
import java.util.{ Date, TimeZone }
|
||||
val formatter = new java.text.SimpleDateFormat("yyyyMMdd'T'HHmmss")
|
||||
formatter.setTimeZone(TimeZone.getTimeZone("GMT"))
|
||||
|
|
|
|||
Loading…
Reference in New Issue