Skip to content

Commit

Permalink
[Mono.Android] Update BuildVersionCodes.R value to 30. (#5725)
Browse files Browse the repository at this point in the history
Fixes: #5723

Our enumification process stores the value of the constants in
`map.csv`.  The build version code constant for a preview API level
is 10000, but changes to e.g.: 30 when the API goes stable.

Depending on when enumification was done, the 10000 may be
accidentally stored instead of 30.

When the API goes stable we must update `map.csv` to have the
correct value.

Update the enum value `Android.OS.BuildVersionCodes.R` to `30`.

Add this note to the in-progress "Adding a new API Level" checklist
for our future benefit.
  • Loading branch information
jpobst authored Mar 12, 2021
1 parent afc0358 commit 1b1ec09
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
12 changes: 12 additions & 0 deletions Documentation/workflow/HowToAddNewApiLevel.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,16 @@ the latest tool versions are being used.

The major version should match the new API level. For Android P this will be 28.x.x . If a version which exactly matches the API Level is not available then the latest version should be used.

## Bindings Finalization


### Update BuildVersionCodes API Level Value

Our enumification process stores the value of the constants in `map.csv`. The build version code
constant for the preview API level is 10000, but changes to eg: 31 when the API goes stable.

Depending on when enumification was done, the 10000 may be stored instead of 31. When the API
goes stable we must update `map.csv` to the correct value.

Search for `android/os/Build$VERSION_CODES` in `map.csv`.

2 changes: 1 addition & 1 deletion src/Mono.Android/map.csv
Original file line number Diff line number Diff line change
Expand Up @@ -6816,7 +6816,7 @@ E,26,android/os/Build$VERSION_CODES.O,26,Android.OS.BuildVersionCodes,O,remove,
E,27,android/os/Build$VERSION_CODES.O_MR1,27,Android.OS.BuildVersionCodes,OMr1,remove,
E,28,android/os/Build$VERSION_CODES.P,28,Android.OS.BuildVersionCodes,P,remove,
E,29,android/os/Build$VERSION_CODES.Q,29,Android.OS.BuildVersionCodes,Q,remove,
E,30,android/os/Build$VERSION_CODES.R,10000,Android.OS.BuildVersionCodes,R,remove,
E,30,android/os/Build$VERSION_CODES.R,30,Android.OS.BuildVersionCodes,R,remove,
A,0,,0,Android.OS.DebugShow,Default,remove,
E,10,android/os/Debug.SHOW_CLASSLOADER,2,Android.OS.DebugShow,Classloader,remove,
E,10,android/os/Debug.SHOW_FULL_DETAIL,1,Android.OS.DebugShow,FullDetail,remove,
Expand Down
3 changes: 2 additions & 1 deletion tests/api-compatibility/acceptable-breakages-vReference.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ CannotRemoveAttribute : Attribute 'System.ComponentModel.CategoryAttribute' exis
CannotRemoveAttribute : Attribute 'System.ComponentModel.CategoryAttribute' exists on 'Android.Content.ContentProviderAttribute.Icon' in the contract but not the implementation.
CannotRemoveAttribute : Attribute 'System.ComponentModel.CategoryAttribute' exists on 'Android.Content.ContentProviderAttribute.Label' in the contract but not the implementation.
CannotRemoveAttribute : Attribute 'System.ComponentModel.CategoryAttribute' exists on 'Android.Content.ContentProviderAttribute.RoundIcon' in the contract but not the implementation.
CannotRemoveAttribute : Attribute 'System.Runtime.Serialization.DataContractAttribute' exists on 'Java.Lang.Object' in the contract but not the implementation.
CannotRemoveAttribute : Attribute 'System.Runtime.Serialization.DataContractAttribute' exists on 'Java.Lang.Object' in the contract but not the implementation.
EnumValuesMustMatch : Enum value 'Android.OS.BuildVersionCodes Android.OS.BuildVersionCodes.R' is (System.Int32)30 in the implementation but (System.Int32)10000 in the contract.

0 comments on commit 1b1ec09

Please sign in to comment.