Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixes: xamarin/java.interop#969
Fixes: xamarin/java.interop#982
Fixes: xamarin/java.interop#984

Changes: xamarin/java.interop@fadbb82...032f1e7

  * xamarin/java.interop@032f1e71: [Xamarin.Android.Tools.Bytecode-Tests] Fix BuildClasses (#1013)
  * xamarin/java.interop@0eaa47e1: [Java.Interop.Tools.JavaCallableWrappers] NRT Support (#1012)
  * xamarin/java.interop@45fe3928: [generator] BG8403 when type name matches enclosing namespace name (#1010)
  * xamarin/java.interop@fe60483b: [generator] Mark abstract methods as [Obsolete] if needed (#1011)
  * xamarin/java.interop@275fa755: [generator] Kotlin metadata can apply to multiple Java method (#1009)
  * xamarin/java.interop@3ff6f8fb: [Java.Base] Fix CS0108 Warnings (#1008)

Of note is xamarin/java.interop@fe60483b, which can cause public
members to become marked as `[Obsolete]`.  These members *always*
should have been `[Obsolete]`, but weren't.  (Oops.)  This also
required changes to the `Mono.Android` API-compat checks.

Also of note is xamarin/java.interop@45fe3928, which introduces a new
BG8403 binding warning when a bound type has the same name as its
enclosing namespace name-part, e.g. `Example.View.View`.
  • Loading branch information
jpobst committed Jul 19, 2022
1 parent 057265d commit ace5f71
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion external/Java.Interop
Submodule Java.Interop updated 38 files
+12 −12 src/Java.Base-ref.cs
+1 −2 src/Java.Base/Java.Base.csproj
+40 −0 src/Java.Base/Transforms/Metadata.xml
+9 −0 src/Java.Interop.Localization/Resources.Designer.cs
+4 −0 src/Java.Interop.Localization/Resources.resx
+5 −0 src/Java.Interop.Localization/xlf/Resources.cs.xlf
+5 −0 src/Java.Interop.Localization/xlf/Resources.de.xlf
+5 −0 src/Java.Interop.Localization/xlf/Resources.es.xlf
+5 −0 src/Java.Interop.Localization/xlf/Resources.fr.xlf
+5 −0 src/Java.Interop.Localization/xlf/Resources.it.xlf
+5 −0 src/Java.Interop.Localization/xlf/Resources.ja.xlf
+5 −0 src/Java.Interop.Localization/xlf/Resources.ko.xlf
+5 −0 src/Java.Interop.Localization/xlf/Resources.pl.xlf
+5 −0 src/Java.Interop.Localization/xlf/Resources.pt-BR.xlf
+5 −0 src/Java.Interop.Localization/xlf/Resources.ru.xlf
+5 −0 src/Java.Interop.Localization/xlf/Resources.tr.xlf
+5 −0 src/Java.Interop.Localization/xlf/Resources.zh-Hans.xlf
+5 −0 src/Java.Interop.Localization/xlf/Resources.zh-Hant.xlf
+9 −7 src/Java.Interop.NamingCustomAttributes/Android.Runtime/RegisterAttribute.cs
+7 −5 src/Java.Interop.NamingCustomAttributes/Java.Interop/ExportAttribute.cs
+1 −1 src/Java.Interop.Tools.Diagnostics/Java.Interop.Tools.Diagnostics/Diagnostic.cs
+19 −4 src/Java.Interop.Tools.Generator/Utilities/Report.cs
+1 −0 src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers.csproj
+2 −2 src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/IdentifierValidator.cs
+95 −71 ....Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/JavaCallableWrapperGenerator.cs
+9 −9 src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/JavaTypeScanner.cs
+9 −10 src/Java.Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/TypeNameMapGenerator.cs
+11 −3 src/Java.Interop.Tools.TypeNameMappings/Java.Interop.Tools.TypeNameMappings/JavaNativeTypeManager.cs
+25 −23 src/Xamarin.Android.Tools.Bytecode/Kotlin/KotlinFixups.cs
+1 −0 tests/Java.Interop.Tools.JavaCallableWrappers-Tests/Java.Interop.Tools.JavaCallableWrappers-Tests.csproj
+22 −0 tests/Xamarin.Android.Tools.Bytecode-Tests/KotlinFixupsTests.cs
+1 −1 tests/Xamarin.Android.Tools.Bytecode-Tests/Xamarin.Android.Tools.Bytecode-Tests.targets
+69 −0 tests/generator-Tests/Unit-Tests/CodeGeneratorTests.cs
+45 −0 tools/generator/Extensions/StringExtensions.cs
+4 −0 tools/generator/Java.Interop.Tools.Generator.CodeGeneration/JavaInteropCodeGenerator.cs
+1 −3 tools/generator/SourceWriters/BoundMethodAbstractDeclaration.cs
+13 −0 tools/generator/SourceWriters/Extensions/SourceWriterExtensions.cs
+1 −0 tools/jnimarshalmethod-gen/Xamarin.Android.Tools.JniMarshalMethodGenerator.csproj
1 change: 1 addition & 0 deletions tests/api-compatibility/acceptable-breakages-v10.0.txt
Expand Up @@ -111,3 +111,4 @@ CannotRemoveAttribute : Attribute 'Android.Runtime.RequiresPermissionAttribute'
CannotRemoveAttribute : Attribute 'Android.Runtime.RequiresPermissionAttribute' exists on 'Android.Telephony.TelephonyManager.ServiceState.get()' in the contract but not the implementation.
CannotChangeAttribute : Attribute 'Android.Runtime.RequiresPermissionAttribute' on 'Android.Telephony.TelephonyManager.SimSerialNumber.get()' changed from '[RequiresPermissionAttribute("android.permission.READ_PHONE_STATE")]' in the contract to '[RequiresPermissionAttribute("android.permission.READ_PRIVILEGED_PHONE_STATE")]' in the implementation.
CannotChangeAttribute : Attribute 'Android.Runtime.RequiresPermissionAttribute' on 'Android.Telephony.TelephonyManager.SubscriberId.get()' changed from '[RequiresPermissionAttribute("android.permission.READ_PHONE_STATE")]' in the contract to '[RequiresPermissionAttribute("android.permission.READ_PRIVILEGED_PHONE_STATE")]' in the implementation.
CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'Android.Locations.SettingInjectorService.OnGetSummary()' in the contract but not the implementation.
10 changes: 0 additions & 10 deletions tests/api-compatibility/acceptable-breakages-v5.1.txt
Expand Up @@ -7,12 +7,9 @@ CannotMakeMemberAbstract : Member 'public System.Boolean Android.Webkit.CookieMa
CannotMakeMemberAbstract : Member 'public void Android.Webkit.CookieManager.Flush()' is abstract in the implementation but is not abstract in the contract.
CannotMakeMemberAbstract : Member 'public System.String Android.Webkit.CookieManager.GetCookie(System.String)' is abstract in the implementation but is not abstract in the contract.
CannotMakeMemberAbstract : Member 'public System.Boolean Android.Webkit.CookieManager.HasCookies.get()' is abstract in the implementation but is not abstract in the contract.
CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'Android.Webkit.CookieManager.RemoveAllCookie()' in the contract but not the implementation.
CannotMakeMemberAbstract : Member 'public void Android.Webkit.CookieManager.RemoveAllCookie()' is abstract in the implementation but is not abstract in the contract.
CannotMakeMemberAbstract : Member 'public void Android.Webkit.CookieManager.RemoveAllCookies(Android.Webkit.IValueCallback)' is abstract in the implementation but is not abstract in the contract.
CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'Android.Webkit.CookieManager.RemoveExpiredCookie()' in the contract but not the implementation.
CannotMakeMemberAbstract : Member 'public void Android.Webkit.CookieManager.RemoveExpiredCookie()' is abstract in the implementation but is not abstract in the contract.
CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'Android.Webkit.CookieManager.RemoveSessionCookie()' in the contract but not the implementation.
CannotMakeMemberAbstract : Member 'public void Android.Webkit.CookieManager.RemoveSessionCookie()' is abstract in the implementation but is not abstract in the contract.
CannotMakeMemberAbstract : Member 'public void Android.Webkit.CookieManager.RemoveSessionCookies(Android.Webkit.IValueCallback)' is abstract in the implementation but is not abstract in the contract.
CannotMakeMemberAbstract : Member 'public void Android.Webkit.CookieManager.SetAcceptCookie(System.Boolean)' is abstract in the implementation but is not abstract in the contract.
Expand Down Expand Up @@ -108,14 +105,12 @@ CannotMakeMemberAbstract : Member 'public System.Boolean Android.Webkit.WebSetti
CannotMakeMemberAbstract : Member 'public void Android.Webkit.WebSettings.DisplayZoomControls.set(System.Boolean)' is abstract in the implementation but is not abstract in the contract.
CannotMakeMemberAbstract : Member 'public System.Boolean Android.Webkit.WebSettings.DomStorageEnabled.get()' is abstract in the implementation but is not abstract in the contract.
CannotMakeMemberAbstract : Member 'public void Android.Webkit.WebSettings.DomStorageEnabled.set(System.Boolean)' is abstract in the implementation but is not abstract in the contract.
CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'Android.Webkit.WebSettings.EnableSmoothTransition()' in the contract but not the implementation.
CannotMakeMemberAbstract : Member 'public System.Boolean Android.Webkit.WebSettings.EnableSmoothTransition()' is abstract in the implementation but is not abstract in the contract.
CannotMakeMemberAbstract : Member 'public System.String Android.Webkit.WebSettings.FantasyFontFamily.get()' is abstract in the implementation but is not abstract in the contract.
CannotMakeMemberAbstract : Member 'public void Android.Webkit.WebSettings.FantasyFontFamily.set(System.String)' is abstract in the implementation but is not abstract in the contract.
CannotMakeMemberAbstract : Member 'public System.String Android.Webkit.WebSettings.FixedFontFamily.get()' is abstract in the implementation but is not abstract in the contract.
CannotMakeMemberAbstract : Member 'public void Android.Webkit.WebSettings.FixedFontFamily.set(System.String)' is abstract in the implementation but is not abstract in the contract.
CannotMakeMemberAbstract : Member 'public Android.Webkit.WebSettings.LayoutAlgorithm Android.Webkit.WebSettings.GetLayoutAlgorithm()' is abstract in the implementation but is not abstract in the contract.
CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'Android.Webkit.WebSettings.GetPluginState()' in the contract but not the implementation.
CannotMakeMemberAbstract : Member 'public Android.Webkit.WebSettings.PluginState Android.Webkit.WebSettings.GetPluginState()' is abstract in the implementation but is not abstract in the contract.
CannotMakeMemberAbstract : Member 'public System.Boolean Android.Webkit.WebSettings.JavaScriptCanOpenWindowsAutomatically.get()' is abstract in the implementation but is not abstract in the contract.
CannotMakeMemberAbstract : Member 'public void Android.Webkit.WebSettings.JavaScriptCanOpenWindowsAutomatically.set(System.Boolean)' is abstract in the implementation but is not abstract in the contract.
Expand All @@ -142,18 +137,14 @@ CannotMakeMemberAbstract : Member 'public void Android.Webkit.WebSettings.SavePa
CannotMakeMemberAbstract : Member 'public System.String Android.Webkit.WebSettings.SerifFontFamily.get()' is abstract in the implementation but is not abstract in the contract.
CannotMakeMemberAbstract : Member 'public void Android.Webkit.WebSettings.SerifFontFamily.set(System.String)' is abstract in the implementation but is not abstract in the contract.
CannotMakeMemberAbstract : Member 'public void Android.Webkit.WebSettings.SetAppCacheEnabled(System.Boolean)' is abstract in the implementation but is not abstract in the contract.
CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'Android.Webkit.WebSettings.SetAppCacheMaxSize(System.Int64)' in the contract but not the implementation.
CannotMakeMemberAbstract : Member 'public void Android.Webkit.WebSettings.SetAppCacheMaxSize(System.Int64)' is abstract in the implementation but is not abstract in the contract.
CannotMakeMemberAbstract : Member 'public void Android.Webkit.WebSettings.SetAppCachePath(System.String)' is abstract in the implementation but is not abstract in the contract.
CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'Android.Webkit.WebSettings.SetEnableSmoothTransition(System.Boolean)' in the contract but not the implementation.
CannotMakeMemberAbstract : Member 'public void Android.Webkit.WebSettings.SetEnableSmoothTransition(System.Boolean)' is abstract in the implementation but is not abstract in the contract.
CannotMakeMemberAbstract : Member 'public void Android.Webkit.WebSettings.SetGeolocationDatabasePath(System.String)' is abstract in the implementation but is not abstract in the contract.
CannotMakeMemberAbstract : Member 'public void Android.Webkit.WebSettings.SetGeolocationEnabled(System.Boolean)' is abstract in the implementation but is not abstract in the contract.
CannotMakeMemberAbstract : Member 'public void Android.Webkit.WebSettings.SetLayoutAlgorithm(Android.Webkit.WebSettings.LayoutAlgorithm)' is abstract in the implementation but is not abstract in the contract.
CannotMakeMemberAbstract : Member 'public void Android.Webkit.WebSettings.SetNeedInitialFocus(System.Boolean)' is abstract in the implementation but is not abstract in the contract.
CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'Android.Webkit.WebSettings.SetPluginState(Android.Webkit.WebSettings.PluginState)' in the contract but not the implementation.
CannotMakeMemberAbstract : Member 'public void Android.Webkit.WebSettings.SetPluginState(Android.Webkit.WebSettings.PluginState)' is abstract in the implementation but is not abstract in the contract.
CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'Android.Webkit.WebSettings.SetRenderPriority(Android.Webkit.WebSettings.RenderPriority)' in the contract but not the implementation.
CannotMakeMemberAbstract : Member 'public void Android.Webkit.WebSettings.SetRenderPriority(Android.Webkit.WebSettings.RenderPriority)' is abstract in the implementation but is not abstract in the contract.
CannotMakeMemberAbstract : Member 'public void Android.Webkit.WebSettings.SetSupportMultipleWindows(System.Boolean)' is abstract in the implementation but is not abstract in the contract.
CannotMakeMemberAbstract : Member 'public void Android.Webkit.WebSettings.SetSupportZoom(System.Boolean)' is abstract in the implementation but is not abstract in the contract.
Expand All @@ -173,7 +164,6 @@ CannotMakeMemberAbstract : Member 'public System.Boolean Android.Webkit.WebViewD
CannotMakeMemberAbstract : Member 'public System.Boolean Android.Webkit.WebViewDatabase.HasUsernamePassword' is abstract in the implementation but is not abstract in the contract.
CannotMakeMemberAbstract : Member 'public void Android.Webkit.WebViewDatabase.ClearFormData()' is abstract in the implementation but is not abstract in the contract.
CannotMakeMemberAbstract : Member 'public void Android.Webkit.WebViewDatabase.ClearHttpAuthUsernamePassword()' is abstract in the implementation but is not abstract in the contract.
CannotRemoveAttribute : Attribute 'System.ObsoleteAttribute' exists on 'Android.Webkit.WebViewDatabase.ClearUsernamePassword()' in the contract but not the implementation.
CannotMakeMemberAbstract : Member 'public void Android.Webkit.WebViewDatabase.ClearUsernamePassword()' is abstract in the implementation but is not abstract in the contract.
CannotMakeMemberAbstract : Member 'public System.Boolean Android.Webkit.WebViewDatabase.HasFormData.get()' is abstract in the implementation but is not abstract in the contract.
CannotMakeMemberAbstract : Member 'public System.Boolean Android.Webkit.WebViewDatabase.HasHttpAuthUsernamePassword.get()' is abstract in the implementation but is not abstract in the contract.
Expand Down

0 comments on commit ace5f71

Please sign in to comment.