Commit 75023bd
[java-runtime] Remove debug files from java_runtime.jar (#2870)
Commit 121b81a added the new `java_runtime.jar` and
`java_runtime_fastdev.jar` files. The idea is that
`java_runtime.jar` was the release version of the runtime, and would
*not* contain files such as
mono/android/ResourcePatcher.class
mono/android/Seppuku.class
mono/android/MonkeyPatcher.class
which are for fast dev only.
However we were including these files!!
This was because of a couple of problems.
1. The `%(_RuntimeOutput.RemoveItems)` metadata was being treated
like an ItemGroup when it is in fact a property. Wwe need to
semi-colon `;`-separate the items to make sure they are ALL
removed rather then it just being the last one listed.
2. Because the `Inputs` was changed to `@(_RuntimeOutput)` it means
the target will run only ONCE. As a result both the
`release.txt` and `fastdev.txt` files contained the SAME file
list. What we should have been doing was using Target Batching:
%(_RuntimeOutput.OutputJar)
This makes sure the target runs for EACH output. This will
result in the behaviour we want, i.e the files listed above NOT
being in the release version of the jar.
Finally, change the default value for
`MonoPackageManager_Resources.ApiPackageName` from `""` (empty string)
to `null`. This was done to allow startup to work; otherwise,
[`MonoRuntimeProvider.attachInfo()` could fail][0] if it encounters a
non-`null` value which *isn't* an installed package.
We don't yet fully understand this failure scenario, but setting
`ApiPackageName` to null allows things to work.
[0]: https://github.com/xamarin/xamarin-android/blob/ae75aa627de475a5c276ccbc60e9e9f72425aab0/src/Xamarin.Android.Build.Tasks/Resources/MonoRuntimeProvider.Shared.java#L23-L391 parent ae75aa6 commit 75023bd
File tree
3 files changed
+16
-12
lines changed- src/java-runtime
- java/mono/android
3 files changed
+16
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
| 9 | + | |
13 | 10 | | |
14 | 11 | | |
15 | 12 | | |
| |||
21 | 18 | | |
22 | 19 | | |
23 | 20 | | |
24 | | - | |
| 21 | + | |
25 | 22 | | |
26 | 23 | | |
27 | 24 | | |
| |||
Lines changed: 0 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | 109 | | |
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
0 commit comments