JetBrains / kotlin-native

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

Plugin [id: 'org.jetbrains.kotlin.multiplatform', version: '1.3.30'] was not found in any of the following sources: #2924

Closed BreimerR closed 4 years ago

BreimerR commented 5 years ago
plugins {
    kotlin("multiplatform") version "1.3.30"
}

repositories {
    mavenCentral()

}

kotlin {
    // For ARM, preset function should be changed to iosArm32() or iosArm64()
    // For Linux, preset function should be changed to e.g. linuxX64()
// For MacOS, preset function should be changed to e.g. macosX64()
linuxX64("Unify") {
    binaries {
        // Comment the next section to generate Kotlin/Native library (KLIB) instead of executable file:
        executable("unify") {
            // Change to specify fully qualified name of your application's entry point:
            entryPoint = "unify.main"
        }
    }
}

}

// Use the following Gradle tasks to run your application: // :runHelloWorldAppReleaseExecutableHelloWorld - without debug symbols // :runHelloWorldAppDebugExecutableHelloWorld - with debug symbols

BreimerR commented 5 years ago

I have tried adding other repo's with no success i.e

   plugins {
        kotlin("multiplatform") version "1.3.30"
   }

   repositories {
       mavenCentral()
       maven("https://dl.bintray.com/kotlin/kotlin-eap")
       maven("https://dl.bintray.com/kotlin/kotlin-dev")
   }

   kotlin {
          // For ARM, preset function should be changed to iosArm32() or iosArm64()
          // For Linux, preset function should be changed to e.g. linuxX64()
          // For MacOS, preset function should be changed to e.g. macosX64()
          linuxX64("Unify") {
                binaries {
                    // Comment the next section to generate Kotlin/Native library (KLIB) instead of executable 
                file:
                   executable("unify") {
                        // Change to specify fully qualified name of your application's entry point:
                        entryPoint = "unify.main"
                   }
                }
             }
       }

       // Use the following Gradle tasks to run your application:
       // :runHelloWorldAppReleaseExecutableHelloWorld - without debug symbols
       // :runHelloWorldAppDebugExecutableHelloWorld - with debug symbols
olonho commented 5 years ago

Use smth like

plugins {
    id 'kotlin-multiplatform' version '1.3.31'
}
9468305 commented 5 years ago

@BreimerR Did you setup settings.gradle.kts like this?

pluginManagement {
    resolutionStrategy {
        eachPlugin {
            if (requested.id.id == "kotlin-multiplatform") {
                useModule("org.jetbrains.kotlin:kotlin-gradle-plugin:${requested.version}")
            }
        }
    }
    /*enable here when you need other plugins.
    repositories {
        google()
        jcenter()
        mavenCentral()
        gradlePluginPortal()
    }*/
}
ilmat192 commented 5 years ago

@BreimerR Is this issue still actual? If yes, what version of Gradle do you use?

artdfel commented 4 years ago

Closed as obsolete.

javadba commented 4 years ago

Everything I have are brand new versions as of yesterday 4/5/20. I am seeing this error message: uncertain if it were for the same or a different issue. Here is the critical portion of build.gradle

buildscript {
    ext.kotlin_version = '1.3.71'

    repositories {
        mavenCentral()
        google()
        jcenter()
    }
    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
    }
}

plugins {
    id 'java'
    id 'application'
    id 'org.jetbrains.kotlin.multiplatform'
    id 'kotlinx-serialization'
}

group 'com.pointr'
version '0.1-SNAPSHOT'

apply plugin: 'kotlin'
apply plugin: 'maven-publish'
apply plugin: 'application'
apply plugin: 'kotlinx-serialization'

sourceCompatibility = 1.8

repositories {
    mavenCentral()
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
    implementation "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
    implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:$kotlin_version"
}

wrapper {
   gradleVersion = '6.3' //version required
}

compileKotlin {
    kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
    kotlinOptions.jvmTarget = "1.8"
}

application {
    mainClassName = 'pointr.bluej.WebHandler'
}
artdfel commented 4 years ago

Hi, @javadba! Please share the complete error message.

ImanX commented 3 years ago

Everything I have are brand new versions as of yesterday 4/5/20. I am seeing this error message: uncertain if it were for the same or a different issue. Here is the critical portion of build.gradle

buildscript {
    ext.kotlin_version = '1.3.71'

    repositories {
        mavenCentral()
        google()
        jcenter()
    }
    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
    }
}

plugins {
    id 'java'
    id 'application'
    id 'org.jetbrains.kotlin.multiplatform'
    id 'kotlinx-serialization'
}

group 'com.pointr'
version '0.1-SNAPSHOT'

apply plugin: 'kotlin'
apply plugin: 'maven-publish'
apply plugin: 'application'
apply plugin: 'kotlinx-serialization'

sourceCompatibility = 1.8

repositories {
    mavenCentral()
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
    implementation "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
    implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:$kotlin_version"
}

wrapper {
   gradleVersion = '6.3' //version required
}

compileKotlin {
    kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
    kotlinOptions.jvmTarget = "1.8"
}

application {
    mainClassName = 'pointr.bluej.WebHandler'
}

I faced out same error !