mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Projucer: Set the project name in Android settings.gradle file
This commit is contained in:
parent
d16a30a294
commit
f3ea7e2b29
1 changed files with 18 additions and 2 deletions
|
|
@ -116,7 +116,7 @@ public:
|
|||
androidCustomActivityClass (settings, Ids::androidCustomActivityClass, getUndoManager()),
|
||||
androidCustomApplicationClass (settings, Ids::androidCustomApplicationClass, getUndoManager(), getDefaultApplicationClass()),
|
||||
androidManifestCustomXmlElements (settings, Ids::androidManifestCustomXmlElements, getUndoManager()),
|
||||
androidGradleSettingsContent (settings, Ids::androidGradleSettingsContent, getUndoManager(), isLibrary() ? "include ':lib'" : "include ':app'"),
|
||||
androidGradleSettingsContent (settings, Ids::androidGradleSettingsContent, getUndoManager()),
|
||||
androidVersionCode (settings, Ids::androidVersionCode, getUndoManager(), "1"),
|
||||
androidMinimumSDK (settings, Ids::androidMinimumSDK, getUndoManager(), "16"),
|
||||
androidTargetSDK (settings, Ids::androidTargetSDK, getUndoManager(), "28"),
|
||||
|
|
@ -195,7 +195,7 @@ public:
|
|||
removeOldFiles (targetFolder);
|
||||
copyExtraResourceFiles();
|
||||
|
||||
writeFile (targetFolder, "settings.gradle", androidGradleSettingsContent.get().toString());
|
||||
writeFile (targetFolder, "settings.gradle", getGradleSettingsFileContent());
|
||||
writeFile (targetFolder, "build.gradle", getProjectBuildGradleFileContent());
|
||||
writeFile (appFolder, "build.gradle", getAppBuildGradleFileContent (modules));
|
||||
writeFile (targetFolder, "local.properties", getLocalPropertiesFileContent());
|
||||
|
|
@ -550,6 +550,22 @@ private:
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
String getGradleSettingsFileContent() const
|
||||
{
|
||||
MemoryOutputStream mo;
|
||||
mo.setNewLineString ("\n");
|
||||
|
||||
mo << "rootProject.name = " << "\'" << projectName << "\'" << newLine;
|
||||
mo << (isLibrary() ? "include ':lib'" : "include ':app'");
|
||||
|
||||
auto extraContent = androidGradleSettingsContent.get().toString();
|
||||
|
||||
if (extraContent.isNotEmpty())
|
||||
mo << newLine << extraContent << newLine;
|
||||
|
||||
return mo.toString();
|
||||
}
|
||||
|
||||
String getProjectBuildGradleFileContent() const
|
||||
{
|
||||
MemoryOutputStream mo;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue