FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Update build settings to use latest version of sbt and plugins by xerial · Pull Request #552 · msgpack/msgpack-java · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .md  (1) .properties  (1) .sbt  (3) No extension  (1) dotfile  (1) All 5 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
1 change: 1 addition & 0 deletions .gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ lib
.idea
atlassian-ide-plugin.xml
.idea/copyright/msgpack.xml
.bsp
4 changes: 2 additions & 2 deletions README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ Here is a list of sbt commands for daily development:

> release # Run the release procedure (set a new version, run tests, upload artifacts, then deploy to Sonatype)

# If you need to perform the individual release steps manually, use the following commands:
# [optional] When you need to perform the individual release steps manually, use the following commands:
> publishSigned # Publish GPG signed artifacts to the Sonatype repository
> sonatypeRelease # Publish to the Maven Central (It will be synched within less than 4 hours)
> sonatypeBundleRelease # Publish to the Maven Central (It will be synched within less than 4 hours)
```

For publishing to Maven central, msgpack-java uses [sbt-sonatype](https://github.com/xerial/sbt-sonatype) plugin. Set Sonatype account information (user name and password) in the global sbt settings. To protect your password, never include this file in your project.
Expand Down
36 changes: 17 additions & 19 deletions build.sbt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
import ReleaseTransformations._

Global / onChangedBuildSource := ReloadOnSourceChanges

// For performance testing, ensure each test run one-by-one
Global / concurrentRestrictions := Seq(
Tags.limit(Tags.Test, 1)
)

val buildSettings = Seq[Setting[_]](
organization := "org.msgpack",
organizationName := "MessagePack",
organizationHomepage := Some(new URL("http://msgpack.org/")),
description := "MessagePack for Java",
scalaVersion := "2.12.8",
logBuffered in Test := false,
scalaVersion := "2.12.13",
Test / logBuffered := false,
// msgpack-java should be a pure-java library, so remove Scala specific configurations
autoScalaLibrary := false,
crossPaths := false,
// For performance testing, ensure each test run one-by-one
concurrentRestrictions in Global := Seq(
Tags.limit(Tags.Test, 1)
),
// JVM options for building
scalacOptions ++= Seq("-encoding", "UTF-8", "-deprecation", "-unchecked", "-feature"),
javaOptions in Test ++= Seq("-ea"),
Test / javaOptions ++= Seq("-ea"),
javacOptions ++= Seq("-source", "1.7", "-target", "1.7"),
javacOptions in (Compile, compile) ++= Seq("-encoding", "UTF-8", "-Xlint:unchecked", "-Xlint:deprecation"),
Compile / compile / javacOptions ++= Seq("-encoding", "UTF-8", "-Xlint:unchecked", "-Xlint:deprecation"),
// Use lenient validation mode when generating Javadoc (for Java8)
javacOptions in doc := {
doc / javacOptions := {
val opts = Seq("-source", "1.7")
if (scala.util.Properties.isJavaAtLeast("1.8")) {
opts ++ Seq("-Xdoclint:none")
Expand All @@ -29,7 +32,7 @@ val buildSettings = Seq[Setting[_]](
}
},
// Release settings
releaseTagName := { (version in ThisBuild).value },
releaseTagName := { (ThisBuild / version).value },
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
Expand All @@ -39,26 +42,21 @@ val buildSettings = Seq[Setting[_]](
commitReleaseVersion,
tagRelease,
releaseStepCommand("publishSigned"),
releaseStepCommand("sonatypeBundleRelease"),
setNextVersion,
commitNextVersion,
releaseStepCommand("sonatypeReleaseAll"),
pushChanges
),
// Add sonatype repository settings
publishTo := Some(
if (isSnapshot.value)
Opts.resolver.sonatypeSnapshots
else
Opts.resolver.sonatypeStaging
),
publishTo := sonatypePublishToBundle.value,
// Find bugs
findbugsReportType := Some(FindbugsReport.FancyHtml),
findbugsReportPath := Some(crossTarget.value / "findbugs" / "report.html"),
// Style check config: (sbt-jchekcstyle)
jcheckStyleConfig := "facebook",
// Run jcheckstyle both for main and test codes
(compile in Compile) := ((compile in Compile) dependsOn (jcheckStyle in Compile)).value,
(compile in Test) := ((compile in Test) dependsOn (jcheckStyle in Test)).value
Compile / compile := ((Compile / compile) dependsOn (Compile / jcheckStyle)).value,
Test / compile := ((Test / compile) dependsOn (Test / jcheckStyle)).value
)

val junitInterface = "com.novocode" % "junit-interface" % "0.11" % "test"
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
sbt.version=1.2.8
sbt.version=1.5.2

19 changes: 10 additions & 9 deletions project/plugins.sbt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.11")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.5")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.2")
addSbtPlugin("com.github.sbt" % "sbt-findbugs" % "2.0.0")
addSbtPlugin("com.github.sbt" % "sbt-jacoco" % "3.0.3")
addSbtPlugin("org.xerial.sbt" % "sbt-jcheckstyle" % "0.2.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.9.5")
addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.3")
addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "1.5.1")
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.0.15")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.7")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
addSbtPlugin("com.github.sbt" % "sbt-findbugs" % "2.0.0")
// TODO: Fixes jacoco error:
// java.lang.NoClassDefFoundError: Could not initialize class org.jacoco.core.internal.flow.ClassProbesAdapter
//addSbtPlugin("com.github.sbt" % "sbt-jacoco" % "3.3.0")
addSbtPlugin("org.xerial.sbt" % "sbt-jcheckstyle" % "0.2.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.9.5")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2")

scalacOptions ++= Seq("-deprecation", "-feature")
21 changes: 14 additions & 7 deletions sbt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@

set -o pipefail

declare -r sbt_release_version="1.3.13"
declare -r sbt_unreleased_version="1.4.0-M1"
declare -r sbt_release_version="1.5.1"
declare -r sbt_unreleased_version="1.5.1"

declare -r latest_213="2.13.3"
declare -r latest_212="2.12.12"
declare -r latest_213="2.13.5"
declare -r latest_212="2.12.13"
declare -r latest_211="2.11.12"
declare -r latest_210="2.10.7"
declare -r latest_29="2.9.3"
Expand All @@ -48,7 +48,7 @@ declare -r buildProps="project/build.properties"

declare -r sbt_launch_ivy_release_repo="https://repo.typesafe.com/typesafe/ivy-releases"
declare -r sbt_launch_ivy_snapshot_repo="https://repo.scala-sbt.org/scalasbt/ivy-snapshots"
declare -r sbt_launch_mvn_release_repo="https://repo.scala-sbt.org/scalasbt/maven-releases"
declare -r sbt_launch_mvn_release_repo="https://repo1.maven.org/maven2"
declare -r sbt_launch_mvn_snapshot_repo="https://repo.scala-sbt.org/scalasbt/maven-snapshots"

declare -r default_jvm_opts_common="-Xms512m -Xss2m -XX:MaxInlineLevel=18"
Expand Down Expand Up @@ -247,11 +247,18 @@ java_version() {
echo "$version"
}

is_apple_silicon() { [[ "$(uname -s)" == "Darwin" && "$(uname -m)" == "arm64" ]]; }

# MaxPermSize critical on pre-8 JVMs but incurs noisy warning on 8+
default_jvm_opts() {
local -r v="$(java_version)"
if [[ $v -ge 10 ]]; then
echo "$default_jvm_opts_common -XX:+UnlockExperimentalVMOptions -XX:+UseJVMCICompiler"
if is_apple_silicon; then
# As of Dec 2020, JVM for Apple Silicon (M1) doesn't support JVMCI
echo "$default_jvm_opts_common"
else
echo "$default_jvm_opts_common -XX:+UnlockExperimentalVMOptions -XX:+UseJVMCICompiler"
fi
elif [[ $v -ge 8 ]]; then
echo "$default_jvm_opts_common"
else
Expand Down Expand Up @@ -471,7 +478,7 @@ process_args() {
-trace) require_arg integer "$1" "$2" && trace_level="$2" && shift 2 ;;
-debug-inc) addJava "-Dxsbt.inc.debug=true" && shift ;;

-no-colors) addJava "-Dsbt.log.noformat=true" && shift ;;
-no-colors) addJava "-Dsbt.log.noformat=true" && addJava "-Dsbt.color=false" && shift ;;
-sbt-create) sbt_create=true && shift ;;
-sbt-dir) require_arg path "$1" "$2" && sbt_dir="$2" && shift 2 ;;
-sbt-boot) require_arg path "$1" "$2" && addJava "-Dsbt.boot.directory=$2" && shift 2 ;;
Expand Down
2 changes: 1 addition & 1 deletion version.sbt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "0.8.23-SNAPSHOT"
ThisBuild / version := "0.8.23-SNAPSHOT"

Back | FazBrowse Home | New Git URL