Savant Build Tool: Dependencies & Build Targets

Brian Pontarelli

Savant Build Files: Define Dependencies & Build Targets

In this post we'll cover Savant build files and how to define your dependencies and build targets. First, let's set up a simple build file for a new project called HelloWorld. Here is how we define this project and its version:

project(group: "org.inversoft.savant.example", name: "HelloWorld", version: "1.0", licenses: ["ApacheV2_0"]) {
}

To define a project you need a group, name, version and a license. You can ignore the licenses definition for now, we'll cover that in a future post. The group name is usually a reverse DNS name (notice that the org is first not last) that identifies the owners of the project. The name is the project's formal name and the version is the project’s Semantic Version.

Next we can define the other libraries and frameworks that our project depends on. We place the dependencies inside the project definition and break them into groups. It looks like this:

project(group: "org.inversoft.savant.example", name: "HelloWorld", version: "1.0", licenses: ["ApacheV2_0"]) {
  dependencies {
    group(name: "compile") {
      dependency(id: "org.apache.commons:commons-collections:3.1")
    }
    group(name: "test-compile") {
      dependency(id: "org.testng:testng:6.8.7")
    }
  }
}

These dependency directives tell Savant that in order to compile our source code Savant needs to include Commons Collections version 3.1. Likewise, in order to compile our test source code, Savant will need to include TestNG version 6.8.7.

Continue reading

Tags:
Savant

Inversoft Announces the Launch of Savant

Brian Pontarelli

Savant Build ToolInversoft Launches Savant Build Tool

The Inversoft dev team is excited to announce the first preview release of the Savant build tool. Savant is written in Java and uses a Groovy DSL for the build files providing the power of the Groovy programming language for your builds.

We have been working to define the concepts of our ideal build tool for nearly a decade. By using a wide variety of other build tools including Ant, Maven, and Gradle, we have learned that dependency management, versioning and compatibility are some of the most complex problems in building software, and all of the existing build tools don’t solve these problems well. We realized that the build tool should be handling all of these concepts in the most complete way possible. To solve these problems, we adopted the Semantic Versioning standard and built Savant as a complete implementation of it.

 

Continue reading

Tags:
Savant