// ********************************************************************** // // Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved. // // This copy of Ice is licensed to you under the terms described in the // ICE_LICENSE file included in this distribution. // // ********************************************************************** import org.apache.tools.ant.taskdefs.condition.Os // Discover the Android SDK home. // It either comes from the environment or from sdk.dir defined // in local.properties at the root of the android project. ext.androidSdkDir = System.env.ANDROID_HOME if(ext.androidSdkDir == null) { Properties localProps = new Properties() localProps.load(new FileInputStream(file("$rootProject.projectDir/local.properties"))) ext.androidSdkDir = localProps['sdk.dir'] } def cmdExt = Os.isFamily(Os.FAMILY_WINDOWS) ? '.bat' : '' ext.dxCmd = "${androidSdkDir}/build-tools/${ice_buildToolsVersion}/dx${cmdExt}"