Skip to content

Commit

Permalink
Support AGP 8.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszkwiecinski committed May 19, 2024
1 parent 77c3027 commit b40cf0a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ buildscript {
}
dependencies {
classpath "com.project.starter:android:0.73.0"
classpath "io.github.usefulness:screenshot-testing-plugin:1.0.1"
classpath "io.github.usefulness:screenshot-testing-plugin:1.0.2"
if (project.hasProperty("useMavenLocal")) {
classpath "com.project.starter.local:easylauncher:+"
} else {
Expand Down Expand Up @@ -91,7 +91,6 @@ subprojects {
}
}


String lastTask = null
android.applicationVariants.configureEach { variant ->
def recordTask = tasks.findByName("record${variant.name.capitalize()}AndroidTestScreenshotTest")
Expand All @@ -109,7 +108,10 @@ subprojects {
}

if (lastTask != null) {
tasks.named { task -> task == "record${variant.name.capitalize()}AndroidTestScreenshotTest" }.configureEach {
if (gradle.gradleVersion.startsWith("8.0")) {
return
}
tasks.named("record${variant.name.capitalize()}AndroidTestScreenshotTest").configureEach {
mustRunAfter("record${lastTask.capitalize()}AndroidTestScreenshotTest")
mustRunAfter("recordAndCopy${lastTask.capitalize()}AndroidTestScreenshotTest")
}
Expand Down
2 changes: 1 addition & 1 deletion sample/screenshot-test-helpers/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ android {

dependencies {
implementation(project(":adaptive-support"))
api("io.github.usefulness:screenshot-testing-core:1.0.1")
api("io.github.usefulness:screenshot-testing-core:1.0.2")
api(platform("org.junit:junit-bom:5.10.2"))
api("org.junit.vintage:junit-vintage-engine:5.10.2")
api("androidx.test:rules:1.5.0")
Expand Down

0 comments on commit b40cf0a

Please sign in to comment.