https://kotlinlang.org logo
Title
h

halirutan

01/29/2019, 5:40 PM
Hey everyone. Are Kotlin DSL for Gradle questions on topic here? I'm using the [gradle-intellij-plugin](https://github.com/JetBrains/gradle-intellij-plugin) and I recently switched from a Groovy
build.gradle
to
build.gradle.kts
. If I use the official release version of the gradle-intellij-plugin, everything works out and I can simply include it by using
plugins {
  id("org.jetbrains.intellij") version "0.4.2"
  id("java")
}
However, I need to use the latest snapshot version of this for Gradle 5.1.1, so I re-wrote this Groovy code
buildscript {
  repositories {
    mavenCentral()
    maven {
      url "<https://oss.sonatype.org/content/repositories/snapshots/>"
    }
    maven { 
      url '<http://dl.bintray.com/jetbrains/intellij-plugin-service>' 
    }
    
  }
  dependencies {
    classpath "org.jetbrains.intellij.plugins:gradle-intellij-plugin:0.5.0-SNAPSHOT"
  }
}

apply plugin: 'org.jetbrains.intellij'
to
buildscript {
  repositories {
    mavenCentral()
    maven("<https://oss.sonatype.org/content/repositories/snapshots/>")
    maven("<http://dl.bintray.com/jetbrains/intellij-plugin-service>")

  }
  dependencies {
    classpath("org.jetbrains.intellij.plugins:gradle-intellij-plugin:0.5.0-SNAPSHOT")
  }
}

plugins {
  id("org.jetbrains.intellij") version "0.5.0-SNAPSHOT"
  id("java")
}
d

Dominaezzz

01/29/2019, 5:48 PM
#gradle
Isn't that supposed to be
id("gradle-intellij-plugin")
?
This line should give a hint
- Plugin Repositories (could not resolve plugin artifact 'org.jetbrains.intellij:org.jetbrains.intellij.gradle.plugin:0.5.0-SNAPSHOT')
.
h

halirutan

02/27/2019, 9:40 AM
Sorry for answering so late. As it turned out, I needed an explicit
apply("org.jetbrains.intellij")
when I wanted to use the snapshot version. I don't really understand it, but it does the job. Thanks for your suggestion though.