1buildscript { 2 repositories { 3 jcenter() 4 } 5 6 dependencies { 7 classpath 'com.android.tools.build:gradle:2.1.2' 8 } 9} 10 11allprojects { 12 repositories { 13 jcenter() 14 } 15} 16 17apply plugin: 'com.android.application' 18 19dependencies { 20 compile fileTree(dir: 'libs', include: ['*.jar']) 21} 22 23android { 24 /******************************************************* 25 * The following variables: 26 * - androidBuildToolsVersion, 27 * - androidCompileSdkVersion 28 * - qt5AndroidDir - holds the path to qt android files 29 * needed to build any Qt application 30 * on Android. 31 * 32 * are defined in gradle.properties file. This file is 33 * updated by QtCreator and androiddeployqt tools. 34 * Changing them manually might break the compilation! 35 *******************************************************/ 36 37 compileSdkVersion androidCompileSdkVersion.toInteger() 38 39 buildToolsVersion androidBuildToolsVersion 40 41 sourceSets { 42 main { 43 manifest.srcFile 'AndroidManifest.xml' 44 java.srcDirs = [qt5AndroidDir + '/src', 'src', 'java'] 45 aidl.srcDirs = [qt5AndroidDir + '/src', 'src', 'aidl'] 46 res.srcDirs = [qt5AndroidDir + '/res', 'res'] 47 resources.srcDirs = ['src'] 48 renderscript.srcDirs = ['src'] 49 assets.srcDirs = ['assets'] 50 jniLibs.srcDirs = ['libs'] 51 } 52 } 53 54 lintOptions { 55 abortOnError false 56 } 57} 58