Skip to content

Commit

Permalink
Fix functional test.
Browse files Browse the repository at this point in the history
  • Loading branch information
dkostyrev committed Jun 29, 2023
1 parent 9680292 commit 60faea3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class ParanoidPlugin : Plugin<Project> {

val androidComponentsExtension = project.androidComponents ?: throw GradleException("Failed to get androidComponents extension")
if (androidComponentsExtension.pluginVersion < MINIMUM_VERSION) {
throw GradleException("Paranoid requires Android Gradle Plugin version $MINIMUM_VERSION")
throw GradleException("Paranoid requires Android Gradle Plugin version ${MINIMUM_VERSION.major}.${MINIMUM_VERSION.minor}.${MINIMUM_VERSION.micro}")
}

registerParanoid(extension)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@ class ParanoidPluginTest {
val temporaryFolder = TemporaryFolder()

@Test
fun `agp version with legacy transform`() {
fun `agp version with legacy transform not supported`() {
val projectRoot = createProjectDirectory(agpVersion = "7.1.0")

val result = createGradleRunner(projectRoot).build()
val result = createGradleRunner(projectRoot).buildAndFail()

val tasks = result.parseDryRunExecution()
Assert.assertTrue(tasks.any { it.path == ":transformClassesWithParanoidForDebug" })
Assert.assertTrue("Should contain message", result.output.contains("Paranoid requires Android Gradle Plugin version 7.2.0"))
}

@Test
Expand Down

0 comments on commit 60faea3

Please sign in to comment.