Uh oh!
There was an error while loading. Please reload this page.
[msbuild] Prepare for d8 (new dex compiler) - #793
Conversation
dellis1972
left a comment
There was a problem hiding this comment.
Generally this looks ok. I would like to know how these changes will effect a windows build. Just to make sure we don't regress existing dex support
| Condition="'$(DxExtraArguments)' == ''" | ||
| /> | ||
| </CreateProperty> | ||
There was a problem hiding this comment.
@atsushieno looks like this bit is using spaces rather than tabs. I think @jonpryor likes to keep the formatting similar to the sourounding code.
| cmd.AppendSwitchIfNotNull ("--main-dex-list=", MultiDexMainDexListFile); | ||
| } | ||
| cmd.AppendSwitchIfNotNull ("--output=", Path.GetDirectoryName (ClassesOutputDirectory)); | ||
| cmd.AppendSwitchIfNotNull ("--output", Path.GetDirectoryName (ClassesOutputDirectory)); |
There was a problem hiding this comment.
can we get away without the = on this? Any idea how this will effect builds on windows?
There was a problem hiding this comment.
Just tried a quick command run on Windows; java -jar c:\path\to\dx.jar --dex --no-strict --output foobar "path\to\mono.android.jar" worked fine.
You can get d8 compiler sources from https://r8.googlesource.com/ d8 expects slightly different set of command line arguments. There is no --no-strict nor --dex arguments, and --output= is not accepted. Classes must be explicitly specified (no assumption on "directory == classes"). With all these changes, I could build apk with this command line: DxJarPath=/path/to/d8.jar DxExtraArguments="--debug" msbuild MyProject.csproj /t:SignAndroidPackage With this change, anyone can offer custom NuGet package for d8 compiler with its own custom MSBuild targets that specifies DxJarPath and DxExtraArguments (just like what we could do for facebook proguard).
4c81357 to
0af3abeCompareatsushieno
commented
Sep 4, 2017
All the requested changes are done last week. |
Fixes: dotnet/java-interop#790 Changes: dotnet/java-interop@bba1f07...3824b97 * dotnet/java-interop@3824b974: [java-interop] Windows build system support (dotnet#816) * dotnet/java-interop@94c0c709: Bump to xamarin/xamarin-android-tools/main@554d45a (dotnet#813) * dotnet/java-interop@5c756b14: [Java.Interop-PerformanceTests] Support .NET Core 3.1 (dotnet#808) * dotnet/java-interop@daec07b6: [build] Fix various warnings (dotnet#812) * dotnet/java-interop@678c4bd2: [class-parse, generator] Allow showing Kotlin internals via metadata (dotnet#793) * dotnet/java-interop@cd4c8f80: [jnienv-gen] Generate a header file for the native functions (dotnet#809) * dotnet/java-interop@69767c1a: [param-name-importer] Fix NSE when updating JavaApi.AllPackages (dotnet#807) * dotnet/java-interop@a666a6f9: [Java.Runtime.Environment] Partial support for .NET Core (dotnet#804)
Fixes: dotnet/java-interop#790 Changes: dotnet/java-interop@bba1f07...3824b97 * dotnet/java-interop@3824b974: [java-interop] Windows build system support (dotnet#816) * dotnet/java-interop@94c0c709: Bump to xamarin/xamarin-android-tools/main@554d45a (dotnet#813) * dotnet/java-interop@5c756b14: [Java.Interop-PerformanceTests] Support .NET Core 3.1 (dotnet#808) * dotnet/java-interop@daec07b6: [build] Fix various warnings (dotnet#812) * dotnet/java-interop@678c4bd2: [class-parse, generator] Allow showing Kotlin internals via metadata (dotnet#793) * dotnet/java-interop@cd4c8f80: [jnienv-gen] Generate a header file for the native functions (dotnet#809) * dotnet/java-interop@69767c1a: [param-name-importer] Fix NSE when updating JavaApi.AllPackages (dotnet#807) * dotnet/java-interop@a666a6f9: [Java.Runtime.Environment] Partial support for .NET Core (dotnet#804) Note: dotnet/java-interop@3824b974 updated Java.Interop/src/java-interop to use `_WINDOWS`, not `WINDOWS`. Define `_WINDOWS` when building for Windows as well.
Fixes: dotnet/java-interop#790 Changes: dotnet/java-interop@bba1f07...3824b97 * dotnet/java-interop@3824b974: [java-interop] Windows build system support (dotnet#816) * dotnet/java-interop@94c0c709: Bump to xamarin/xamarin-android-tools/main@554d45a (dotnet#813) * dotnet/java-interop@5c756b14: [Java.Interop-PerformanceTests] Support .NET Core 3.1 (dotnet#808) * dotnet/java-interop@daec07b6: [build] Fix various warnings (dotnet#812) * dotnet/java-interop@678c4bd2: [class-parse, generator] Allow showing Kotlin internals via metadata (dotnet#793) * dotnet/java-interop@cd4c8f80: [jnienv-gen] Generate a header file for the native functions (dotnet#809) * dotnet/java-interop@69767c1a: [param-name-importer] Fix NSE when updating JavaApi.AllPackages (dotnet#807) * dotnet/java-interop@a666a6f9: [Java.Runtime.Environment] Partial support for .NET Core (dotnet#804) Note: dotnet/java-interop@3824b974 updated Java.Interop/src/java-interop to use `_WINDOWS`, not `WINDOWS`. Define `_WINDOWS` when building for Windows as well.
Fixes: dotnet/java-interop#790 Changes: dotnet/java-interop@bba1f07...3824b97 * dotnet/java-interop@3824b974: [java-interop] Windows build system support (dotnet#816) * dotnet/java-interop@94c0c709: Bump to xamarin/xamarin-android-tools/main@554d45a (dotnet#813) * dotnet/java-interop@5c756b14: [Java.Interop-PerformanceTests] Support .NET Core 3.1 (dotnet#808) * dotnet/java-interop@daec07b6: [build] Fix various warnings (dotnet#812) * dotnet/java-interop@678c4bd2: [class-parse, generator] Allow showing Kotlin internals via metadata (dotnet#793) * dotnet/java-interop@cd4c8f80: [jnienv-gen] Generate a header file for the native functions (dotnet#809) * dotnet/java-interop@69767c1a: [param-name-importer] Fix NSE when updating JavaApi.AllPackages (dotnet#807) * dotnet/java-interop@a666a6f9: [Java.Runtime.Environment] Partial support for .NET Core (dotnet#804) Note: dotnet/java-interop@3824b974 updated Java.Interop/src/java-interop to use `_WINDOWS`, not `WINDOWS`. Define `_WINDOWS` when building for Windows as well.
Fixes: dotnet/java-interop#790 Changes: dotnet/java-interop@bba1f07...a3de91e * dotnet/java-interop@a3de91ef: [ci] Make VC++ toolchain optional (#820) * dotnet/java-interop@3824b974: [java-interop] Windows build system support (#816) * dotnet/java-interop@94c0c709: Bump to xamarin/xamarin-android-tools/main@554d45a (#813) * dotnet/java-interop@5c756b14: [Java.Interop-PerformanceTests] Support .NET Core 3.1 (#808) * dotnet/java-interop@daec07b6: [build] Fix various warnings (#812) * dotnet/java-interop@678c4bd2: [class-parse, generator] Allow showing Kotlin internals via metadata (#793) * dotnet/java-interop@cd4c8f80: [jnienv-gen] Generate a header file for the native functions (#809) * dotnet/java-interop@69767c1a: [param-name-importer] Fix NSE when updating JavaApi.AllPackages (#807) * dotnet/java-interop@a666a6f9: [Java.Runtime.Environment] Partial support for .NET Core (#804) Note: dotnet/java-interop@3824b974 updated Java.Interop/src/java-interop to use `_WINDOWS`, not `WINDOWS`. Define `_WINDOWS` when building for Windows as well.
You can get d8 compiler sources from https://r8.googlesource.com/
d8 expects slightly different set of command line arguments. There is no
--no-strict nor --dex arguments, and --output= is not accepted.
Classes must be explicitly specified (no assumption on "directory == classes").
With all these changes, I could build apk with this command line:
With this change, anyone can offer custom NuGet package for d8 compiler
with its own custom MSBuild targets that specifies DxJarPath and
DxExtraArguments (just like what we could do for facebook proguard).