Skip to content

Releases: codeka/carrot

2.4.5

22 May 17:57
Compare
Choose a tag to compare

For Issue #38, added an elvis operator. See the docs for details.

As with previous releases, the recommended approach for using Carrot is via Maven or Gradle:

With Maven:

<dependency>
  <groupId>au.com.codeka</groupId>
  <artifactId>carrot</artifactId>
  <version>2.4.5</version>
</dependency>

With Gradle:

implementation 'au.com.codeka:carrot:2.4.5'

2.4.4

09 Apr 21:17
Compare
Choose a tag to compare

Mostly just some internal cleanups. The one user-visible change is I removed a warning when an {% extends %} tag includes whitespace text.

As with previous releases, the recommended approach for using Carrot is via Maven or Gradle:

With Maven:

<dependency>
  <groupId>au.com.codeka</groupId>
  <artifactId>carrot</artifactId>
  <version>2.4.4</version>
</dependency>

With Gradle:

implementation 'au.com.codeka:carrot:2.4.4'

2.4.3

09 Jan 05:40
Compare
Choose a tag to compare

Two minor enhancements in this release:

Issue #32 String concatentation. Now you can do things like:

{% set a = "foo" %}
{% set b = "bar" %}
{{ a + b }}

Issue #37 Escaping Java variables names. Normally, all identifiers in Carrot are Java identifiers (because we typically expect you to be querying Java objects). But if not and you want some otherwise disallowed characters in your set variables, for example, you can:

{{ my\-var }}

Will output the contents of variable "my-var".

As with previous releases, the recommended approach for using Carrot is via Maven or Gradle:

With Maven:

<dependency>
  <groupId>au.com.codeka</groupId>
  <artifactId>carrot</artifactId>
  <version>2.4.3</version>
</dependency>

With Gradle:

compile 'au.com.codeka:carrot:2.4.3'

v2.4.2

30 Nov 22:04
Compare
Choose a tag to compare

This release adds a new type of operator, the ternary operator. See the documentation for more, but now you can do something like:

{{ foo == 0 ? "zero" : foo }}

Just like you would in normal Java.

As with previous releases, the recommended approach for using Carrot is via Maven or Gradle:

With Maven:

<dependency>
  <groupId>au.com.codeka</groupId>
  <artifactId>carrot</artifactId>
  <version>2.4.2</version>
</dependency>

With Gradle:

compile 'au.com.codeka:carrot:2.4.2'

v2.4.1

03 Oct 15:03
Compare
Choose a tag to compare

This is a minor bugfix release. There was one new addition, however.

  • You can pass values to an {% include %} tag (see the documentation)
  • Fixed handling of null values
  • Don't swallow } or { at the very end of the input

As with previous releases, the recommended approach for using Carrot is via Maven or Gradle:

With Maven:

<dependency>
  <groupId>au.com.codeka</groupId>
  <artifactId>carrot</artifactId>
  <version>2.4.1</version>
</dependency>

With Gradle:

compile 'au.com.codeka:carrot:2.4.1'

v2.4.0

22 Aug 12:13
Compare
Choose a tag to compare

Lots of refactoring in this release, but also some new features.

  • New {% include %} tag, for doing simple includes.
  • The CarrotEngine class is now immutable, and you can use a Builder to construct it.
  • You can use {% for key, value in map %} to iterate the key/value pairs of a map.
  • The {% set %} tag supports setting simple values, as well as blocks (via {% set name = value %}).

As with previous releases, the recommended approach for using Carrot is via Maven or Gradle:

With Maven:

<dependency>
  <groupId>au.com.codeka</groupId>
  <artifactId>carrot</artifactId>
  <version>2.4.0</version>
</dependency>

With Gradle:

compile 'au.com.codeka:carrot:2.4.0'

v2.3.0

22 Aug 11:39
Compare
Choose a tag to compare

Maintenance release, with two main changes:

  • A dedicated Bindings interface, so bindings can be implemented from any class, not just a map.
  • Android support by reverting some features to Java 7

As with previous releases, the recommended approach for using Carrot is via Maven or Gradle:

With Maven:

<dependency>
  <groupId>au.com.codeka</groupId>
  <artifactId>carrot</artifactId>
  <version>2.3.0</version>
</dependency>

With Gradle:

compile 'au.com.codeka:carrot:2.3.0'

v2.2.0

15 Mar 12:57
Compare
Choose a tag to compare

Features this release:

  • Set tag
  • Proper HTML-escaping, and some helpers to work with HTML-escaping.

As with previous releases, the recommended approach for using Carrot is via Maven or Gradle:

With Maven:

<dependency>
  <groupId>au.com.codeka</groupId>
  <artifactId>carrot</artifactId>
  <version>2.2.0</version>
</dependency>

With Gradle:

compile 'au.com.codeka:carrot:2.2.0'

v2.1.0

15 Mar 10:29
Compare
Choose a tag to compare

This is the first release published here on GitHub, for complete documentation see here.