Skip to content

Instantly share code, notes, and snippets.

@nickebbutt
Created December 3, 2016 18:53
Show Gist options
  • Save nickebbutt/cc8bd8b9232819d18c0e371f5432024d to your computer and use it in GitHub Desktop.
Save nickebbutt/cc8bd8b9232819d18c0e371f5432024d to your computer and use it in GitHub Desktop.
Fixing broken dependency on Sikulix libs (sikulix.libs) - from gradle build
//top of build.gradle:
import org.gradle.internal.os.OperatingSystem;
// In dependencies section:
// Sikuli makes use of a maven profile based on activation os family to set
// the sekulix.libs variable which determine which libs dependency gets brought in
// This technique appears not to be compatible with gradle - so we have to suppress the
// libs dependency and handle this here ourselves
compile ( group: 'com.sikulix', name: 'sikulixapi', version: '1.1.0') {
exclude group: 'com.sikulix', module: '${sikulix.libs}'
}
if (OperatingSystem.current().isWindows()) {
println 'Setting sikuli libs to Windows'
compile ( group: 'com.sikulix', name: 'sikulixlibswin', version: '1.1.0')
} else if ( OperatingSystem.current().isLinux() ) {
println 'Setting sikuli libs to Linux'
compile ( group: 'com.sikulix', name: 'sikulixlibslux', version: '1.1.0')
} else if ( OperatingSystem.current().isMacOsX() ) {
println 'Setting sikuli libs to Mac'
compile ( group: 'com.sikulix', name: 'sikulixlibsmac', version: '1.1.0')
} else {
throw new Exception('Unknown OS')
}
@nickebbutt
Copy link
Author

Sikuli makes use of a maven profile based on activation os family to set the sekulix.libs variable which determine which libs dependency gets brought in. This technique appears not to be compatible with gradle - so we have to suppress the libs dependency and handle this here ourselves

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment