summaryrefslogtreecommitdiff
path: root/android/gradle/dex.gradle
blob: 4e08cc67523d581c6d9f8ec424b0f82d70368fd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// **********************************************************************
//
// Copyright (c) 2003-2015 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}"