-
Notifications
You must be signed in to change notification settings - Fork 533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[msbuild] Prepare for d8 (new dex compiler) #793
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@atsushieno looks like this bit is using spaces rather than tabs. I think @jonpryor likes to keep the formatting similar to the sourounding code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed!
|
||
if (MultiDexEnabled) { | ||
cmd.AppendSwitch ("--multi-dex"); | ||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we get away without the =
on this? Any idea how this will effect builds on windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
0af3abe
Compare
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).