Skip to content

Commit d3ae4e1

Browse files
[One .NET] version .NET 6 packages with Android API level (#5924)
Our current versions for .NET 6 packages use the Android OS Version version number, with `XXX` is the git "commit distance": 11.0.200-preview.4.XXX e.g. (via c1fafcb1): Microsoft.Android.Runtime.android-arm64.11.0.200-preview.4.251.nupkg This is the only place where Android "11" remains, as we have been using the Android API level for all other versions in .NET 6, e.g. commit 91498d5. We should instead use an API-level, such as: 30.0.100-preview.4.XXX as in: Microsoft.Android.Runtime.android-arm64.30.0.100-ci.pr.gh5924.1.nupkg We believe that this will make things less confusing, as this matches the Android Target Framework Moniker as well: net6.0-android30
1 parent 69e0b02 commit d3ae4e1

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

Directory.Build.props

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@
1616
<ProductVersion>11.3.99</ProductVersion>
1717
<!-- NuGet package version numbers. See Documentation/guides/OneDotNet.md.
1818
Rules:
19+
* Major/Minor match Android stable API level, such as 30.0 for API 30.
1920
* Reset patch version (third number) to 100 every time either major or minor version is bumped.
2021
* Bump last two digits of the patch version for service releases.
2122
* Bump first digit of the patch version for feature releases (and reset the first two digits to 0)
2223
-->
23-
<AndroidPackVersion>11.0.200</AndroidPackVersion>
24+
<AndroidPackVersion>30.0.100</AndroidPackVersion>
2425
</PropertyGroup>
2526

2627
<!-- Common <PackageReference/> versions -->

Documentation/guides/OneDotNet.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,8 @@ see the [net6-samples][net6-samples] repo.
293293

294294
This is the package version scheme: `OS-Major.OS-Minor.InternalRelease[-prereleaseX]+sha.1b2c3d4`.
295295

296-
* Major: The major OS version.
297-
* Minor: The minor OS version.
296+
* Major: The highest stable API level, such as 30. On Apple platforms, this is the major OS version.
297+
* Minor: Always 0 for Android. On Apple platforms, this is the minor OS version.
298298
* Patch: Our internal release version based on `100` as a starting point.
299299
* Service releases will bump the last two digits of the patch version
300300
* Feature releases will round the patch version up to the nearest 100
@@ -305,16 +305,16 @@ This is the package version scheme: `OS-Major.OS-Minor.InternalRelease[-prerelea
305305
* For CI we use a `ci` prefix + the branch name (cleaned up to only be
306306
alphanumeric) + the commit distance (number of commits since any of the
307307
major.minor.patch versions changed).
308-
* Example: `10.0.100-ci.master.1234`
308+
* Example: `30.0.100-ci.master.1234`
309309
* Alphanumeric means `a-zA-Z0-9-`: any character not in this range
310310
will be replaced with a `-`.
311311
* Pull requests have `pr` prefix, followed by `gh`+ PR number + commit
312312
distance.
313-
* Example: `10.1.200-ci.pr.gh3333.1234`
313+
* Example: `30.0.200-ci.pr.gh3333.1234`
314314
* If we have a particular feature we want people to subscribe to (such as
315315
an Android preview release), we publish previews with a custom pre-release
316316
identifier:
317-
* Example: `10.1.100-android-r.beta.1`
317+
* Example: `30.0.100-android-r.beta.1`
318318
* This way people can sign up for only official previews, by
319319
referencing `*-android-r.beta.*`
320320
* It's still possible to sign up for all `android-r` builds, by
@@ -324,15 +324,15 @@ This is the package version scheme: `OS-Major.OS-Minor.InternalRelease[-prerelea
324324
* Use the short hash because the long hash is quite long and
325325
cumbersome. This leaves the complete version open for duplication,
326326
but this is extremely unlikely.
327-
* Example: `10.0.100+sha.1a2b3c`
328-
* Example (CI build): `10.0.100-ci.master.1234+sha.1a2b3c`
327+
* Example: `30.0.100+sha.1a2b3c`
328+
* Example (CI build): `30.0.100-ci.master.1234+sha.1a2b3c`
329329
* Since the build metadata is required for all builds, we're able to
330330
recognize incomplete version numbers and determine if a particular
331331
version string refers to a stable version or not.
332-
* Example: `10.0.100`: incomplete version
333-
* Example: `10.0.100+sha.1a2b3c`: stable
334-
* Example: `10.0.100-ci.d17-0.1234+sha.1a2b3c`: CI build
335-
* Example: `10.0.100-android-r.beta.1+sha.1a2b3c`: official
332+
* Example: `30.0.100`: incomplete version
333+
* Example: `30.0.100+sha.1a2b3c`: stable
334+
* Example: `30.0.100-ci.d17-0.1234+sha.1a2b3c`: CI build
335+
* Example: `30.0.100-android-r.beta.1+sha.1a2b3c`: official
336336
preview
337337
* Technically it's possible to remove the prerelease part, but
338338
we’d still be able to figure out it’s not a stable version by

0 commit comments

Comments
 (0)