bnorm / robocode-gradle-plugin

Gradle plugin for building (and running) bots for Robocode
12 stars 3 forks source link

Let's colaborate on Gradle template #1

Open pavelsavara opened 3 years ago

pavelsavara commented 3 years ago

Hi Brian,

We just merged https://github.com/robo-code/robocode/pull/47 and I would like to make writing robots in gradle first class citizen. I'm experimenting with robot testability here https://github.com/robo-code/rur I create sandbox folder as temporary robocode home https://github.com/robo-code/rur/blob/main/rur/build.gradle.kts and I set robocode.options.development.path here https://github.com/robo-code/rur/blob/main/rur/src/test/java/rossum/RobotTestBed.java#L136 that is not possible on released version of robocode yet, but is on master already.

I didn't have time to look at your testing ideas yet, not at the gradle template. I'm just reaching out to see if you are interested to colaborate on it.

Cheers! pavel.savara # gmail.com

bnorm commented 3 years ago

I'm definitely interested! What are you thinking and how can I help? Right now I only use this plugin in one robot project, Jarvis, but am excited about this plugin potentially becoming more standard.

Probably the thing you would find most interesting based on what you've shared is the automated process I have for running the Random Movement Targeting Challenge: https://github.com/bnorm/jarvis/blob/main/src/battles/kotlin/bnorm/TargetingChallenge.kt

Because this plugin (by default) downloads Robocode to the project directory at .robocode, I can initiate a RobocodeEngine with a known path. Then I have a few utility extension functions for running the battles. This works because this plugin creates a custom Gradle configuration robocodeRuntime which I extend from and create a separate source set for all the battle running code.

pavelsavara commented 3 years ago

I would have look at your existing code soon. I was thinking that we could take following steps

1) - have sample "hello world" robot repo. What I have now, is too complex for Java newbies.

2) Then we lower any necessary common infrastructure directly into Robocode, probably new module. So that the sample project is magically slim.

3) from that simple sample, we create gradle template. Could be in robocode github org and namespace.

4) write about it on WIki and robocode blog post.

On top of that, A) going forward I would like to see the Robocode engine being able to download robots directly from Maven repo. And our template should allow very easy publishing of robot to such repo. B) I would like package LiteRumble server and RoboRumble into docker images and, create some Helm script to make deployment of your own competition into Kubernetes cluster very easy.

Please drop me email, so that I could send you invite to slack.