0

I'm new to IntelliJ and Gradle I've got a Maven Project with a lot of dependencies which works on it's own. Now I should use the libraries from that Project and create a Plugin for IntelliJ in Gradle.

I tried various ways to add the dependencies in the IntelliJ Module Settings, which allowed me to use the needed classes to write my code and build it. However, when I tried to start the plugin, it couldn't find the classes anymore. I think I need to specify these in the build.gradle but I don't understand exactly how, as all the ways I tried didn't worked.

build.gradle:

    plugins {
    id 'java'
    id 'org.jetbrains.intellij' version '0.6.5'
}

group 'com.ast.devmate.intellij'
version '1.0-SNAPSHOT'

sourceCompatibility = 1.8

repositories {
    mavenCentral()
}

dependencies {
    testCompile group: 'junit', name: 'junit', version: '4.12'

    **compile 'com.ast.devmate.intellij:root:1.0.0-SNAPSHOT'**
}

// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
    version '2019.1'
}
patchPluginXml {
    changeNotes """
      Add change notes here.<br>
      <em>most HTML tags may be used</em>"""
}

gets me this: Could not find com.ast.devmate.intellij:root:1.0.0-SNAPSHOT.

without the line marked with ** I got a lot of error: package foo does not exist import foo;

1 Answers1

0

It looks like you're trying to access a custom library using Gradle. You will probably need to use a file dependency:

How to add local .jar file dependency to build.gradle file?