Hello, I'm getting a conflict version between my p...
# gradle
j
Hello, I'm getting a conflict version between my project and the buildSrc, using the
kotlin-dsl
plugin
c
Hi, show your code, please 🙂
plugin declaration parts of main build.gradle.kts and buildSrc's one.
j
my build.gradle.kts is pretty simple
Copy code
plugins {
`kotlin-dsl`
}
Copy code
buildscript {
    ext.kotlin_version = Versions.kotlin_stdlib // => 1.2.21
    repositories {
        google()
        jcenter()
        maven { url '<https://oss.sonatype.org/content/repositories/snapshots/>' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'

        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven { url '<https://oss.sonatype.org/content/repositories/snapshots/>' }
    }
}
c
strange... What is the exact error? Is it only in IDE or also when you try to run something like
./gradlew tasks
from command line?
Also, which version of gradle are you using?
j
It's just an IDE alert, gradle tasks are working fine. It messes with run configuration cause it is detected as broken configuration
I guess the issue is related to Idea/kotlin plugin, the buildSrc.iml contains
Copy code
<orderEntry type="library" exported="" scope="PROVIDED" name="kotlin-stdlib-1.1.51" level="project" />
    <orderEntry type="library" exported="" scope="PROVIDED" name="kotlin-reflect-1.1.51" level="project" />
c
Oh, that one you can ignore, I think
j
oh, can I just set which version of the stdlib should the kotlin-dsl use?
c
kotlin-dsl can only use what's embedded in gradle, which depends on gradle version
Gradle 4.5.1 includes kotlin 1.2.don't-remember support
j
thanks! I'm going to check if bumping gradle helps