Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ecomod
zmt-build
Commits
b0a89d79
Commit
b0a89d79
authored
Oct 06, 2016
by
Christian Meyer
Browse files
ZmtSimulationPlugin.java: adds README file to distribution
updated test added README, CreateReadme.groovy
parent
cf5b1912
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/main/groovy/de/zmt/gradle/ZmtSimulationPlugin.groovy
View file @
b0a89d79
...
...
@@ -22,8 +22,13 @@ public class ZmtSimulationPlugin implements Plugin<Project> {
description
=
'Creates a CHANGES file from git tags.'
}
task
(
'createReadmeFile'
,
type:
CreateReadme
)
{
description
=
'Creates the README file.'
}
distributions
.
main
.
contents
{
from
(
project
.
createChangesFile
)
from
(
project
.
createReadmeFile
)
}
}
...
...
src/main/groovy/de/zmt/gradle/task/CreateReadme.groovy
0 → 100644
View file @
b0a89d79
package
de.zmt.gradle.task
;
import
org.gradle.api.*
;
import
org.gradle.api.tasks.*
;
public
class
CreateReadme
extends
DefaultTask
{
@OutputFile
File
outputFile
=
project
.
file
(
"$project.buildDir/tmp/README"
)
@TaskAction
public
void
createReadmeFile
()
{
outputFile
.
append
(
CreateReadme
.
class
.
getResourceAsStream
(
'README'
))
}
}
src/main/resources/de/zmt/gradle/task/README
0 → 100644
View file @
b0a89d79
Simulations developed in ZMT's department of Theoretical Ecology & Modelling.
Contents of distribution:
./bin
Start scripts
./lib
Libraries of simulations and those which they depend on.
README
this file
launch-with-gui
shortcut for running the launcher with the simulation in GUI-mode
Run './bin/launcher --help' to see available options.
Scripts come in Windows and Unix variants. Those for windows end with '.bat'.
Keep in mind that the working directory will be your current directory. Parameters and resources are loaded relative to that.
src/test/groovy/de/zmt/gradle/ZmtSimulationPluginTest.groovy
View file @
b0a89d79
...
...
@@ -24,6 +24,7 @@ class ZmtSimulationPluginTest {
assertTrue
(
plugins
.
hasPlugin
(
ZmtLaunchConfigPlugin
.
class
))
assertTrue
(
plugins
.
hasPlugin
(
ZmtShortcutPlugin
.
class
))
assertTrue
(
createChangesFile
instanceof
CreateChanges
)
assertTrue
(
createReadmeFile
instanceof
CreateReadme
)
}
project
.
evaluate
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment