Skip to content

Commit

Permalink
Add explicit build-cache test
Browse files Browse the repository at this point in the history
  • Loading branch information
deepy committed Mar 25, 2024
1 parent 3bf23aa commit 0d011b0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/test/groovy/com/gradleup/jaxb/PluginTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,18 @@ class PluginTest extends Specification {
result1.task(":generateJaxb2ClassesExample").outcome == TaskOutcome.SUCCESS
}

def 'build from cache'() {
given:
copyResources("project")

when:
build("assemble", "--build-cache")
def result1 = build("clean", "assemble", "--build-cache")

then:
result1.task(":generateJaxb2ClassesExample").outcome == TaskOutcome.FROM_CACHE
}

protected final GradleRunner newRunner(final String... args) {
List<String> additionalArgs = ["--warning-mode=fail"]
return GradleRunner.create()
Expand Down

0 comments on commit 0d011b0

Please sign in to comment.