[Gradle] Adjust Kotlin2JsCompileArgumentsTest and KotlinCompileArgumentsTest
... after ensuring DependencyClasspath is not resolved by CompilerArgumentAware ^KTIJ-24724 Verification Pending
This commit is contained in:
committed by
Space Team
parent
502c3c29cc
commit
9f17f6621b
+10
-1
@@ -9,6 +9,10 @@ package org.jetbrains.kotlin.gradle.unitTests.compilerArgumetns
|
|||||||
|
|
||||||
import org.jetbrains.kotlin.compilerRunner.ArgumentUtils
|
import org.jetbrains.kotlin.compilerRunner.ArgumentUtils
|
||||||
import org.jetbrains.kotlin.gradle.dsl.multiplatformExtension
|
import org.jetbrains.kotlin.gradle.dsl.multiplatformExtension
|
||||||
|
import org.jetbrains.kotlin.gradle.plugin.CreateCompilerArgumentsContext
|
||||||
|
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilerArgumentsProducer
|
||||||
|
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilerArgumentsProducer.ArgumentType.PluginClasspath
|
||||||
|
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilerArgumentsProducer.ArgumentType.Primitive
|
||||||
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilerArgumentsProducer.CreateCompilerArgumentsContext.Companion.default
|
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilerArgumentsProducer.CreateCompilerArgumentsContext.Companion.default
|
||||||
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilerArgumentsProducer.CreateCompilerArgumentsContext.Companion.lenient
|
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilerArgumentsProducer.CreateCompilerArgumentsContext.Companion.lenient
|
||||||
import org.jetbrains.kotlin.gradle.plugin.KotlinJsCompilerType
|
import org.jetbrains.kotlin.gradle.plugin.KotlinJsCompilerType
|
||||||
@@ -31,7 +35,12 @@ class Kotlin2JsCompileArgumentsTest {
|
|||||||
project.evaluate()
|
project.evaluate()
|
||||||
|
|
||||||
val jsMainCompileTask = jsMainCompilation.compileTaskProvider.get()
|
val jsMainCompileTask = jsMainCompilation.compileTaskProvider.get()
|
||||||
val argumentsFromCompilerArgumentsProducer = jsMainCompileTask.createCompilerArguments(lenient)
|
val argumentsFromCompilerArgumentsProducer = jsMainCompileTask.createCompilerArguments(
|
||||||
|
CreateCompilerArgumentsContext(
|
||||||
|
includeArgumentTypes = setOf(Primitive, PluginClasspath),
|
||||||
|
isLenient = true
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
@Suppress("DEPRECATION_ERROR")
|
@Suppress("DEPRECATION_ERROR")
|
||||||
assertEquals(
|
assertEquals(
|
||||||
|
|||||||
+10
-1
@@ -18,6 +18,10 @@ import org.jetbrains.kotlin.gradle.dependencyResolutionTests.mavenCentralCacheRe
|
|||||||
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
|
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
|
||||||
import org.jetbrains.kotlin.gradle.dsl.kotlinJvmExtension
|
import org.jetbrains.kotlin.gradle.dsl.kotlinJvmExtension
|
||||||
import org.jetbrains.kotlin.gradle.dsl.multiplatformExtension
|
import org.jetbrains.kotlin.gradle.dsl.multiplatformExtension
|
||||||
|
import org.jetbrains.kotlin.gradle.plugin.CreateCompilerArgumentsContext
|
||||||
|
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilerArgumentsProducer
|
||||||
|
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilerArgumentsProducer.ArgumentType.PluginClasspath
|
||||||
|
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilerArgumentsProducer.ArgumentType.Primitive
|
||||||
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilerArgumentsProducer.CreateCompilerArgumentsContext.Companion.lenient
|
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilerArgumentsProducer.CreateCompilerArgumentsContext.Companion.lenient
|
||||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||||
import org.jetbrains.kotlin.gradle.util.assertNotNull
|
import org.jetbrains.kotlin.gradle.util.assertNotNull
|
||||||
@@ -43,7 +47,12 @@ class KotlinCompileArgumentsTest {
|
|||||||
|
|
||||||
val mainCompilation = kotlin.target.compilations.getByName("main")
|
val mainCompilation = kotlin.target.compilations.getByName("main")
|
||||||
val mainCompilationTask = mainCompilation.compileTaskProvider.get() as KotlinCompile
|
val mainCompilationTask = mainCompilation.compileTaskProvider.get() as KotlinCompile
|
||||||
val argumentsFromKotlinCompilerArgumentsAware = mainCompilationTask.createCompilerArguments(lenient)
|
val argumentsFromKotlinCompilerArgumentsAware = mainCompilationTask.createCompilerArguments(
|
||||||
|
CreateCompilerArgumentsContext(
|
||||||
|
includeArgumentTypes = setOf(Primitive, PluginClasspath),
|
||||||
|
isLenient = true
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
@Suppress("DEPRECATION_ERROR")
|
@Suppress("DEPRECATION_ERROR")
|
||||||
assertEquals(
|
assertEquals(
|
||||||
|
|||||||
Reference in New Issue
Block a user