Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assorted build updates #274

Merged
merged 8 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Loading