Skip to content

Allow controlling where code is generated #215

@dalewking

Description

@dalewking

The plugin is hardcoded to generate code to build/generated directory, but that is not what i want. I want it to go to a different directory and we actually commit the generated code in to git so we can see what has changed.

It is actually possible to change where it is generated by using something like:

        configureTask {
            outputDir.set("$projectDir/desiredDirectory")
        }

But the one thing that doesn't cover is the setting up of srcDir to the sourceSet. I can do that set up myself and end up with a srcDir pointing at non-existent directory, but it seems it would be easy enough to add a property to the spec block that is the output directory that just defaults to its current location but can be changed.

In addition, it is not possible to disable the automatic configuration of srcDir. It is required to have a string for sourceSet and if that sourceSet does not exist the build fails. So perhaps make the sourceSet property nullable and if null skip the srcDir configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions