Skip to content

Additional source set #11

Description

@sharpplayer

I was led to this plugin (rgoldberg.experimental-jigsaw) as it was based on the gradle wiki version, and had carried on from that (it was also the most recently modified jigsaw plugin).

I have an additional test source, which I called sharedTest, but what seems to be happening is that the plugin did not seem to be updating the compileShareTestJava task with all the javac options. I took the original groovy tasks and modified it for my needs:

compileSharedTestJava {
    doFirst {
        options.compilerArgs = [
            '--module-path', classpath.asPath, // <1>
            '--add-modules', 'junit,org.mockito',  // <2>
            '--add-reads', "mymodule=junit,org.mockito", // <3>
            '--patch-module', "mymodule=" + files(sourceSets.sharedTest.java.srcDirs + sourceSets.test.java.srcDirs).asPath, // <4>
        ]
        classpath = files()
    }
}

Unfortunately I am not so expert in actually developing Gradle plugins, so I couldn't really see from the code if I need to do something special to generate this via your plugin, or there is a genuine bug. If you could advise if that is the case.

Also, there is obviously the chainsaw project and I wondered if we should put effort into improving that, or if plan to continue working on this plugin (which I would consider helping on too if I can get my head around plugin dev).

For context, we are trying to move to Java11 and, in fact, we have had to jump to a nightly release build of Gradle 5 to actually make any sort of progress.

Thank you for any help/advice.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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