-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #169 from gradle/no/rerun-task
Fix bug when calling `--rerun-tasks` with configuration cache enabled.
- Loading branch information
Showing
3 changed files
with
45 additions
and
10 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package org.gradle.android | ||
|
||
import org.gradle.testkit.runner.TaskOutcome | ||
import org.gradle.util.VersionNumber | ||
import org.junit.Assume | ||
|
||
@MultiVersionTest | ||
class RerunTasksTest extends AbstractTest { | ||
|
||
def "test with configuration cache and --rerun-tasks works"() { | ||
Assume.assumeTrue(TestVersions.latestAndroidVersionForCurrentJDK() >= VersionNumber.parse("4.2.0-alpha01")) | ||
|
||
def projectDir = temporaryFolder.newFolder() | ||
SimpleAndroidApp.builder(projectDir, cacheDir) | ||
.withKotlinVersion(VersionNumber.parse("1.5.0")) | ||
.build() | ||
.writeProject() | ||
|
||
withGradleVersion("7.0") | ||
.withProjectDir(projectDir) | ||
.withArguments("assembleDebug", "--stacktrace", "--rerun-tasks", "--configuration-cache") | ||
.build() | ||
|
||
when: | ||
def result = withGradleVersion("7.0") | ||
.withProjectDir(projectDir) | ||
.withArguments("assembleDebug", "--stacktrace", "--rerun-tasks", "--configuration-cache") | ||
.build() | ||
|
||
then: | ||
result.task(":library:assembleDebug").outcome == TaskOutcome.SUCCESS | ||
result.task(":library:compileDebugLibraryResources").outcome == TaskOutcome.SUCCESS | ||
} | ||
} |
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