Advertisement
Guest User

Untitled

a guest
Dec 12th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. plugins {
  2. kotlin("multiplatform")
  3. }
  4.  
  5. kotlin {
  6. // Determine host preset.
  7. val hostOs = System.getProperty("os.name")
  8.  
  9. // Create target for the host platform.
  10. val hostTarget = when {
  11. hostOs == "Mac OS X" -> macosX64("nonBlockingEchoServer")
  12. hostOs == "Linux" -> linuxX64("nonBlockingEchoServer")
  13. hostOs.startsWith("Windows") -> mingwX64("nonBlockingEchoServer")
  14. else -> throw GradleException("Host OS '$hostOs' is not supported in Kotlin/Native $project.")
  15. }
  16.  
  17. hostTarget.apply {
  18. binaries {
  19. executable {
  20. entryPoint = "sample.nbechoserver.main"
  21. runTask?.args(3000)
  22. }
  23. }
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement