Created
December 3, 2016 18:53
-
-
Save nickebbutt/cc8bd8b9232819d18c0e371f5432024d to your computer and use it in GitHub Desktop.
Fixing broken dependency on Sikulix libs (sikulix.libs) - from gradle build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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