forked from unclebob/fitnesse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include all wiki files under version control
FitNesseRoot is used for tests on the code base. Therefore there is a chance files are added to a distribution that are not under version control. This change ensures wiki files are only added if under version control. This fixes unclebob#1112 in a different way.
- Loading branch information
Showing
5 changed files
with
46 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ indent_size = 2 | |
[*.js] | ||
indent_size = 4 | ||
|
||
[*.java] | ||
[*.{java,groovy}] | ||
indent_size = 2 | ||
|
||
[*.gradle] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,52 @@ | ||
import java.io.File; | ||
import java.util.List; | ||
import java.util.Set; | ||
import org.gradle.api.DefaultTask; | ||
import org.gradle.api.tasks.InputDirectory; | ||
import org.gradle.api.tasks.OutputFile; | ||
import org.gradle.api.tasks.Input | ||
import org.gradle.api.tasks.InputFiles | ||
import org.gradle.api.DefaultTask | ||
import org.gradle.api.tasks.OutputFile | ||
import org.gradle.api.tasks.SourceSet; | ||
import org.gradle.api.tasks.TaskAction; | ||
|
||
public class WikiFileListBuilderTask extends DefaultTask { | ||
List<String> mainDirectories | ||
private List<String> doNotReplaceFiles | ||
@InputFiles | ||
Closure<Collection<String>> filesClosure | ||
|
||
private Collection<String> doNotReplaceFiles | ||
|
||
@OutputFile | ||
File updateListFile | ||
@OutputFile | ||
File updateDoNotCopyOverListFile | ||
|
||
Collection<String> wikiFiles | ||
|
||
@TaskAction | ||
public void taskAction() { | ||
def updater = new WikiFileListBuilder(mainDirectories, doNotReplaceFiles, updateListFile, updateDoNotCopyOverListFile) | ||
def updater = new WikiFileListBuilder(getWikiFiles(), doNotReplaceFiles, updateListFile, updateDoNotCopyOverListFile) | ||
updater.createUpdateLists() | ||
} | ||
|
||
public void setDoNotReplaceFiles(final List<String> doNotReplaceFiles) { | ||
public void setDoNotReplaceFiles(final Collection<String> doNotReplaceFiles) { | ||
this.doNotReplaceFiles = doNotReplaceFiles | ||
} | ||
|
||
public void setMainDirectories(final List<String> mainDirectories) { | ||
this.mainDirectories = mainDirectories | ||
public void setFiles(final Closure<Collection<String>> files) { | ||
this.filesClosure = files | ||
} | ||
|
||
public void setFiles(final Collection<String> files) { | ||
this.filesClosure = { files } | ||
} | ||
|
||
public void setFiles(final SourceSet files) { | ||
this.filesClosure = { files.collect { it.name } } | ||
} | ||
|
||
public void setOutputDirectory(final String outputDirectory) { | ||
this.updateListFile = new File(outputDirectory, "updateList") | ||
this.updateDoNotCopyOverListFile = new File(outputDirectory, "updateDoNotCopyOverList") | ||
} | ||
|
||
public List<String> getWikiFiles() { | ||
if (wikiFiles == null) wikiFiles = filesClosure() | ||
wikiFiles | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters