mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-05 03:50:07 +00:00
Projucer: Only add optional Java source sets to Android projects when the module is enabled
This commit is contained in:
parent
29c4ef36ee
commit
4d566799ee
1 changed files with 27 additions and 11 deletions
|
|
@ -922,14 +922,13 @@ private:
|
|||
addModuleJavaFolderToSourceSet (javaSourceSets, javaFolder.getChildFile ("app"));
|
||||
}
|
||||
|
||||
if (project.getEnabledModules().isModuleEnabled ("juce_gui_basics")
|
||||
&& (getActivityClassString() == getDefaultActivityClass() || isContentSharingEnabled()))
|
||||
if (isUsingDefaultActivityClass() || isContentSharingEnabled())
|
||||
addOptJavaFolderToSourceSetsForModule (javaSourceSets, modules, "juce_gui_basics");
|
||||
|
||||
if (areRemoteNotificationsEnabled())
|
||||
addOptJavaFolderToSourceSetsForModule (javaSourceSets, modules, "juce_gui_extra");
|
||||
|
||||
if (project.getEnabledModules().isModuleEnabled ("juce_product_unlocking") && isInAppBillingEnabled())
|
||||
if (isInAppBillingEnabled())
|
||||
addOptJavaFolderToSourceSetsForModule (javaSourceSets, modules, "juce_product_unlocking");
|
||||
|
||||
MemoryOutputStream mo;
|
||||
|
|
@ -1223,6 +1222,7 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
String getActivityClassString() const
|
||||
{
|
||||
auto customActivityClass = androidCustomActivityClass.get().toString();
|
||||
|
|
@ -1234,17 +1234,33 @@ private:
|
|||
}
|
||||
|
||||
String getApplicationClassString() const { return androidCustomApplicationClass.get(); }
|
||||
String getJNIActivityClassName() const { return getActivityClassString().replaceCharacter ('.', '/'); }
|
||||
|
||||
bool arePushNotificationsEnabled() const { return androidPushNotifications.get(); }
|
||||
bool areRemoteNotificationsEnabled() const { return arePushNotificationsEnabled() && androidEnableRemoteNotifications.get(); }
|
||||
bool isUsingDefaultActivityClass() const { return getActivityClassString() == getDefaultActivityClass(); }
|
||||
|
||||
bool isInAppBillingEnabled() const { return androidInAppBillingPermission.get(); }
|
||||
|
||||
bool isContentSharingEnabled() const { return androidEnableContentSharing.get(); }
|
||||
|
||||
String getJNIActivityClassName() const
|
||||
//==============================================================================
|
||||
bool arePushNotificationsEnabled() const
|
||||
{
|
||||
return getActivityClassString().replaceCharacter ('.', '/');
|
||||
return project.getEnabledModules().isModuleEnabled ("juce_gui_extra")
|
||||
&& androidPushNotifications.get();
|
||||
}
|
||||
|
||||
bool areRemoteNotificationsEnabled() const
|
||||
{
|
||||
return arePushNotificationsEnabled()
|
||||
&& androidEnableRemoteNotifications.get();
|
||||
}
|
||||
|
||||
bool isInAppBillingEnabled() const
|
||||
{
|
||||
return project.getEnabledModules().isModuleEnabled ("juce_product_unlocking")
|
||||
&& androidInAppBillingPermission.get();
|
||||
}
|
||||
|
||||
bool isContentSharingEnabled() const
|
||||
{
|
||||
return project.getEnabledModules().isModuleEnabled ("juce_gui_basics")
|
||||
&& androidEnableContentSharing.get();
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue