use of org.gradle.vcs.internal.spec.DirectoryRepositorySpec in project gradle by gradle.
the class SimpleVersionControlSystem method populate.
@Override
public File populate(File versionDir, VersionRef ref, VersionControlSpec spec) {
File sourceDir = ((DirectoryRepositorySpec) spec).getSourceDir();
File workingDir = new File(versionDir, sourceDir.getName());
File checkoutFlag = new File(workingDir, "checkedout");
try {
if (!checkoutFlag.exists()) {
GFileUtils.copyDirectory(sourceDir, workingDir);
checkoutFlag.createNewFile();
}
} catch (IOException e) {
throw new UncheckedIOException(e);
}
return workingDir;
}
Aggregations