Commit b0a89d79 authored by Christian Meyer's avatar Christian Meyer
Browse files

ZmtSimulationPlugin.java: adds README file to distribution

    updated test
added README, CreateReadme.groovy
parent cf5b1912
......@@ -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)
}
}
......
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'))
}
}
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.
......@@ -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()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment