Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Floren dev #54

Merged
merged 9 commits into from
Apr 21, 2018
Merged

Floren dev #54

merged 9 commits into from
Apr 21, 2018

Conversation

florendg
Copy link
Collaborator

@florendg florendg commented Apr 15, 2018

This is a fix for issue #25. I added a task runTestar which makes it possible to run TESTAR using gradlew.
This solution runs TESTAR from the folder created by the task installDist. I also applied the debug strategy explained by @carlosengers in his post on issue #25.

@ferpasri
Copy link
Member

The command "gradlew runTestar" works correctly for me from cmd, not appears in eclipse gradle tasks.
If I use the "run" of the eclipse gradle tasks, I still have the problem of having to move the files from the "scripts" folder

Carlo's code task works well for me to use "run":
task prepareRunFromEclipse (type: Copy){
from 'target/scripts'
into '.'
}

@carlosengers
Copy link
Collaborator

Hi Floren, Fernando,
I think i have a proposal that can serve the concerns.
in the build.gradle, replace the runTestar task with:
task runTestar(type: JavaExec) { group = 'custom_testar' description = 'run' workingDir 'target/scripts' classpath = sourceSets.main.runtimeClasspath main='org.fruit.monkey.Main' }
and remove :
runTestar.dependsOn(installDist)

alternatively:
leave runTestar.dependsOn(installDist) and add: group = 'custom_testar' description = 'run' to the runtestar task as it is proposed by Floren.

option1 has a faster startup as there is not distribution task.
option2 runs in the same way as the genuine commandline and uses the same subfolders for output.
this can be seen as a some easier comprehension.
both options share the aspect: no sourcecode change.

i have a slight favor of option1.

image

@florendg
Copy link
Collaborator Author

I noted that the task I created didn't appear in Eclipse. Gradle support in Eclipse is still a bit strange.
Looking at the solutions proposed by Carlo I would opt for second option adding the group and description info to the existing task. As Carlo noted it is a little bit slower, but It uses the same execution path as the final product.

carlosengers
carlosengers previously approved these changes Apr 19, 2018
@carlosengers
Copy link
Collaborator

please add a few words in the readme.md that it can be run directly from within eclipse and that it uses the 'standard' way of starting testar. i.e. via TESTAR.BAT.
probably also good to mention that if the last run was using the DEBUG option, then the distribution will also require the debugger attached. without a remote debugger attached, the testar process stays dormant. (~ remember that the debug feature sits now also in the jar files)

ferpasri
ferpasri previously approved these changes Apr 20, 2018
@florendg florendg dismissed stale reviews from ferpasri and carlosengers via d9cf99b April 21, 2018 11:37
@florendg florendg merged commit 28a9ead into master Apr 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants