Skip to content

Separate task classes to support incremental builds #4

@slisson

Description

@slisson

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions