com.uber.infer.task.CheckForInfer.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of infer-plugin Show documentation
Show all versions of infer-plugin Show documentation
Gradle integration for infer static analyzer.
The newest version!
package com.uber.infer.task
import com.uber.infer.util.RunCommandUtils
import org.gradle.api.DefaultTask
import org.gradle.api.GradleException
import org.gradle.api.tasks.TaskAction
/**
* Checks if Infer is installed and stops the build with an error if not.
*/
public class CheckForInfer extends DefaultTask {
@TaskAction
def checkForInfer() {
try {
RunCommandUtils.run("infer -v")
} catch (IOException e) {
throw new GradleException(
"Infer is not installed on this machine.\n" +
"If you have Homebrew, you can easily install Infer with: brew install infer\n" +
"For other installation options, see: http://fbinfer.com/docs/getting-started.html"
)
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy