Skip to content

spinnaker/spinnaker-gradle-project

Folders and files

NameName
Last commit message
Last commit date
Oct 30, 2024
Jun 16, 2023
Jun 16, 2023
Dec 1, 2023
Jan 25, 2020
Apr 18, 2020
Aug 21, 2014
Apr 16, 2019
Jun 8, 2022
Nov 30, 2023
Apr 29, 2019
Jun 16, 2023
Jun 16, 2023
Apr 18, 2020

spinnaker-gradle-project

Build Status

Build conventions for spinnaker Gradle projects

Usage

Applying the Plugin

To include, add the following to your build.gradle

plugins {
  id 'io.spinnaker.project' version "$spinnakerGradleVersion" apply false
}

allprojects {
  apply plugin: 'io.spinnaker.project'
}

Extensions Provided

spinnaker

The spinnaker extension exposes dependency resolution utilities. By default the artifact 'com.netflix.spinnaker:spinnaker-dependencies:latest.release@yml' is resolved and used as common dependency configuration (this can be overridden by setting dependenciesYaml or dependenciesVersion on the spinnaker extension)

The dependency yaml format supports three sections:

  • versions - a map of name to version string
  • dependencies - a map of name to Gradle dependency notation, supporting Groovy simple templating
  • groups - a map of name to a map of configuration name to a list of dependency names

Usage looks like:

dependencies {
  spinnaker.group("bootWeb")
  compile spinnaker.dependency("bootActuator")
  compile "org.springframework:spring-context:${spinnaker.version('spring')}"
}

Overriding resolved dependencies

Values from the ExtraPropertiesExtension override values read from the dependenciesYaml.

For example this:

ext {
  versions = [
    kork : '1.70.0'
  ]
}

Would pin the version of the kork library to 1.70.0 regardless of what version is defined in the dependency file.