Rename variable to not reference Qt5
In the Android gradle files, the variable qt5AndroidDir refers to Qt5 and might confuse users. This patch renames to qtAndroidDir. Pick-to: 6.2 Change-Id: Ib18a3cd2c38646e4c6c0435dae9234f0f7887eb5 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
parent
f6befd3e63
commit
95ef193715
@ -25,7 +25,7 @@ android {
|
|||||||
* The following variables:
|
* The following variables:
|
||||||
* - androidBuildToolsVersion,
|
* - androidBuildToolsVersion,
|
||||||
* - androidCompileSdkVersion
|
* - androidCompileSdkVersion
|
||||||
* - qt5AndroidDir - holds the path to qt android files
|
* - qtAndroidDir - holds the path to qt android files
|
||||||
* needed to build any Qt application
|
* needed to build any Qt application
|
||||||
* on Android.
|
* on Android.
|
||||||
*
|
*
|
||||||
@ -41,9 +41,9 @@ android {
|
|||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
manifest.srcFile 'AndroidManifest.xml'
|
manifest.srcFile 'AndroidManifest.xml'
|
||||||
java.srcDirs = [qt5AndroidDir + '/src', 'src', 'java']
|
java.srcDirs = [qtAndroidDir + '/src', 'src', 'java']
|
||||||
aidl.srcDirs = [qt5AndroidDir + '/src', 'src', 'aidl']
|
aidl.srcDirs = [qtAndroidDir + '/src', 'src', 'aidl']
|
||||||
res.srcDirs = [qt5AndroidDir + '/res', 'res']
|
res.srcDirs = [qtAndroidDir + '/res', 'res']
|
||||||
resources.srcDirs = ['resources']
|
resources.srcDirs = ['resources']
|
||||||
renderscript.srcDirs = ['src']
|
renderscript.srcDirs = ['src']
|
||||||
assets.srcDirs = ['assets']
|
assets.srcDirs = ['assets']
|
||||||
|
@ -2550,6 +2550,10 @@ bool buildAndroidProject(const Options &options)
|
|||||||
GradleProperties gradleProperties = readGradleProperties(gradlePropertiesPath);
|
GradleProperties gradleProperties = readGradleProperties(gradlePropertiesPath);
|
||||||
gradleProperties["android.bundle.enableUncompressedNativeLibs"] = "false";
|
gradleProperties["android.bundle.enableUncompressedNativeLibs"] = "false";
|
||||||
gradleProperties["buildDir"] = "build";
|
gradleProperties["buildDir"] = "build";
|
||||||
|
gradleProperties["qtAndroidDir"] = (options.qtInstallDirectory + QLatin1String("/src/android/java")).toUtf8();
|
||||||
|
// The following property "qt5AndroidDir" is only for compatibility.
|
||||||
|
// Projects using a custom build.gradle file may use this variable.
|
||||||
|
// ### Qt7: Remove the following line
|
||||||
gradleProperties["qt5AndroidDir"] = (options.qtInstallDirectory + QLatin1String("/src/android/java")).toUtf8();
|
gradleProperties["qt5AndroidDir"] = (options.qtInstallDirectory + QLatin1String("/src/android/java")).toUtf8();
|
||||||
gradleProperties["androidCompileSdkVersion"] = options.androidPlatform.split(QLatin1Char('-')).last().toLocal8Bit();
|
gradleProperties["androidCompileSdkVersion"] = options.androidPlatform.split(QLatin1Char('-')).last().toLocal8Bit();
|
||||||
gradleProperties["qtMinSdkVersion"] = options.minSdkVersion;
|
gradleProperties["qtMinSdkVersion"] = options.minSdkVersion;
|
||||||
|
Loading…
Reference in New Issue
Block a user