Avoid having -d and -module set at the same time

#KT-14619 fixed
This commit is contained in:
Alexey Tsvetkov
2017-01-31 14:57:42 +03:00
parent 9b5129a0f3
commit c57dac159b
5 changed files with 14 additions and 6 deletions
@@ -58,17 +58,16 @@ internal class GradleCompilerRunner(private val project: Project) : KotlinCompil
args: K2JVMCompilerArguments,
environment: GradleCompilerEnvironment
): ExitCode {
val outputDir = args.destinationAsFile
val moduleFile = makeModuleFile(
args.moduleName,
isTest = false,
outputDir = outputDir,
outputDir = args.destinationAsFile,
sourcesToCompile = sourcesToCompile,
javaSourceRoots = javaSourceRoots,
classpath = args.classpathAsList,
friendDirs = args.friendPaths?.map(::File) ?: emptyList())
args.module = moduleFile.absolutePath
args.destination = null
try {
return runCompiler(K2JVM_COMPILER, args, environment)