Skip to content

Commit

Permalink
Merge pull request #274 from armanbilge/topic/build-updates
Browse files Browse the repository at this point in the history
Assorted build updates
  • Loading branch information
armanbilge authored Feb 26, 2024
2 parents e8cc63a + 58aa71d commit 975bc75
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 28 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
- 2.13.10
- 2.13.11
- 2.13.12
- 2.13.13
java: [temurin@8]
runs-on: ${{ matrix.os }}
steps:
Expand Down
27 changes: 5 additions & 22 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import ReleaseTransformations._

inThisBuild {
Seq(
resolvers in Global += "scala-integration" at "https://scala-ci.typesafe.com/artifactory/scala-integration/",
Expand Down Expand Up @@ -31,13 +29,12 @@ inThisBuild {
"2.13.10",
"2.13.11",
"2.13.12",
"2.13.13",
),
organization := "org.typelevel",
licenses += ("MIT", url("http://opensource.org/licenses/MIT")),
homepage := Some(url("http://github.com/typelevel/kind-projector")),
publishMavenStyle := true,
Test / publishArtifact := false,
pomIncludeRepository := Function.const(false),
pomExtra := (
<scm>
<url>git@github.com:typelevel/kind-projector.git</url>
Expand All @@ -56,20 +53,6 @@ inThisBuild {
</developer>
</developers>
),
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
publishArtifacts,
setNextVersion,
commitNextVersion,
releaseStepCommand("sonatypeReleaseAll"),
pushChanges
)
)
}

Expand Down Expand Up @@ -103,9 +86,10 @@ lazy val `kind-projector` = project
crossTarget := target.value / s"scala-${scalaVersion.value}", // workaround for https://github.com/sbt/sbt/issues/5097
crossVersion := CrossVersion.full,
crossScalaVersions := (ThisBuild / crossScalaVersions).value,
releaseCrossBuild := true,
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
publishTo := Some(if (isSnapshot.value) Opts.resolver.sonatypeSnapshots else Opts.resolver.sonatypeStaging),
publishMavenStyle := true,
sonatypeProfileName := organization.value,
publishTo := sonatypePublishToBundle.value,
sonatypeCredentialHost := "s01.oss.sonatype.org",
Compile / unmanagedSourceDirectories ++= {
(Compile / unmanagedSourceDirectories).value.flatMap { dir =>
val sv = scalaVersion.value
Expand All @@ -124,7 +108,6 @@ lazy val `kind-projector` = project
"-deprecation",
"-unchecked",
),
Compile / compile / scalacOptions += "-Xfatal-warnings",
Test / scalacOptions ++= {
val jar = (Compile / packageBin).value
Seq("-Yrangepos", s"-Xplugin:${jar.getAbsolutePath}", s"-Jdummy=${jar.lastModified}") // ensures recompile
Expand Down
3 changes: 1 addition & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0")
addSbtPlugin("io.crashbox" % "sbt-gpg" % "0.2.1")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.10")
addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.19.0")
4 changes: 2 additions & 2 deletions scripts/back-publish
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e

usage() {
echo "Usage: $0 [-t <tag>] [-s <scala_version>]" 1>&2
echo "Example: $0 -t v0.13.2 -s 2.13.8"
echo "Example: $0 -t v0.13.3 -s 2.13.14"
}

while getopts "s:t:" OPTION; do
Expand Down Expand Up @@ -34,4 +34,4 @@ if [ "$JAVA_VERSION" -ne 8 ]; then
fi

git checkout $TAG
sbt ++$SCALA_VERSION 'set sonatypeCredentialHost := "s01.oss.sonatype.org"' 'set `kind-projector`/sonatypeCredentialHost := "s01.oss.sonatype.org"' 'set publishTo := Some(MavenRepository("sonatype-s01-releases", "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2"))' clean test publishSigned sonatypeRelease
sbt ++$SCALA_VERSION clean test publish sonatypeBundleRelease
2 changes: 1 addition & 1 deletion src/main/scala/KindProjector.scala
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ class KindRewriter(plugin: Plugin, val global: Global)
// if we've already handled this tree, let's just use the
// previous result and be done now!
treeCache.get(tree) match {
case Some(result) => return result
case Some(cachedResult) => return cachedResult
case None => ()
}

Expand Down
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ThisBuild / version := "0.13.3-SNAPSHOT"
ThisBuild / version := "0.13.4-SNAPSHOT"

0 comments on commit 975bc75

Please sign in to comment.