Ruby and Java Stack Level

While coding for an algorithmic problem, I discovered that Ruby’s stack level is much shallower than Java. This caused a recursive DFS solution written in Ruby failed due to stack level too deep (SystemStackError), while the same code written in Java passed. Whether recursion or tail recursion should be used is not the point of this post. This post is to find out what the max stack level is and what limits the stack level.

»

Gradle Offline Build

The Problem

In a recent project, I have to do Gradle build on a CI server in a very constrained environment. The constraints are:

  • NO Internet connection
  • NO Gradle installed
  • NO local Maven repo

The obvious problem that these constraints cause is that the project can’t build because:

  • Gradle is not installed
  • Can’t get dependencies

The Solution

This solution will achieve the following:

  1. Use Gradle to build
  2. Use Gradle to manage dependencies

Let’s solve the problem step by step.

»