27769

compileKotlin warning: the '-d' option with a directory destination is ignored because �

Question:

The issue is similar to this:

<a href="https://stackoverflow.com/questions/43603613/warningthe-d-option-with-a-directory-destination-is-ignored-because-module" rel="nofollow">Warning: the '-d' option with a directory destination is ignored because '-module' is specified</a>

but with -Xbuild-file instead of -module:

<blockquote>

warning: the '-d' option with a directory destination is ignored because '-Xbuild-file' is specified

</blockquote> <hr />

EXAMPLE:

03:00:44 AM: Executing task 'compileKotlin'... > Task :discoverMainScriptsExtensions > Task :compileKotlin Could not perform incremental compilation: Could not connect to Kotlin compile daemon Could not connect to kotlin daemon. Using fallback strategy. warning: the '-d' option with a directory destination is ignored because '-Xbuild-file' is specified Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/5.0/userguide/command_line_interface.html#sec:command_line_warnings BUILD SUCCESSFUL in 21s 2 actionable tasks: 2 executed 03:01:06 AM: Task execution finished 'compileKotlin'. <hr />

NOTES:

<ol><li>

The warning appears during compileKotlin (or compileTestKotlin) task.

</li> <li>

I'm using <strong>Gradle v5.0</strong> and <strong>Kotlin plugin v1.3.10</strong>.

</li> <li>

The issue doesn't exist when I execute the task on my remote machine that runs Linux. It's only on my (local) <strong>Windows</strong> machine.

</li> <li>

The issue is only when I use <strong>JDK > 8</strong> (as Gradle's JVM).

</li> <li>

As you can see in the above example the issue is along with this message:

<blockquote>

Could not perform incremental compilation: Could not connect to Kotlin compile daemon

Could not connect to kotlin daemon. Using fallback strategy.

</blockquote>

And my original problem is that! Its question is <a href="https://stackoverflow.com/questions/53987359/gradle-couldnt-connect-to-kotlin-daemon-on-windows" rel="nofollow">here</a>. I think this issue should be the reason for that.

</li> <li>

This is some parts of the output log of the task when executing with --debug option (that I think is the most relevant). Especially see last [ERROR]:

11:01:44 PM: Executing task 'compileKotlin --debug'... ... 23:01:45.888 [DEBUG] [org.gradle.api.Project] [KOTLIN] Kotlin compiler args: -Xadd-compiler-builtins -Xbuild-file=C:\Users\I\AppData\Local\Temp\kjps11452575260818015211GradleKotlinJVM.script.xml -classpath D:\Devel\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib-jdk8\1.3.10\71d0fa967493eb76648b575edf1762cb2d0c7f10\kotlin-stdlib-jdk8-1.3.10.jar;D:\Devel\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib-jdk7\1.3.10\4d147bf43060dc43d61b096e24da1e67dfe0c032\kotlin-stdlib-jdk7-1.3.10.jar;D:\Devel\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib\1.3.10\b178c1501609c6e4ee8be635513cb023a466457d\kotlin-stdlib-1.3.10.jar;D:\Devel\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib-common\1.3.10\1b19d99229dcedad7caf50534dce38fe82845269\kotlin-stdlib-common-1.3.10.jar;D:\Devel\.gradle\caches\modules-2\files-2.1\org.jetbrains\annotations\13.0\919f0dfe192fb4e063e7dacadee7f8bb9a2672a9\annotations-13.0.jar -d D:\Devel\IdeaProjects\GradleKotlinJVM\build\classes\kotlin\main -jvm-target 1.8 -Xload-builtins-from-dependencies -module-name GradleKotlinJVM -no-reflect -no-stdlib -Xplugin=D:\Devel\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-scripting-compiler-embeddable\1.3.10\e96a6125793c4ab0258119fcdce9d182f42d32b0\kotlin-scripting-compiler-embeddable-1.3.10.jar -verbose ... 23:01:48.134 [INFO] [org.gradle.api.Task] i: starting the daemon as: C:\Program Files\Java\openjdk-11.0.1\bin\java -cp D:\Devel\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-compiler-embeddable\1.3.10\adc9e577de39fba3db6d60662892118afedd713\kotlin-compiler-embeddable-1.3.10.jar;D:\Devel\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-reflect\1.3.10\dd02865be0351707554b16a896b766b2396cdafa\kotlin-reflect-1.3.10.jar;D:\Devel\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib\1.3.10\b178c1501609c6e4ee8be635513cb023a466457d\kotlin-stdlib-1.3.10.jar;D:\Devel\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-script-runtime\1.3.10\1d2bac36f99b84e1493244f12629bc0756a3ff90\kotlin-script-runtime-1.3.10.jar;D:\Devel\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib-common\1.3.10\1b19d99229dcedad7caf50534dce38fe82845269\kotlin-stdlib-common-1.3.10.jar;D:\Devel\.gradle\caches\modules-2\files-2.1\org.jetbrains\annotations\13.0\919f0dfe192fb4e063e7dacadee7f8bb9a2672a9\annotations-13.0.jar -Djava.awt.headless=true -Djava.rmi.server.hostname=127.0.0.1 -Xmx1536m -XX:MaxPermSize=512m -Dkotlin.environment.keepalive org.jetbrains.kotlin.daemon.KotlinCompileDaemon --daemon-runFilesPath C:\Users\I\AppData\Local\kotlin\daemon --daemon-autoshutdownIdleSeconds=7200 --daemon-compilerClasspath D:\Devel\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-compiler-embeddable\1.3.10\adc9e577de39fba3db6d60662892118afedd713\kotlin-compiler-embeddable-1.3.10.jar;D:\Devel\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-reflect\1.3.10\dd02865be0351707554b16a896b766b2396cdafa\kotlin-reflect-1.3.10.jar;D:\Devel\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib\1.3.10\b178c1501609c6e4ee8be635513cb023a466457d\kotlin-stdlib-1.3.10.jar;D:\Devel\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-script-runtime\1.3.10\1d2bac36f99b84e1493244f12629bc0756a3ff90\kotlin-script-runtime-1.3.10.jar;D:\Devel\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib-common\1.3.10\1b19d99229dcedad7caf50534dce38fe82845269\kotlin-stdlib-common-1.3.10.jar;D:\Devel\.gradle\caches\modules-2\files-2.1\org.jetbrains\annotations\13.0\919f0dfe192fb4e063e7dacadee7f8bb9a2672a9\annotations-13.0.jar 23:01:48.134 [INFO] [org.gradle.api.Task] i: [daemon] OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0 23:01:48.134 [INFO] [org.gradle.api.Task] i: Received the message signalling that the daemon is ready 23:01:48.134 [INFO] [org.gradle.api.Task] i: new daemon started, trying to find it 23:01:48.134 [INFO] [org.gradle.api.Task] i: starting the daemon as: C:\Program Files\Java\openjdk-11.0.1\bin\java -cp D:\Devel\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-compiler-embeddable\1.3.10\adc9e577de39fba3db6d60662892118afedd713\kotlin-compiler-embeddable-1.3.10.jar;D:\Devel\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-reflect\1.3.10\dd02865be0351707554b16a896b766b2396cdafa\kotlin-reflect-1.3.10.jar;D:\Devel\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib\1.3.10\b178c1501609c6e4ee8be635513cb023a466457d\kotlin-stdlib-1.3.10.jar;D:\Devel\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-script-runtime\1.3.10\1d2bac36f99b84e1493244f12629bc0756a3ff90\kotlin-script-runtime-1.3.10.jar;D:\Devel\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib-common\1.3.10\1b19d99229dcedad7caf50534dce38fe82845269\kotlin-stdlib-common-1.3.10.jar;D:\Devel\.gradle\caches\modules-2\files-2.1\org.jetbrains\annotations\13.0\919f0dfe192fb4e063e7dacadee7f8bb9a2672a9\annotations-13.0.jar -Djava.awt.headless=true -Djava.rmi.server.hostname=127.0.0.1 -Xmx1536m -XX:MaxPermSize=512m -Dkotlin.environment.keepalive org.jetbrains.kotlin.daemon.KotlinCompileDaemon --daemon-runFilesPath C:\Users\I\AppData\Local\kotlin\daemon --daemon-autoshutdownIdleSeconds=7200 --daemon-compilerClasspath D:\Devel\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-compiler-embeddable\1.3.10\adc9e577de39fba3db6d60662892118afedd713\kotlin-compiler-embeddable-1.3.10.jar;D:\Devel\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-reflect\1.3.10\dd02865be0351707554b16a896b766b2396cdafa\kotlin-reflect-1.3.10.jar;D:\Devel\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib\1.3.10\b178c1501609c6e4ee8be635513cb023a466457d\kotlin-stdlib-1.3.10.jar;D:\Devel\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-script-runtime\1.3.10\1d2bac36f99b84e1493244f12629bc0756a3ff90\kotlin-script-runtime-1.3.10.jar;D:\Devel\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib-common\1.3.10\1b19d99229dcedad7caf50534dce38fe82845269\kotlin-stdlib-common-1.3.10.jar;D:\Devel\.gradle\caches\modules-2\files-2.1\org.jetbrains\annotations\13.0\919f0dfe192fb4e063e7dacadee7f8bb9a2672a9\annotations-13.0.jar 23:01:48.134 [INFO] [org.gradle.api.Task] i: [daemon] OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0 23:01:48.134 [INFO] [org.gradle.api.Task] i: Received the message signalling that the daemon is ready 23:01:48.134 [INFO] [org.gradle.api.Task] i: new daemon started, trying to find it 23:01:48.137 [WARN] [org.gradle.api.Project] Could not perform incremental compilation: Could not connect to Kotlin compile daemon 23:01:48.137 [WARN] [org.gradle.api.Project] Could not connect to kotlin daemon. Using fallback strategy. 23:01:49.486 [LIFECYCLE] [system.err] 23:01:49.486 [ERROR] [system.err] logging: using Kotlin home directory <no_path> 23:01:49.521 [ERROR] [system.err] logging: configuring the compilation environment 23:01:50.538 [ERROR] [system.err] logging: loading modules: [java.se, jdk.accessibility, jdk.attach, jdk.compiler, jdk.dynalink, jdk.httpserver, jdk.jartool, jdk.javadoc, jdk.jconsole, jdk.jdi, jdk.jfr, jdk.jshell, jdk.jsobject, jdk.management, jdk.management.jfr, jdk.net, jdk.scripting.nashorn, jdk.sctp, jdk.security.auth, jdk.security.jgss, jdk.unsupported, jdk.unsupported.desktop, jdk.xml.dom, java.base, java.compiler, java.datatransfer, java.desktop, java.xml, java.instrument, java.logging, java.management, java.management.rmi, java.rmi, java.naming, java.net.http, java.prefs, java.scripting, java.security.jgss, java.security.sasl, java.sql, java.transaction.xa, java.sql.rowset, java.xml.crypto, jdk.internal.jvmstat, jdk.management.agent, jdk.jdwp.agent, jdk.internal.ed, jdk.internal.le, jdk.internal.opt] 23:01:53.459 [ERROR] [system.err] warning: the '-d' option with a directory destination is ignored because '-Xbuild-file' is specified ... 11:01:53 PM: Task execution finished 'compileKotlin --debug'. </li> </ol>

Answer1:

Solved. The issue is from <strong><em>unicode encoding issues</em></strong> (probably between NTFS and UTF-8). I reverted my personalizations of <em>Windows' date & time formats</em> and the issue disappeared. See <a href="https://stackoverflow.com/a/54084016/5318303" rel="nofollow">my post in response to the original problem</a> for more details.

Recommend

  • How do I write operator
  • Securing an ajax request
  • Xcode 4.5 Uploading a iPhone 5 app only
  • Struts2 jquery grid gridColumn field is displayed in dialog although using hidedlg=“true”
  • How to get value from Fields in redux-form?
  • Remove duplicate lines from a string in python
  • How to monitor video and https traffic using bro network security monitor
  • Why does getContextPath() under a proxy return the internal path inside HttpServlet but not inside F
  • JS loop variable scope
  • Android - findViewById() vs findViewWithTag()
  • summarize data from csv using R
  • How to use Substring in SSIS
  • getting exception when inserting events in android calendar
  • How to work with Mailgun API in CodeIgniter; Forbidden error in curl_exe()
  • Objects Sorting With date ,Time Problem in Array(Iphone Development)
  • Need reference code for SMO in C# SQL Server 2008
  • Set selected using jQuery
  • How to make responsive images in flutter?
  • WSO2 Identity Server + Rest STS Client (without ESB)
  • Target in barchart in dc.js
  • Is there a way to run c# forms application without showing a gui window (like a console application)
  • MVC3 Extension for ValidatorMessage
  • How to highlighting active menu item on scroll and click?
  • Greedy Algorithm in “C”
  • Extract table from Powerpoint
  • Homomorphic filtering in OpenCV
  • Unity Resources.load() won't work with external dll
  • Authorize Attribute Authentication with Postman in Web Api
  • PHP: Need to close STDIN in order to read STDOUT?
  • Keep rows with certain values always at the bottom while sorting in jquery tablesorter plugin
  • Generate and export point cloud from Project Tango
  • JavaScript Regex to Match Boundaries of Words with diacritics
  • How to turn off notice reporting in xampp?
  • How do I add a mouse over tooltip to an Image using .DrawImage()
  • Why isn't stemDocument stemming?
  • Google App Engine Datastore: Dealing with eventual consistency
  • How to handle div that is created dynamically in a table
  • ssh remote server login script
  • How to call different template for different category archive page in woocommerce
  • Sign a Pdf using custom digital signature in Java