Browse Source

Projucer: add "Custom gradle.settings content" field to Android exporter.

tags/2021-05-28
Lukasz Kozakiewicz 6 years ago
parent
commit
abff8ccfdf
2 changed files with 7 additions and 2 deletions
  1. +6
    -2
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h
  2. +1
    -0
      extras/Projucer/Source/Utility/Helpers/jucer_PresetIDs.h

+ 6
- 2
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h View File

@@ -97,7 +97,7 @@ public:
//==============================================================================
ValueWithDefault androidJavaLibs, androidAdditionalJavaFolders, androidAdditionalResourceFolders, androidRepositories, androidDependencies, androidScreenOrientation,
androidCustomActivityClass, androidCustomApplicationClass, androidManifestCustomXmlElements, androidVersionCode,
androidCustomActivityClass, androidCustomApplicationClass, androidManifestCustomXmlElements, androidGradleSettingsContent, androidVersionCode,
androidMinimumSDK, androidTargetSDK, androidTheme, androidSharedLibraries, androidStaticLibraries, androidExtraAssetsFolder,
androidOboeRepositoryPath, androidInternetNeeded, androidMicNeeded, androidCameraNeeded, androidBluetoothNeeded, androidExternalReadPermission,
androidExternalWritePermission, androidInAppBillingPermission, androidVibratePermission, androidOtherPermissions,
@@ -116,6 +116,7 @@ public:
androidCustomActivityClass (settings, Ids::androidCustomActivityClass, getUndoManager(), getDefaultActivityClass()),
androidCustomApplicationClass (settings, Ids::androidCustomApplicationClass, getUndoManager(), getDefaultApplicationClass()),
androidManifestCustomXmlElements (settings, Ids::androidManifestCustomXmlElements, getUndoManager()),
androidGradleSettingsContent (settings, Ids::androidGradleSettingsContent, getUndoManager(), isLibrary() ? "include ':lib'" : "include ':app'"),
androidVersionCode (settings, Ids::androidVersionCode, getUndoManager(), "1"),
androidMinimumSDK (settings, Ids::androidMinimumSDK, getUndoManager(), "16"),
androidTargetSDK (settings, Ids::androidTargetSDK, getUndoManager(), "28"),
@@ -204,7 +205,7 @@ public:
removeOldFiles (targetFolder);
copyExtraResourceFiles();
writeFile (targetFolder, "settings.gradle", isLibrary() ? "include ':lib'" : "include ':app'");
writeFile (targetFolder, "settings.gradle", androidGradleSettingsContent.get().toString());
writeFile (targetFolder, "build.gradle", getProjectBuildGradleFileContent());
writeFile (appFolder, "build.gradle", getAppBuildGradleFileContent (modules));
writeFile (targetFolder, "local.properties", getLocalPropertiesFileContent());
@@ -990,6 +991,9 @@ private:
"If adding any java libs in \"Java libraries to include\" setting, do not add them here as "
"they will be added automatically.");
props.add (new TextPropertyComponent (androidGradleSettingsContent, "Custom gradle.settings content", 32768, true),
"You can customize the content of settings.gradle here");
props.add (new ChoicePropertyComponent (androidScreenOrientation, "Screen Orientation",
{ "Portrait and Landscape", "Portrait", "Landscape" },
{ "unspecified", "portrait", "landscape" }),


+ 1
- 0
extras/Projucer/Source/Utility/Helpers/jucer_PresetIDs.h View File

@@ -213,6 +213,7 @@ namespace Ids
DECLARE_ID (androidInternetNeeded);
DECLARE_ID (androidArchitectures);
DECLARE_ID (androidManifestCustomXmlElements);
DECLARE_ID (androidGradleSettingsContent);
DECLARE_ID (androidCustomStringXmlElements);
DECLARE_ID (androidBluetoothNeeded);
DECLARE_ID (androidExternalReadNeeded);


Loading…
Cancel
Save