-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JavaCallableWrappers] move MonoRuntimeProvider to xamarin-android (#422
) Context: dotnet/android#2853 Currently, there are two Java source files included as `@(EmbeddedResource)` files: * `MonoRuntimeProvider.Bundled.java` * `MonoRuntimeProvider.Shared.java` One such usage is for `Android.App.Instrumentation` subclasses, which look for a section of code such as: // Mono Runtime Initialization {{{ mono.MonoPackageManager.LoadApplication (context, context.getApplicationInfo (), new String[]{context.getApplicationInfo ().sourceDir}); // }}} It places everything in-between these comments into the Java stub's `onCreate()` method. These Java source files should live in xamarin/xamarin-android, and the desired source code passed in via a new `JavaCallableWrapperGenerator.MonoRuntimeInitialization` property. Then Xamarin.Android can make an informed decision about what code needs to get passed in: * Is the shared runtime used? * Is it a specific API level? * Could we call into some pre-compiled code instead? I added various test changes to make sure things are working: * Added an `ExampleActivity` and `ExampleInstrumentation` to the `SupportDeclarations` for `JavaCallableWrapperGeneratorTests`. * Updated `TypeNameMapGeneratorTests()` to use these types, too. * Added `GenerateActivity()` and `GenerateInstrumentation()` tests
- Loading branch information
1 parent
3754536
commit 7c7eae3
Showing
7 changed files
with
147 additions
and
170 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
57 changes: 0 additions & 57 deletions
57
src/Java.Interop.Tools.JavaCallableWrappers/Resources/MonoRuntimeProvider.Bundled.java
This file was deleted.
Oops, something went wrong.
83 changes: 0 additions & 83 deletions
83
src/Java.Interop.Tools.JavaCallableWrappers/Resources/MonoRuntimeProvider.Shared.java
This file was deleted.
Oops, something went wrong.
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.