Fix build error with scons-4.4.0 version which is based on python3
[platform/upstream/iotivity.git] / extlibs / android / gradle / SConscript
1 import os, sys, platform, subprocess
2
3 Import('env')
4
5 env = env.Clone()
6 ndk_env = env.Clone()
7 SConscript('../../../build_common/external_libs.scons')
8
9 target_os = env.get('TARGET_OS')
10 host_os = sys.platform
11 print(host_os)
12 SConscript('../../../build_common/external_libs.scons')
13 ######################################################################
14 # Build flags
15 ######################################################################
16 src_dir = env.get('SRC_DIR')
17
18 path = os.path.join(src_dir, 'extlibs', 'android', 'gradle', 'gradle-2.2.1')
19
20 # check 'gradle' library, if it doesn't exits, ask user to download it
21 if not os.path.exists(path):
22         gradle_zip = env.Download('gradle2.2.1.zip', 'https://services.gradle.org/distributions/gradle-2.2.1-all.zip')
23         gradle_dir = env.UnpackAll('gradle-2.2.1', gradle_zip)
24         print('''
25 ***********************************************************************
26 * Downloading gradle:                    *
27 *******************************************************************************
28 ''')
29