package com.perforce.workshop.tjuricek.gradle
import org.gradle.api.Plugin
import org.gradle.api.Project
/**
* Adds our "startPerforce" and "stopPerforce" tasks to the project.
*/
class PerforcePlugin implements Plugin<Project> {
@Override
void apply(Project project) {
project.extensions.add("perforce", PerforcePluginExtension)
project.task('startPerforce', type:StartPerforceTask, description: "Start local p4d instance in local directory")
project.task('stopPerforce', type:StopPerforceTask, description: "Stop local p4d instance in local directory")
}
}
class PerforcePluginExtension {
/**
* The directory we cache p4 and p4d executables in
*/
def File cacheDir
/**
* The working directory for the p4d application
*/
def File workDir
/**
* The version of binaries we grab from the downloadUri
*/
def String version = "r14.1"
/**
* The root uri appends the version and architecture paths, then the
* executable name to get the download Uri.
*/
def String downloadRootUri = "http://ftp.perforce.com/perforce"
def String hostname = "localhost"
def int port = 1666
def String verbose = "server=1"
// TBD default super user created on instance
def String superUser = "super"
// TBD default super user password created on instance
def String superPassword = "superuser1A"
}