JetBrains / kotlin-native

Kotlin/Native infrastructure
Apache License 2.0
7.02k stars 566 forks source link

Plugin'kotlin-multiplatform' was not found #2433

Closed elect86 closed 5 years ago

elect86 commented 5 years ago

As titled,

I just tried to run the opengl sample:

elect@elect-NUC8i5BEK:~/CLionProjects/kotlin-native/samples/opengl$ ../gradlew assemble
Parallel execution is an incubating feature.

FAILURE: Build failed with an exception.

* Where:
Build file '/home/elect/CLionProjects/kotlin-native/samples/opengl/build.gradle' line: 2

* What went wrong:
Plugin [id: 'kotlin-multiplatform', artifact: 'org.jetbrains.kotlin:kotlin-gradle-plugin:null'] was not found in any of the following sources:

- Gradle Core Plugins (not a core plugin, please see https://docs.gradle.org/4.7/userguide/standard_plugins.html for available core plugins)
- Plugin Repositories (could not resolve plugin artifact 'org.jetbrains.kotlin:kotlin-gradle-plugin:null')
  Searched in the following repositories:
    MavenRepo
    maven(https://dl.bintray.com/kotlin/kotlin-dev)
    maven2(https://dl.bintray.com/kotlin/kotlin-eap)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.7/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 0s
StefMa commented 5 years ago

I don't know how you run the sample. But you have to provide a version of the gradle plugin. Try to add 'version "1.3.10"' to the build.gradle file after the "id 'kotlin-multiplatform'"

On Sat, Dec 1, 2018, 3:05 PM Giuseppe Barbieri <notifications@github.com wrote:

As titled

elect@elect-NUC8i5BEK:~/CLionProjects/kotlin-native/samples/opengl$ ../gradlew assemble Parallel execution is an incubating feature.

FAILURE: Build failed with an exception.

  • Where: Build file '/home/elect/CLionProjects/kotlin-native/samples/opengl/build.gradle' line: 2

  • What went wrong: Plugin [id: 'kotlin-multiplatform', artifact: 'org.jetbrains.kotlin:kotlin-gradle-plugin:null'] was not found in any of the following sources:

  • Gradle Core Plugins (not a core plugin, please see https://docs.gradle.org/4.7/userguide/standard_plugins.html for available core plugins)

  • Plugin Repositories (could not resolve plugin artifact 'org.jetbrains.kotlin:kotlin-gradle-plugin:null') Searched in the following repositories: MavenRepo maven(https://dl.bintray.com/kotlin/kotlin-dev) maven2(https://dl.bintray.com/kotlin/kotlin-eap)

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0. See https://docs.gradle.org/4.7/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 0s

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/JetBrains/kotlin-native/issues/2433, or mute the thread https://github.com/notifications/unsubscribe-auth/AJwYewBcmmIcbNU0kDL6CUMZjUD1iv-Hks5u0oyTgaJpZM4Y86OK .

elect86 commented 5 years ago
elect@elect-NUC8i5BEK:~/CLionProjects/kotlin-native/samples/opengl$ ../gradlew assemble
Parallel execution is an incubating feature.

> Configure project :
Kotlin Multiplatform Projects are an experimental feature.

FAILURE: Build failed with an exception.

* Where:
Build file '/home/elect/CLionProjects/kotlin-native/samples/opengl/build.gradle' line: 6

* What went wrong:
A problem occurred evaluating root project 'opengl'.
> Could not get unknown property 'MPPTools' for root project 'opengl' of type org.gradle.api.Project.
msink commented 5 years ago

opengl sample currently works only in Mac. To enable it on Linux:

diff --git a/samples/opengl/build.gradle b/samples/opengl/build.gradle
index 7f173b56e..d85127428 100644
--- a/samples/opengl/build.gradle
+++ b/samples/opengl/build.gradle
@@ -3,7 +3,7 @@ plugins {
 }

 // Determine host preset.
-def hostPreset = MPPTools.defaultHostPreset(project, [kotlin.presets.macosX64])
+def hostPreset = MPPTools.defaultHostPreset(project, [kotlin.presets.macosX64, kotlin.presets.linuxX64])

 kotlin {
     targets {
diff --git a/samples/settings.gradle b/samples/settings.gradle
index 39a15c667..e74d05938 100644
--- a/samples/settings.gradle
+++ b/samples/settings.gradle
@@ -35,13 +35,13 @@ if (MPPTools.isMacos() || MPPTools.isLinux()) {
     include ':gitchurn'
     include ':gtk'
     include ':nonBlockingEchoServer'
+    include ':opengl'
     include ':tensorflow'
     include ':torch'
 }

 if (MPPTools.isMacos()) {
     include ':objc'
-    include ':opengl'
     include ':uikit'
 }

But then you anyway get errors, because platform.OpenGL.* not defined on Linux.

aemre commented 4 years ago

I faced the issue create new project from intellij. An exception occurred applying plugin request [id: 'org.jetbrains.kotlin.multiplatform', version: '1.3.72']

Failed to apply plugin [id 'org.jetbrains.kotlin.multiplatform']