NoArg: Parse 'invokeInitializers' option in Maven importer (KT-19900)
This commit is contained in:
@@ -1476,6 +1476,77 @@ class KotlinMavenImporterTest : MavenImportingTestCase() {
|
||||
}
|
||||
}
|
||||
|
||||
fun testNoArgInvokeInitializers() {
|
||||
createProjectSubDirs("src/main/kotlin", "src/main/kotlin.jvm", "src/test/kotlin", "src/test/kotlin.jvm")
|
||||
|
||||
importProject("""
|
||||
<groupId>test</groupId>
|
||||
<artifactId>project</artifactId>
|
||||
<version>1.0.0</version>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib</artifactId>
|
||||
<version>$kotlinVersion</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<sourceDirectory>src/main/kotlin</sourceDirectory>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>compile</id>
|
||||
<goals>
|
||||
<goal>js</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-maven-noarg</artifactId>
|
||||
<version>$kotlinVersion</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<configuration>
|
||||
<compilerPlugins>
|
||||
<plugin>no-arg</plugin>
|
||||
</compilerPlugins>
|
||||
|
||||
<pluginOptions>
|
||||
<option>no-arg:annotation=NoArg</option>
|
||||
<option>no-arg:invokeInitializers=true</option>
|
||||
</pluginOptions>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
""")
|
||||
|
||||
assertModules("project")
|
||||
assertImporterStatePresent()
|
||||
|
||||
with(facetSettings) {
|
||||
Assert.assertEquals(
|
||||
"-version",
|
||||
compilerSettings!!.additionalArguments
|
||||
)
|
||||
Assert.assertEquals(
|
||||
listOf("plugin:org.jetbrains.kotlin.noarg:annotation=NoArg",
|
||||
"plugin:org.jetbrains.kotlin.noarg:invokeInitializers=true"),
|
||||
compilerArguments!!.pluginOptions!!.toList()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
fun testArgsOverridingInFacet() {
|
||||
createProjectSubDirs("src/main/kotlin", "src/main/kotlin.jvm", "src/test/kotlin", "src/test/kotlin.jvm")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user