Skip to content

Commit

Permalink
fix(snapi-truffle)(cd): publish tasks shoudl depend on runJavaAnnotat…
Browse files Browse the repository at this point in the history
…ionProcessor (#335)

We make sure to run `runJavaAnnotationProcessor` task before
compiling/publishing
  • Loading branch information
datYori authored Jan 22, 2024
1 parent bfbe75b commit 4c7c8ff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions snapi-truffle/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import Dependencies.*

import scala.sys.process.Process

import com.jsuereth.sbtpgp.PgpKeys.{publishSigned}

ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org"

sonatypeRepository := "https://s01.oss.sonatype.org/service/local"
Expand Down Expand Up @@ -193,8 +195,6 @@ resolvers += Resolver.sonatypeRepo("releases")
// Publish settings
Test / publishArtifact := true
Compile / packageSrc / publishArtifact := true
// When doing publishLocal, also publish to the local maven repository.
publishLocal := (publishLocal dependsOn publishM2).value

// Dependencies
libraryDependencies ++= Seq(
Expand All @@ -220,3 +220,7 @@ outputVersion := {
}

Compile / compile := ((Compile / compile) dependsOn outputVersion).value

publishLocal := (publishLocal dependsOn Def.sequential(runJavaAnnotationProcessor, outputVersion, publishM2)).value
publish := (publish dependsOn Def.sequential(runJavaAnnotationProcessor, outputVersion)).value
publishSigned := (publishSigned dependsOn Def.sequential(runJavaAnnotationProcessor, outputVersion)).value
2 changes: 1 addition & 1 deletion snapi-truffle/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ yes | sdk install java 21.0.1-graalce || true
sdk use java 21.0.1-graalce

cd "$SCRIPT_HOME"
sbt clean runJavaAnnotationProcessor publishLocal
sbt clean publishLocal

0 comments on commit 4c7c8ff

Please sign in to comment.