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

Fix lint build. #326

Merged
merged 2 commits into from
Jan 4, 2024
Merged

Fix lint build. #326

merged 2 commits into from
Jan 4, 2024

Conversation

Laimiux
Copy link
Collaborator

@Laimiux Laimiux commented Jan 4, 2024

What

Fixing the following issue when running :formula-lint:build

* What went wrong:
A problem was found with the configuration of task ':formula-lint:lintAnalyzeJvm' (type 'AndroidLintAnalysisTask').
  - Gradle detected a problem with the following location: '/Users/laimonasturauskas/android/formula/formula-lint/build/intermediates/lint_partial_results/global/lintAnalyzeJvm'.
    
    Reason: Task ':formula-lint:jacocoTestReport' uses this output of task ':formula-lint:lintAnalyzeJvm' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':formula-lint:lintAnalyzeJvm' as an input of ':formula-lint:jacocoTestReport'.
      2. Declare an explicit dependency on ':formula-lint:lintAnalyzeJvm' from ':formula-lint:jacocoTestReport' using Task#dependsOn.
      3. Declare an explicit dependency on ':formula-lint:lintAnalyzeJvm' from ':formula-lint:jacocoTestReport' using Task#mustRunAfter.
    
    For more information, please refer to https://docs.gradle.org/8.2/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

@Laimiux Laimiux requested a review from mattkranzler5 January 4, 2024 15:06
@carrotkite
Copy link

JaCoCo Code Coverage 78.89% ✅

Class Covered Meta Status

Generated by 🚫 Danger

@Laimiux Laimiux force-pushed the laimonas/fix-lint-build branch from ca847c3 to 7437149 Compare January 4, 2024 15:48
Copy link
Contributor

@mattkranzler5 mattkranzler5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one minor nit

Comment on lines 30 to 31
dependsOn(tasks.withType(AndroidLintAnalysisTask::class.java))
dependsOn(tasks.withType(LintModelWriterTask::class.java))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: you can use the kotlin dsl here:

dependsOn(tasks.withType<AndroidLintAnalysisTask>())
dependsOn(tasks.withType<LintModelWriterTask>())

@Laimiux Laimiux merged commit 8a4fcf6 into master Jan 4, 2024
5 checks passed
@Laimiux Laimiux deleted the laimonas/fix-lint-build branch January 4, 2024 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants