I am using Sikuli in my project to handle some flash buttons. It's working fine while running scripts locally. The issue is that when I need to run the build.gradle, I need to have the Sikuli dependency in build.gradle. That is how I have written build.gradle. When I run the build, I get this error:
What went wrong: Could not resolve all dependencies for configuration ':compile'.
Could not find com.googlecode.javacpp:javacpp:0.1. Required by: :new_qa_automation:1.0 > org.sikuli:sikuli-api:1.0.2 > org.sikuli:sikuli-c ore:1.0.1 Could not find com.googlecode.javacv:javacv:0.1. Required by: :new_qa_automation:1.0 > org.sikuli:sikuli-api:1.0.2 > org.sikuli:sikuli-c ore:1.0.1
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED.
Here is my build.gradle file
apply plugin: 'java' version = '1.0' apply plugin: 'project-report'
repositories { mavenCentral() maven { url "http://repo.springsource.org/release" url "http://oss.sonatype.org/content/groups/public/" } }
sourceCompatibility = 1.6 targetCompatibility = 1.6
configurations { cucumberRuntime { extendsFrom testRuntime } }
task test(overwrite: true) { dependsOn assemble, processTestResources, compileTestJava doLast { javaexec { main = "cucumber.api.cli.Main" classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
//some argssystemProperties System.properties } } }
dependencies { compile 'org.seleniumhq.selenium:selenium-java:2.32.+' compile 'org.apache.commons:commons-lang3:3.1' compile 'org.springframework:spring-context:3.2.3.RELEASE' compile group: 'org.sikuli', name: 'sikuli-api', version: '1.0.+' compile group: 'commons-collections', name: 'commons-collections', version: '3.+' testCompile 'info.cukes:cucumber-java:1.1.2' testCompile 'info.cukes:cucumber-spring:1.1.2'
testCompile 'info.cukes:cucumber-junit:1.1.2'
testCompile 'junit:junit:4.11' testCompile 'org.easytesting:fest-assert-core:2.0+' }
I added the URL for the Maven repositry. Now the error has changed to
ePage.java:9: error: package org.sikuli.script does not exist import org.sikuli.script.FindFailed;
sikuli-script.jar in Sikuli IDE project not provide in any repository so you must use it like a 3rd party jar
see: "Mavan's central repository will not answer on any Sikuli stuff" https://answers.launchpad.net/sikuli/+question/185713
"Gradle: Make a 3rd party jar available to local gradle repository" Gradle: Make a 3rd party jar available to local gradle repository