mdedetrich opened a new pull request, #145:
URL: https://github.com/apache/incubator-pekko-grpc/pull/145

   So I can confirm that the reason behind the gradle plugin not building 
correctly is that it wasn't setting the version correctly (see 
https://github.com/apache/incubator-pekko-grpc/actions/runs/5786987516/job/15682898907).
 After spending the last few hours digging around to figure out how gradle 
publishing works I came up with an elegant solution that also simplifies whats 
going on.
   
   Currently the gradle version is manually derived from executing git and 
parsing the results. Not only is this quite brittle (the sed regex would fail 
once we start releasing RC's/milestones for this same reason 
https://github.com/apache/incubator-pekko-http/issues/293#issuecomment-1666861760)
 but it also requires quite a bit of boilerplate because every single time we 
need to publish the gradle plugin (whether it is locally, as a snapshot or in 
production) we have to repeat the boilerplate of deriving the version from git 
tag and placing it in `~/.version`.
   
   So the best way to solve is this issue is why don't we just get the version 
directly from sbt? sbt is the source of truth when it comes to versions, its 
already doing the job deriving the version from a git tag via sbt-dynver and if 
the gradle plugin was hypothetically written as an sbt build it would be using 
the same version anyways.
   
   If you want to verify this PR locally, you can just run `./gradlew 
properties -q | awk '/^version:/ {print $2}'`, `./gradlew properties` is the 
source of truth for what is the final calculated version.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to