[Gradle] KotlinCompile: Move allowNoSourceFiles = true to KotlinJvmCompilerOptionsHelper

KTIJ-24976
This commit is contained in:
Sebastian Sellmair
2023-04-04 21:56:38 +02:00
committed by Space Team
parent e5fbb253c5
commit 1844aab35d
3 changed files with 3 additions and 2 deletions
@@ -760,6 +760,7 @@ private fun Printer.addAdditionalJvmArgs(implType: FqName) {
println("// Arguments with always default values when used from build tools") println("// Arguments with always default values when used from build tools")
println("args.noStdlib = true") println("args.noStdlib = true")
println("args.noReflect = true") println("args.noReflect = true")
println("args.allowNoSourceFiles = true")
} }
} }
@@ -20,6 +20,7 @@ internal object KotlinJvmCompilerOptionsHelper {
// Arguments with always default values when used from build tools // Arguments with always default values when used from build tools
args.noStdlib = true args.noStdlib = true
args.noReflect = true args.noReflect = true
args.allowNoSourceFiles = true
} }
internal fun fillDefaultValues( internal fun fillDefaultValues(
@@ -34,6 +35,7 @@ internal object KotlinJvmCompilerOptionsHelper {
// Arguments with always default values when used from build tools // Arguments with always default values when used from build tools
args.noStdlib = true args.noStdlib = true
args.noReflect = true args.noReflect = true
args.allowNoSourceFiles = true
} }
internal fun syncOptionsAsConvention( internal fun syncOptionsAsConvention(
@@ -221,8 +221,6 @@ abstract class KotlinCompile @Inject constructor(
context: KotlinCompilerArgumentsProducer.CreateCompilerArgumentsContext context: KotlinCompilerArgumentsProducer.CreateCompilerArgumentsContext
): K2JVMCompilerArguments = context.create<K2JVMCompilerArguments> { ): K2JVMCompilerArguments = context.create<K2JVMCompilerArguments> {
primitive { args -> primitive { args ->
args.allowNoSourceFiles = true
args.multiPlatform = multiPlatformEnabled.get() args.multiPlatform = multiPlatformEnabled.get()
args.pluginOptions = (pluginOptions.toSingleCompilerPluginOptions() + kotlinPluginData?.orNull?.options) args.pluginOptions = (pluginOptions.toSingleCompilerPluginOptions() + kotlinPluginData?.orNull?.options)