Skip to content

Instantly share code, notes, and snippets.

@adrianbk
Created June 22, 2015 06:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adrianbk/299e6a3fac3a54553add to your computer and use it in GitHub Desktop.
Save adrianbk/299e6a3fac3a54553add to your computer and use it in GitHub Desktop.
TAPI_res_failure
@ToolingApiVersion(">=2.4")
@TargetGradleVersion(">=2.4")
def "tooling api reports a sensible exception when a dependency does not exist"() {
projectDir.file('build.gradle').text = """
apply plugin: 'java'
repositories {
maven { url "https://repo.gradle.org/gradle/repo" }
}
dependencies{
compile ":codenarc:0.22"
}
"""
projectDir.file("src/main/java/Main.java") << """
public class Main {}
"""
executer.withTasks('wrapper').run()
when:
toolingApi.withConnection { connection ->
connection.newBuild().forTasks('check').run()
}
then:
true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment