Skip to content

Commit

Permalink
Don't add public.app-category. prefix to appCategory by default (#1887)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyTsvetkov committed Feb 23, 2022
1 parent 4857f55 commit 08bdcea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -557,8 +557,8 @@ abstract class AbstractJPackageTask @Inject constructor(
val packageVersion = packageVersion.get()!!
plist[PlistKeys.CFBundleShortVersionString] = packageVersion
// If building for the App Store, use "utilities" as default just like jpackage.
val category = macAppCategory.orNull ?: (if (macAppStore.orNull == true) "utilities" else null)
plist[PlistKeys.LSApplicationCategoryType] = category?.let { "public.app-category.$it" } ?: "Unknown"
val category = macAppCategory.orNull ?: (if (macAppStore.orNull == true) "public.app-category.utilities" else null)
plist[PlistKeys.LSApplicationCategoryType] = category ?: "Unknown"
val packageBuildVersion = packageBuildVersion.orNull ?: packageVersion
plist[PlistKeys.CFBundleVersion] = packageBuildVersion
val year = Calendar.getInstance().get(Calendar.YEAR)
Expand Down
Expand Up @@ -441,7 +441,7 @@ The following platform-specific options are available
for details;
* `appStore = true` — build and sign for the Apple App Store. Requires at least JDK 17;
* `appCategory` — category of the app for the Apple App Store.
Default value is `utilities` when building for the App Store, `Unknown` otherwise.
Default value is `public.app-category.utilities` when building for the App Store, `Unknown` otherwise.
See [LSApplicationCategoryType](https://developer.apple.com/documentation/bundleresources/information_property_list/lsapplicationcategorytype) for a list of valid categories;
* `entitlementsFile.set(File("PATH_TO_ENTITLEMENTS"))` — a path to file containing entitlements to use when signing.
When a custom file is provided, make sure to add the entitlements that are required for Java apps.
Expand Down

0 comments on commit 08bdcea

Please sign in to comment.