1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-05 03:50:07 +00:00

Added NDK platform version setting to Android Studio exporter

This commit is contained in:
Joshua Gerrard 2015-11-09 17:48:00 +00:00
parent cd67db7478
commit 4400db5969
2 changed files with 14 additions and 2 deletions

View file

@ -70,8 +70,14 @@ public:
void createExporterProperties (PropertyListBuilder& props) override
{
AndroidProjectExporterBase::createExporterProperties (props);
props.add (new TextPropertyComponent (getNDKPlatformVersionValue(), "NDK Platform Version", 32, false),
"The value to use for android$user.ndk.platformVersion in Gradle");
}
Value getNDKPlatformVersionValue() { return getSetting (Ids::androidNdkPlatformVersion); }
String getNDKPlatformVersionString() const { return settings [Ids::androidNdkPlatformVersion]; }
void create (const OwnedArray<LibraryModule>& modules) const override
{
const File targetFolder (getTargetFolder());
@ -443,12 +449,17 @@ private:
String createModelDotAndroidNDK (const String& indent) const
{
String result;
const String platformVersion (getNDKPlatformVersionString());
result << "android.ndk {" << newLine
<< indent << "moduleName = \"juce_jni\"" << newLine
<< indent << "stl = \"gnustl_static\"" << newLine
<< indent << "toolchainVersion = 4.9" << newLine
<< indent << "ext {" << newLine
<< indent << "toolchainVersion = 4.9" << newLine;
if (platformVersion.isNotEmpty())
result << indent << "platformVersion = " << getNDKPlatformVersionString() << newLine;
result << indent << "ext {" << newLine
<< indent << indent << "juceRootDir = \"" << "${project.rootDir}/../../../../" << "\".toString()" << newLine
<< indent << indent << "juceModuleDir = \"" << "${juceRootDir}/modules" << "\".toString()" << newLine
<< indent << "}" << newLine;

View file

@ -155,6 +155,7 @@ namespace Ids
DECLARE_ID (androidTheme);
DECLARE_ID (androidStaticLibraries);
DECLARE_ID (androidSharedLibraries);
DECLARE_ID (androidNdkPlatformVersion);
DECLARE_ID (font);
DECLARE_ID (colour);
DECLARE_ID (userNotes);