mxenabled/vogue


Helping Gradle projects stay up to date with the latest and greatest dependencies.

Download


Step 1. Add the JitPack repository to your build file

Add it in your root settings.gradle at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url 'https://jitpack.io' }
		}
	}

Add it in your settings.gradle.kts at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url = uri("https://jitpack.io") }
		}
	}

Add to pom.xml

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Add it in your build.sbt at the end of resolvers:

 
    resolvers += "jitpack" at "https://jitpack.io"
        
    

Add it in your project.clj at the end of repositories:

 
    :repositories [["jitpack" "https://jitpack.io"]]
        
    
	dependencies {
		implementation 'com.github.mxenabled:vogue:1.0.3'
	}
	dependencies {
		implementation("com.github.mxenabled:vogue:1.0.3")
	}
	<dependency>
	    <groupId>com.github.mxenabled</groupId>
	    <artifactId>vogue</artifactId>
	    <version>1.0.3</version>
	</dependency>

                            
    libraryDependencies += "com.github.mxenabled" % "vogue" % "1.0.3"
        
        

                            
    :dependencies [[com.github.mxenabled/vogue "1.0.3"]]
        
        

Readme


Release

Vogue

Keep your dependencies fashionably up-to-date.

What is this?

Vogue is a gradle plugin that reads and processes reports generated by the gradle-versions-plugin. This is intended to be used as a "gatekeeper" to prevent dependencies from getting too far out of date while also providing utilities to easily upgrade outdated dependencies.

Installing

Gradle

<!-- x-release-please-start-version -->

build.gradle:

plugins {
  id: "com.github.mxenabled.vogue" version "1.0.3"
}

allprojects {
    repositories {
        ...
        maven { url "https://jitpack.io" }
    }
}

settings.gradle:

pluginManagement {
  repositories {
    ...
    maven { url "https://jitpack.io" }
  }
}
<!-- x-release-please-end -->

Configuration

Example configuration with default values:

In the build.gradle

vogue {
  excludePreReleaseVersions = true // Set to false to include #.#.#.pre versions in the report.
  dependencyUpdatesOutputDir = "build/dependencyUpdates" // Where the report generated by the `gradle-versions-plugin` is located.
}

Usage

Scan the project dependencies and produce a report of available upgrades.

$ ./gradlew vogueReport

Configuring Rules

Rules can be configured in a version-controlled .vogue.yml file located at the root of the project. If a rule is violated, the report will return a failing status code (which can be used in a CI/CD pipeline).

Global Defaults

Global default rules can be configured via the following syntax:

defaultRules:
  major:
    maxDiff: 1 # Every dependency can be at most one major version out-of-date, otherwise an error will be produced.
  minor:
    requireLatest: true # Every dependency must be on the latest minor version.
  patch:
    requireLatest: true # Every dependency must be on the latest patch version.

If no package-specific rule has been configured for a given dependency, the default rules will be used.

Package Rules

This syntax defines a rule for any com.github.mxenabled.* dependency and requires that you are always on the most current version.

packageRules:
  -
    package: "com.github.mxenabled.*"
    rules:
      major:
        requireLatest: true
      minor:
        requireLatest: true
      patch:
        requireLatest: true

Suppressing Violations

Occasionally you might need to suppress a dependency violation so that your CI/CD pipeline will pass (if you have Vogue configured as a required step).

Running vogueSuppress will walk you through your dependency violations and allow you to suppress errors for a given time range (3 months max).

$ ./gradlew vogueSuppress

Deploying Locally

To create a local build of vogue use

$ ./gradlew clean publishToMavenLocal

This will create a local build in your local maven repository that you can then reference in other services.

On OXS using gradle the default location for the local maven repository is

~/.m2/repository/com/mx/vogue/