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

Add muliplatform targets meta tasks #182

Open
Tapchicoma opened this issue Dec 9, 2018 · 5 comments
Open

Add muliplatform targets meta tasks #182

Tapchicoma opened this issue Dec 9, 2018 · 5 comments

Comments

@Tapchicoma
Copy link
Collaborator

Currently there is no way to check sources only for specific target in new kotlin multiplatform plugin (for example, only for common or only for js).

We should add related tasks that will trigger actual tasks for all source sets that are in the target.

Open question: should such tasks also check sources from dependent targets?

@tasomaniac
Copy link
Contributor

This is because of the changes in the new version, right? They made it very flexible, is that the reason?

@Tapchicoma
Copy link
Collaborator Author

Tapchicoma commented Dec 9, 2018

Current main problem is that in mpp extension targets and related sourcesets are detached from each other. So it is very not straightforward to get sourcesets that belongs to the target. And not possible to get source sets that was added as dependency using dependOn().

I think that this issue is kind of related: https://youtrack.jetbrains.com/issue/KT-26962, but want to clarify it.

@Tapchicoma
Copy link
Collaborator Author

Directly related issue: https://youtrack.jetbrains.com/issue/KT-28749

@JLLeitschuh
Copy link
Owner

Is this a use case we really want to cover?

If so, do we want to allow the user to opt-out of certain tasks being generated?
Can we do so with the KtlintExtension in such a way that enables this filtering?

@Tapchicoma out of curiosity, do we currently automatically attach the ktlintCheck tasks to the check task?

I'd also like to avoid the situation where we are creating way too many marker tasks which will greatly expand the number of tasks we have to ensure we don't break in the future (eg. accidental or intentional renaming).

@Tapchicoma
Copy link
Collaborator Author

@JLLeitschuh yes, running check task will run ktlintCheck task that will trigger run check for each source set in the current project.

If so, do we want to allow the user to opt-out of certain tasks being generated?
Can we do so with the KtlintExtension in such a way that enables this filtering?

Yes, we can add such config. Boolean property, imho, will be enough.

I'd also like to avoid the situation where we are creating way too many marker tasks which will greatly expand the number of tasks we have to ensure we don't break in the future (eg. accidental or intentional renaming).

I think this issue is valid as before new MPP plugin each target was in it own gradle module, so check for target can be run separately.

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

No branches or pull requests

3 participants