sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #39959
[Bug 1410072] Re: [request] Java: to support Gradle: Stop using property variables in POM
Another workaround using default Gradle functionality is possible.
Like this:
compile ('com.sikulix:sikulixapi:1.1.0') {
exclude module: '${sikulix.libs}'
}
switch(System.getProperty('os.name').toLowerCase().split()[0]) {
case 'windows':
compile group: 'com.sikulix', name: 'sikulixlibswin', version: '1.1.0'
break
case 'linux':
compile group: 'com.sikulix', name: 'sikulixlibslux', version: '1.1.0'
break
case 'mac':
compile group: 'com.sikulix', name: 'sikulixlibsmac', version: '1.1.0' // MAC
break
default:
throw new Exception('Unknown OS')
}
Hope it helps!
Goncalo
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1410072
Title:
[request] Java: to support Gradle: Stop using property variables in
POM
Status in Sikuli:
In Progress
Bug description:
Gradle cannot currently resolve SikuliX 1.1.0-SNAPSHOT because of this
line "<artifactId>${sikulix.libs}</artifactId>."
> Could not find com.sikulix:${sikulix.libs}:1.1.0-SNAPSHOT.
Searched in the following locations:
http://repo1.maven.org/maven2/com/sikulix/$%7Bsikulix.libs%7D/1.1.0-SNAPSHOT/maven-metadata.xml
http://repo1.maven.org/maven2/com/sikulix/${sikulix.libs}/1.1.0-SNAPSHOT/${sikulix.libs}-1.1.0-SNAPSHOT.pom
http://repo1.maven.org/maven2/com/sikulix/${sikulix.libs}/1.1.0-SNAPSHOT/${sikulix.libs}-1.1.0-SNAPSHOT.jar
https://oss.sonatype.org/content/groups/public/com/sikulix/$%7Bsikulix.libs%7D/1.1.0-SNAPSHOT/maven-metadata.xml
https://oss.sonatype.org/content/groups/public/com/sikulix/${sikulix.libs}/1.1.0-SNAPSHOT/${sikulix.libs}-1.1.0-SNAPSHOT.pom
https://oss.sonatype.org/content/groups/public/com/sikulix/${sikulix.libs}/1.1.0-SNAPSHOT/${sikulix.libs}-1.1.0-SNAPSHOT.jar
Gradle does not resolve variables in POM files and discourages their
use.
http://forums.gradle.org/gradle/topics/handling_properties_in_maven_pom
Sample gradle file:
apply plugin: 'java'
apply plugin: 'idea'
repositories {
mavenCentral()
maven {
url "http://maven2.javacpp.googlecode.com/git/"
url "https://oss.sonatype.org/content/groups/public"
}
}
dependencies {
testCompile group: 'com.sikulix', name: 'sikulixapi', version: '1.1.0-SNAPSHOT'
}
Version used: 1.1.0-SNAPSHOT
64-Bit Ubuntu 14.04
Java 1.7.0_72 64-Bit
Gradle 2.0
To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1410072/+subscriptions
References