Hello, I am getting a MissingMethodException on project.apply plugin: ‘x’. What method am I missing?
Error
org.gradle.api.internal.MissingMethodException at EnvPluginTest.groovy:13
Test Code
package com.gradle.env;
import static org.junit.Assert.*
import org.junit.Test
import org.gradle.api.*
import org.gradle.testfixtures.*
class EnvPluginTest {
@Test
public void envPluginAddsEnvPluginExtensionToProject() {
Project project =
ProjectBuilder.builder().build()
project.apply plugin: 'env'
assertTrue(project.extensions.getByName('env')
instanceof
EnvPluginExtension)
}
}