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

Separate task classes to support incremental builds #4

Open
slisson opened this issue Feb 13, 2023 · 1 comment
Open

Separate task classes to support incremental builds #4

slisson opened this issue Feb 13, 2023 · 1 comment
Assignees
Labels
good first issue Good for newcomers

Comments

@slisson
Copy link
Member

slisson commented Feb 13, 2023

Tasks are currently implement with lambdas. See for example https://github.com/modelix/mpsbuild/blob/878a20dadbb3cdc0f0f1e86776c8fe201cb2b7b7/gradle-mpsbuild-plugin/src/main/kotlin/org/modelix/gradle/mpsbuild/MPSBuildPlugin.kt#L110
Incremental build don't work with them. The tasks are re-executed even if the input didn't change. To support incremental builds we have to move the implementation to a separate class with well defined inputs/outputs.

See https://github.com/modelix/modelix.core/blob/main/metamodel-gradle/src/main/kotlin/org/modelix/metamodel/gradle/GenerateMetaModelSources.kt for an example how it's done correctly.

@mhuster23
Copy link
Contributor

depends on #7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants