-
Notifications
You must be signed in to change notification settings - Fork 166
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 android variants check and format tasks #170
Comments
Any prognostic when this fix will be available? I'm trying to run variant specific check to speed up the build on CI. |
Tasks with Regarding task that runs check for particular variant, should be available in next version (though plans are also bump minimal supported Gradle version to |
It's seems that flavor specific task currently work but not variant one. Example if I have flavor a and build type x and y. Ktlint work for task KtlintA but not for KtlintAx or ktlintAy. |
It's not necessarily speed vs tasks with no source. It's a common practice in Android projects to only run a single build variant to speed up the build. Instead of running ktlintCheck task you would run ktlintDebugCheck. But that returns NO-SOURCE since the debug specific sourceSet is empty. Debug variant has main and debug sourceSets in it. |
@bitsydarel can you double check if an error in main folder is detected when you run ktlintA? ktlintA would check sources within a folder. You must have some code in |
@tasomaniac Yes you were right, Its only founded issue for the flavor A, executing flavor task and Ktlintmaincheck sounds like a workarounds for my issue. But still strange why flavor A task does not include the main folder too... |
It was checking main folder too in 5.1.0 The behavior was changed in version 6.0. At our company, we are using 5.1.0 still. I did this change in Novoda's plugin to support both versions in a nice way. Will be available in the next version of that plugin novoda/gradle-static-analysis-plugin#153 |
I am trying to add kind of same meta tasks for multiplatform targets - should running |
Opened new issue for multiplatform: #182 Currently new mpp plugin kind of messy and there is no straghtforward way to get all sourcesets for target (with dependent sources) |
I feel like that would be a separate task. Does this plugin support checking other dependencies already? |
Currently new MPP plugin is a little mess and it is not straightforward to get all source sets for given target. As for target dependOn source sets - it is not possible 😞 Anyway, as I said - I've opened separate issue for this. |
Currently, plugin checks SourceSet for particular android variant, but it doesn't check sources that variant depends on as well.
Need to add special meta tasks for each android variant that will trigger tasks for all dependent variant sources.
The text was updated successfully, but these errors were encountered: