Problems configuring gradle project in Eclipse


(Srinivas Aditya ) #1

Hi

I am new to Gradle . I am trying to setup my Selenium test automation project in Eclipse. Any help in this matter would be highly appreciated

I created a Gradle project using the wizard provided by Eclipse. I created packages in src/test/java and currently they are empty. I added content to the gradle.build file. I did a gradle clean and gradle build. It downloaded all dependencies. But I get error Build Path contains Duplicate Entries.


I am attaching images and gradle.build file for reference. Can someone kindly take a look and suggest me on how the resolve the issue

apply plugin : ‘eclipse’
apply plugin: ‘java’

sourceCompatibility = 1.8

repositories {
jcenter()
mavenCentral()
}

buildscript {
repositories {
mavenLocal()
jcenter()
}

dependencies {
    classpath("net.serenity-bdd:serenity-gradle-plugin:1.9.20")
}

}

apply plugin: ‘java’
apply plugin: ‘eclipse’
apply plugin: ‘idea’
apply plugin: ‘net.serenity-bdd.aggregator’

dependencies {
compile ‘org.projectlombok:lombok:1.18.0’

testCompile('org.slf4j:slf4j-simple:1.7.25')
testCompile('org.assertj:assertj-core:3.10.0')
testCompile 'junit:junit:4.12'
testCompile 'info.cukes:cucumber-java:1.2.5'
testCompile 'info.cukes:cucumber-junit:1.2.5'
testCompile 'net.serenity-bdd:serenity-core:1.9.20'
testCompile 'net.serenity-bdd:serenity-junit:1.9.20'
testCompile 'net.serenity-bdd:serenity-screenplay:1.9.20'
testCompile 'net.serenity-bdd:browse-the-web:1.1.34'
testCompile('com.googlecode.lambdaj:lambdaj:2.3.3')
testCompile('org.seleniumhq.selenium:selenium-server:3.12.0')
testCompile 'org.seleniumhq.selenium:selenium-java:3.12.0'

}

gradle.startParameter.continueOnFailure = true

task compile << {
println ‘compiling source’
}

task compileTest(dependsOn: compile) << {
println ‘compiling unit tests’
}

task dist(dependsOn: [compile, test]) << {
println ‘building the distribution’
}

Regards

Srinivas