-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[jcw-gen] use Assembly Name instead of FullName for typemaps (#227)
Context: https://bugzilla.xamarin.com/show_bug.cgi?id=61073 The Java-to-Managed typemaps list types such as: android/app/Activity Android.App.Activity, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065 Let’s assume you have an Android project with the following assembly-level attribute: [assembly:AssemblyVersion("1.0.0.*")] Then on *every* build, the typemap is invalidated because your version number has been incremented. The fix here is to use the assembly’s short name via `GetName ().Name` or Mono.Cecil’s equivalent `AssemblyDefinition.Name.Name`. So the above typemap would only be `Android.App.Activity, Mono.Android`. These changes needed to happen in both `JavaNativeTypeManager` and `TypeNameMapGenerator`. The final fix is to find *every* instance of `TypeDefinitionRocks.GetAssemblyQualifiedName` and use `TypeDefinitionRocks.GetPartialAssemblyQualifiedName` in its place. The latter also had the issue of needing to replace the `/` character with `+`, so both methods return valid nested type names.
- Loading branch information
1 parent
57d5d51
commit 429dc2a
Showing
6 changed files
with
59 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.