diff --git a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_AndroidStudio.h b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_AndroidStudio.h index 64f2598a82..9908d7ef02 100644 --- a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_AndroidStudio.h +++ b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_AndroidStudio.h @@ -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& 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; diff --git a/extras/Introjucer/Source/Utility/jucer_PresetIDs.h b/extras/Introjucer/Source/Utility/jucer_PresetIDs.h index f7b5063e53..fbd4007058 100644 --- a/extras/Introjucer/Source/Utility/jucer_PresetIDs.h +++ b/extras/Introjucer/Source/Utility/jucer_PresetIDs.h @@ -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);