Alexander von Zitzewitz wrote:
>
> Is it possible to make gradle automatically pick the right options
> depending on the operating system it is running on? I'd need differend jni
> blocks for different OS. Any idea is highly appreciated.
>
Gradle has an OperatingSystem class, but it's not yet part of the public
API. Hence I recommend the following:
def os = System.getProperty("os.name").toLowerCase()
if (os.contains("windows") { ... }
else if (os.contains("mac os") { ... }
else { ... } // assume Linux
--
Peter Niederwieser
Principal Engineer, Gradleware
http://gradleware.com
Creator, Spock Framework
http://spockframework.org
Twitter: @pniederw
--
View this message in context:
http://gradle.1045684.n5.nabble.com/How-to-create-os-specific-configurations-tp4659408p4660170.html
Sent from the gradle-user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email