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

[Question] How to setup gradle build for use KOTLINGRADLE. #14

Open
Nov1kov opened this issue Nov 25, 2020 · 2 comments
Open

[Question] How to setup gradle build for use KOTLINGRADLE. #14

Nov1kov opened this issue Nov 25, 2020 · 2 comments

Comments

@Nov1kov
Copy link

Nov1kov commented Nov 25, 2020

Sorry for the questions on this topic, but I believe the answer helps for documentation for this project.

as far as I understand this plugin reads only report files.

If I build an Android project with Kotlin via
./gradlew build
I have some output from the Kotlin compiler
(25, 17): Variable 'some' is never used

but I can't find any output with this text
image

Have any idea, how Kotlin Gradle output to integrate with the plugin?

@tomasbjerre
Copy link
Owner

I'm not using that feature, so I don't know.

@Nov1kov
Copy link
Author

Nov1kov commented Dec 3, 2020

So, I found a solution for my CI. (gitlab)

mkdir -p build/gradle_output
./gradlew lintRelease -w > build/gradle_output/lint_release.txt
./gradlew violationCommentsToGitLab

and in root build.gradle:

task violationCommentsToGitLab(type: ViolationCommentsToGitLabTask) {
    // ....
    violations = [
            ["ANDROIDLINT", "${rootDir}".toString(), ".*/reports/.*\\.xml\$", "Android lint"],
            ["KOTLINGRADLE", "${rootDir}".toString(), ".*/gradle_output/.*\\.txt\$", "Kotlinc"],
    ]
}

It will show errors from Kotlin compiler and Android lint

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

No branches or pull requests

2 participants