Posts

Re-publishng artifacts in SBT

SBT does not allow re-publishing artifacts with the same version unless it is a snapshot version. A snapshot version ends with the -SNAPSHOT suffix, such as 0.1.0-SNAPSHOT. Re-publishing, which involves running the sbt publish or sbt publishLocal command for the second time or more, is standard, especially for snapshot versions. If you attempt to re-publish a non-snapshot version, SBT will warn you with the following message and not publish the artifact. More ...

Unequal Bs

Who can tell me what is the result of this expression?

"ะ’" == "B"

You can use a repl of your choice, say Scala or Python, to evaluate the expression. Be prepared with an explanation for the result you see ๐Ÿ˜‰

Article hero image

How I SBT - VII

This post is the final part of the series on SBT. I hope I covered everything needed to break the ice and change the perspective on SBT. I have touched on most ingredients you need to write a decent fully-functional build definition. But there is a lot more to SBT.

In this post, I will discuss some things, nifty and a la carte, on SBT.

More ...

Article hero image

How I SBT - VI

I had planned to finish the series with this post. But Plugin s wouldn’t let me. I am going to show you how to write/publish a SBT project that is a Plugin, and I will show a nifty trick. It is not a trick, it is what SBT can do like a piece of pie. More ...

Article hero image

How I SBT - V

So far, we have everything we need to write the build definition for a single project. Today, we’ll see another powerful feature of SBT: Multi-module builds. More ...

Article hero image

The Interview Bluff

Recently, I had a lunch meeting with an acquaintance who shared their interview experience, particularly behavioral questions. One of the questions asked was, “Works and on time or Perfect and late?” This question sparked a debate, as the interviewer was firmly in the former camp.

Article hero image

How I SBT - IV

Previously, we discussed Plugin s. Today, let us see how to better organize build code.

Build Code Organization

Build code involves everything SBT will consume for the build

More ...

Article hero image

How I SBT - III

Previously, we discussed how to quickly write a simple build.sbt without fuss. We briefly understood how it is processed by SBT along with Settings and Tasks. We did that without having to know about the build folder structure1 et al.; until now.

Build Folder Structure

Below is the project and build folder structure. There are two things that SBT is interested in your project - build.sbt and project/ 2.

More ...

Article hero image

How I SBT - II

Previously, I showed you how to write a SBT build definition without knowing much at all. Neither did I talk about simple things like directory structure nor about advanced things like scope or axis, yet you could pretty easily write a SBT build definition for a library and setup publishing. All by writing Scala code (DSL for SBT).

Today, we are going to talk about Settings and Tasks.

More ...

Article hero image

How I SBT - I

Contrary to the unpopular opinions that it is hard and clumsy, SBT, the de facto build tool for Scala, is one of the best. Ease comes with familiarity. Unfortunately, there aren’t many beginner-friendly guides for specific scenarios. A lot of troubleshooting information is hidden in the forests of issues and public forums. This is despite the fact that SBT has excellent support for inspecting your project definition. The official documentation is like the encyclopedia that is too much to digest.