plugins { id 'com.android.application' version '8.3.0' id 'org.qtproject.qt.gradleplugin' version '1.2' } def home = System.properties['user.home'] def ndkPath = System.getenv('ANDROID_NDK_ROOT') QtBuild { qtPath = file(home + '/work/install') projectPath = file('qml/') qtKitDir = file(home + '/work/install/target') extraCMakeArguments = ['-DANDROID_NDK_ROOT=' + ndkPath] } android { /******************************************************* * The following variables: * - androidBuildToolsVersion, * - androidCompileSdkVersion * - qtAndroidDir - holds the path to qt android files * needed to build any Qt application * on Android. * - qtGradlePluginType - whether to build an app or a library * * are defined in gradle.properties file. This file is * updated by QtCreator and androiddeployqt tools. * Changing them manually might break the compilation! *******************************************************/ namespace androidPackageName compileSdkVersion androidCompileSdkVersion buildToolsVersion androidBuildToolsVersion ndkVersion androidNdkVersion sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = [qtAndroidDir + '/src', 'src', 'java'] res.srcDirs = [qtAndroidDir + '/res', 'res'] } } tasks.withType(JavaCompile) { options.incremental = true } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } lintOptions { abortOnError false } // Do not compress Qt binary resources file aaptOptions { noCompress 'rcc' } defaultConfig { resConfig "en" minSdkVersion qtMinSdkVersion targetSdkVersion qtTargetSdkVersion ndk.abiFilters = qtTargetAbiList.split(",") } }