A development environment of robocode robots based on gradle
Specify the version and installation directory of robocode to be installed
in build.gradle
ext {
ROBOCODE_SETUP_DIR = '.setup'
ROBOCODE_INSTALL_DIR = '.robocode'
ROBOCODE_VERSION = '1.9.4.7'
ROBOCODE_BATTLE = ''
}
Just one line of command
./gradlew robocode
If you want to run
some battle,
you can specify the battle file name in build.gradle
.
ext {
ROBOCODE_SETUP_DIR = '.setup'
ROBOCODE_INSTALL_DIR = '.robocode'
ROBOCODE_VERSION = '1.9.4.7'
ROBOCODE_BATTLE = 'sample'
}
If you want to pass other args when running robocode, you can modify robocode
task block in build.gradle
task robocode(type: JavaExec, dependsOn: 'build') {
// ...
args 'arg_name0', 'arg_value0'
args 'arg_name1', 'arg_value1'
}