SvnAdd.md

November 19, 2016 ยท View on GitHub

SvnAdd task

Schedules files (within an SVN working copy) to be added to version control.

Configuration

PropertyDescriptionDefault value
addFiles and directories to be added by this task
recursiveAlso add items in subdirectoriesfalse
ignoreErrorsContinue the build if the specified paths conflict with the WC status (can't add)false
usernameThe SVN username - leave empty if no authentication is required$project.svntools.username
passwordThe SVN password - leave empty if no authentication is required$project.svntools.password

Example

This Gradle script creates a svn.properties file that contains the SVN URL and revision of the buildfile, and adds it to the JAR artifact:

apply plugin: "at.bxm.svntools"

version = "1.0-SNAPSHOT"
String previousVersion = "0.1"

task createChangelog() {
  file("changelog_${project.version}.txt").text = "list of changes for this release..."
  
  file("changelog_${previousVersion}.txt")
}

task addChangelog(type: at.bxm.gradleplugins.svntools.tasks.SvnAdd, dependsOn: createChangelog) {
  add "changelog_${project.version}.txt"
}