Gradle build is failing in eclipse

(Naveenkumar G P) #1

Hi,
I have created one simple normal gradle project, and my contents of gradle is script is as following.
import org.ini4j.Ini
apply plugin: ‘java’
apply plugin: ‘eclipse’
repositories {
// Use ‘maven central’ for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
mavenCentral()
}
dependencies {
compile ‘org.slf4j:slf4j-api:1.7.5’
compile ‘org.ini4j:ini4j:0.5.4’
testCompile ‘junit:junit:4.11’
}
def jsonFile = file(‘vmodl2.json’)
def parsedJson = new groovy.json.JsonSlurper().parseText(jsonFile.text)
println parsedJson.properties.bar.type
def ini= new Ini()

when build the project with this i am getting following error message.

startup failed:
build file ‘/Users/ngp/eclipse-workspace3/Testini/build.gradle’: 1: unable to resolve class org.ini4j.Ini
@ line 1, column 1.
import org.ini4j.Ini
^

1 error

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 0.173 secs

can any one do help on this, or am i something to add?

0 Likes