Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle task packageDmg does not allow for Semantic Versioning (SemVer) #2360

Open
dhsilber opened this issue Oct 5, 2022 · 4 comments · May be fixed by #4874
Open

Gradle task packageDmg does not allow for Semantic Versioning (SemVer) #2360

dhsilber opened this issue Oct 5, 2022 · 4 comments · May be fixed by #4874

Comments

@dhsilber
Copy link

dhsilber commented Oct 5, 2022

Using kotlin 1.7.10 and compose desktop 1.2.0-beta02, I am unable to specify a value for packageVersion where the major number is zero or to append a pre-release version string.

This prevents me from using Semantic Versioning.

@igordmn
Copy link
Collaborator

igordmn commented Oct 5, 2022

Does it work with Compose 1.1.1? As far as I remember, some platforms don't allow to name versions this way.

@dhsilber
Copy link
Author

dhsilber commented Oct 5, 2022

With id("org.jetbrains.compose") version "1.1.1" (and kotlin 1.6.20) I get the same problem. I no longer think it is in the gradle plugin, but instead when gradle executes nativeDistributions I get this message:

A problem occurred configuring root project 'Theater'.
> * Illegal version for 'Dmg': '0.1.0' is not a valid version.
    * Correct format: 'MAJOR[.MINOR][.PATCH]', where:
      * MAJOR is an integer > 0;
      * MINOR is an optional non-negative integer;
      * PATCH is an optional non-negative integer;
    * You can specify the correct version using DSL properties: nativeDistributions.macOS.dmgPackageVersion, nativeDistributions.macOS.packageVersion, nativeDistributions.packageVersion

atsushieno added a commit to atsushieno/kmmk that referenced this issue Oct 16, 2022
It still cannot be reflected to desktop build.gradle due to this bug:
JetBrains/compose-multiplatform#2360
@m-sasha
Copy link
Contributor

m-sasha commented Dec 22, 2022

It's probably because Apple (used to) require this about CFBundleVersion:

The build version number should be a string comprised of three non-negative, period-separated integers with the first integer being greater than zero

https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102364

I think the gradle task enforces this, so that you don't end up with apps that don't run or can't be uploaded to the App Store.

Interestingly, in the most recent docs they've seemed to omit the requirement for the major version to be greater than zero: https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleversion

@Burtan
Copy link

Burtan commented Jun 9, 2023

Any workaround? This makes it impossible to create pre-release installers on mac.

@samliddleg samliddleg linked a pull request May 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants