-
-
Save adrianbk/299e6a3fac3a54553add to your computer and use it in GitHub Desktop.
TAPI_res_failure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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