Build
./gradlew build --parallel
Running
java -Xverify:none -XX:TieredStopAtLevel=1 -jar modules/app/build/libs/app-0.1.0.jar
Architecture
Use Case
As a developer I want to be able to create or update existing projects
Main Success Scenario
- Developer puts source files to be used to create the project
- Developer puts a project configuraton in place
- Developer runs SuD specifying the configuraton and name of project
- SuD processes the project configuration
- SuD puts a new file in the new project by copying the from the source file
- SuD exits with success
Extensions
4a - conflicting settings
- handle error
5a - source file is template
- Detect source file is template
- process the template using the appropriate template processor
- output processed template to destination location
5a1a - source file is binary
- handle error
5b - update instructions exists
- process instructions in order
- update destination file in place according to instructions
5b1a - destination file is binary
- handle error
5c - execute commands
- execute command
5c1a - command does not succeed
- handle error
Handle Error
- File is not created or updated
- Throw Exception with useful message
- log exception as error
1b - Instruction destination is binary file
- file is not modified
1c - more than one Instruction is provided
- Instructions are applied in order
Technology and Data Variations List
Configuration
Any configuraton string may be a template string and processed using the configured context.
-
Configuration consists of
- working directorory
- skeleton configurations
- before executions
- after executions
-
Execution configuration consists of
- exec-able command
- context map
-
Skeleton configuration consists of
- source
- destination
- overwrite boolean
- instructions
- context map
-
Instruction consists of
- search - a regular expression.
- replace - a replace string, e.g. like
String#replaceAll
. - flags - should name as the value, allow singular or list.
- mode - first or all, e.g.
String#replaceAll
. all should be the default.
Mutually exclusive skeleton configuration keys
- source, destination, overwrite
- destination, instructions