Skip to content

Windows support #3

@janluke

Description

@janluke

First, thank you for this template, it's great!

Unfortunately, linting tasks currently depend on bash scripts. I don't know batch scripting, so I can't help int translating those scripts in batch. Nonetheless, I personally solved the problem as follows:

  1. I added the bash executable bundled with "Git for Windows" to the PATH; precisely, I added "C:/Program Files/Git/bin" to the PATH;
  2. In coursera.gradle, I modified the tasks for spotbugs, checkstyle and PMD by setting commandLine to just 'bash' and moving the path of the actual script to args. For example:
tasks.create(
            name: "${assignment.name}CheckStyle",
            type: Exec,
            dependsOn: [downlodCheckStyle, "${assignment.name}CodeAnalysisPrepare"]
    ) {
        // omitted
        commandLine "bash"    // <-- put bash here 
        args = ["$projectDir/.lift/bin/checkstyle", "-coursera"] + assignment.sources
    }

Not sure why the following didn't work: commandLine 'bash', "$projectDir/.lift/bin/checkstyle".

This is not a real solution, but it's something. I can open a PR with these changes (and instructions in the README) if you want.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions