Uh oh!
There was an error while loading. Please reload this page.
[Xamarin.Android.Build.Tasks] Preserve @(AndroidEnvironment) - #729
Conversation
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=58673 The `@(AndroidEnvironment)` Build action is *supposed to be* usable on Library projects. When used within a Library project, the `@(AndroidEnvironment)` files are embedded into the assembly, and during the App project build they are extracted and merged into the `environment` file within the `.apk`. Unfortunately, this behavior was potentially broken in commit 8688832, as if the Library assembly also contains the `__AndroidLibraryProjects__.zip` embedded resource (e.g. the Library project has a `@(AndroidResource)` Build action), the extraction of the `__AndroidLibraryProjects__.zip` resource will inadvertently remove the previously extracted `@(AndroidEnvironment)` files. Oops. Alter the paths provided to `Files.ExtractAll()` -- which was directly responsible for deleting the environment files -- so that it won't delete the environment files. Update the `tests/locales` on-device unit tests to make use of a Library-provided `@(AndroidEnvironment)`, and add a unit test which reads the environment variable and asserts that the environment variable has the expected value.
| updated |= Files.ExtractAll (zip, outDirForDll, modifyCallback: (entryFullName) => { | ||
| return entryFullName.Replace ("library_project_imports", ImportsDirectory); | ||
| updated |= Files.ExtractAll (zip, importsDir, modifyCallback: (entryFullName) => { | ||
| return entryFullName.Replace ("library_project_imports/", ""); |
There was a problem hiding this comment.
Do we prefer "" over string.Empty ?
dellis1972
commented
Aug 10, 2017
something weird on the build machine...all the calls to a
|
dellis1972
commented
Aug 10, 2017
does not seem to be related to the PR.. |
dellis1972
commented
Aug 10, 2017
Gonna kick off the build again.. The old build (for reference) is at [1]. [1] https://jenkins.mono-project.com/job/xamarin-android-pr-builder/1320/ |
dellis1972
commented
Aug 10, 2017
build |
1 similar comment
jonpryor
commented
Aug 10, 2017
build |
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=58673 The `@(AndroidEnvironment)` Build action is *supposed to be* usable on Library projects. When used within a Library project, the `@(AndroidEnvironment)` files are embedded into the assembly, and during the App project build they are extracted and merged into the `environment` file within the `.apk`. Unfortunately, this behavior was potentially broken in commit 8688832, as if the Library assembly also contains the `__AndroidLibraryProjects__.zip` embedded resource (e.g. the Library project has a `@(AndroidResource)` Build action), the extraction of the `__AndroidLibraryProjects__.zip` resource will inadvertently remove the previously extracted `@(AndroidEnvironment)` files. Oops. Alter the paths provided to `Files.ExtractAll()` -- which was directly responsible for deleting the environment files -- so that it won't delete the environment files. Update the `tests/locales` on-device unit tests to make use of a Library-provided `@(AndroidEnvironment)`, and add a unit test which reads the environment variable and asserts that the environment variable has the expected value.
Fixes: dotnet/java-interop#461Fixes: dotnet/java-interop#682Fixes: dotnet/java-interop#717Fixes: dotnet/java-interop#719Fixes: dotnet/java-interop#728 Changes: dotnet/java-interop@ac914ce...b991bb8 * dotnet/java-interop@b991bb86: [generator] Revert change to use auto-properties in EventArgs classes (#736) * dotnet/java-interop@ee50d89b: Bump to xamarin/xamarin-android-tools/master@f2af06f2 (#733) * dotnet/java-interop@a0b895c1: [build] Suppress NuGet warnings (#730) * dotnet/java-interop@8b1b0507: [generator] Fix parsing of complex generic types (#729) * dotnet/java-interop@ee7afeed: [generator] Prevent generating duplicate EventArgs classes (#726) * dotnet/java-interop@1f21f38c: [generator] Use GC.KeepAlive for reference type method parameters. (#725) * dotnet/java-interop@5136ef98: [Xamarin.Android.Tools.Bytecode] Hide Kotlin nested types inside (#723) * dotnet/java-interop@53d60513: [jnimarshalmethod-gen] Fix registration on Windows (#721) * dotnet/java-interop@5a834d42: [jnimarshalmethod-gen] Avoid creating AppDomains (#720) * dotnet/java-interop@a76edb8c: [Xamarin.Android.Tools.ApiXmlAdjuster] Find app.android.IntentService (#718) * dotnet/java-interop@6cde0877: [Java.Interop] Emit a reference assembly for Java.Interop.dll (#716) * dotnet/java-interop@b858dc59: [generator] Provide line/col numbers for api.xml warnings (#715) * dotnet/java-interop@9be92a04: [ci] Don't kick off CI for documentation only changes. (#712) * dotnet/java-interop@03c22722: [jnimarshalmethod-gen] Fix type resolution crash (#706)
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=58673
The
@(AndroidEnvironment)Build action is supposed to be usable onLibrary projects. When used within a Library project, the
@(AndroidEnvironment)files are embedded into the assembly, andduring the App project build they are extracted and merged into the
environmentfile within the.apk.Unfortunately, this behavior was potentially broken in commit
8688832, as if the Library assembly also contains the
__AndroidLibraryProjects__.zipembedded resource (e.g. the Libraryproject has a
@(AndroidResource)Build action), the extraction ofthe
__AndroidLibraryProjects__.zipresource will inadvertentlyremove the previously extracted
@(AndroidEnvironment)files.Oops.
Alter the paths provided to
Files.ExtractAll()-- which wasdirectly responsible for deleting the environment files -- so that it
won't delete the environment files.
Update the
tests/localeson-device unit tests to make use of aLibrary-provided
@(AndroidEnvironment), and add a unit test whichreads the environment variable and asserts that the environment
variable has the expected value.