Gradle recognizes no dependency on Intellij IDE

Asked

Viewed 387 times

0

My Gradle is configured like this:

plugins {
    id 'java'
}

version '1.0-SNAPSHOT'

sourceCompatibility = 1.8

repositories {
    mavenCentral()
}

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

    compile project (':core')

    compile group: 'org.fusesource', name: 'sigar', version: '1.6.4',
    compile 'com.fasterxml.jackson.core:jackson-core:2.7.1',
    compile 'com.fasterxml.jackson.core:jackson-databind:2.7.1-1',
    testCompile group: 'com.sun.net.httpserver', name: 'http', version: '20070405',
    compile 'org.apache.httpcomponents:httpclient:4.5.5';
}

And it returns an error when updating. I’m starting now, could someone help me? I’m using Intellij

1 answer

0


Try to remove the "," and the ; at the end of each line. At Gradle, you don’t need this.

  • I used to wear it in Eclipse like this, and I guess I never got in trouble. You think it might be the platform?

  • I think you might be confusing it with something else. Neither does Eclipse use "," or ";" at the end of the line for Gradle. Well, at least not in the dependency statement, as I recall. You may be confused with the code, but remember that they are two separate things. Here tells you everything you need to know about dependency declaration on our friend Gradle.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.