Skip to content

Conversation

dellis1972
Copy link
Contributor

@dellis1972 dellis1972 commented Oct 3, 2017

Commit 2d23a27 reverted a change which is required for j8.jar.
But the change resulted in a command line which would exceed
the max command line limits on windows.

It turns out that both dx.jar and j8.jar allow for a zip file
to be used to pass in the .class files. So lets create a zip
and refresh/update it on each build. Then use that rather than
the class directory in CompileToDalvik.

This also fixes the JarContentBuilder to pick up the android
sdk and ndk directories from the environment variables which
the build system pass in.

@dellis1972
Copy link
Contributor Author

@atsushieno this should fix your j8.jar issue.

@dellis1972
Copy link
Contributor Author

build

@dellis1972 dellis1972 added the do-not-merge PR should not be merged. label Oct 3, 2017
@dellis1972 dellis1972 changed the title [Xamarin.Android.Build.Tasks] Create classes.zip for dx.jar. [Xamarin.Android.Build.Tasks] Create classes.zip for dx.jar. [WIP] Oct 3, 2017
@kingces95
Copy link

Watch

cmd.AppendFileNameIfNotNull (ClassesOutputDirectory);
var zip = Path.GetFullPath (Path.Combine (ClassesOutputDirectory, "classes.zip"));
if (!File.Exists (zip)) {
Log.LogError ($"'{zip}' does not exist. Please rebuild the project.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LogError() doesn't throw an exception, so execution will continue after this point. Should an exception be thrown + caught in Execute() instead?

@dellis1972 dellis1972 removed the do-not-merge PR should not be merged. label Oct 5, 2017
Commit 2d23a27 reverted a change which is required for j8.jar.
But the change resulted in a command line which would exceed
the max command line limits on windows.

It turns out that both dx.jar and j8.jar allow for a `zip` file
to be used to pass in the `.class` files. So lets create a zip
and refresh/update it on each build. Then use that rather than
the class directory in `CompileToDalvik`.

This also fixes the JarContentBuilder to pick up the android
sdk and ndk directories from the environment variables which
the build system pass in.
@jonpryor jonpryor merged commit a296784 into dotnet:master Oct 5, 2017
dellis1972 added a commit that referenced this pull request Oct 6, 2017
Commit 2d23a27 reverted a change which is required for `j8.jar`.
But the change resulted in a command line which would exceed
the max command line limits on windows.

It turns out that both `dx.jar` and `j8.jar` allow for a `zip` file
to be used to pass in the `.class` files. So lets create a zip
and refresh/update it on each build. Then use that rather than
the class directory in `<CompileToDalvik/>`.

This also fixes `JarContentBuilder` to pick up the android
sdk and ndk directories from the environment variables which
the build system pass in.
jonpryor pushed a commit that referenced this pull request Nov 12, 2021
Changes: dotnet/java-interop@dcdcce1...087684a

  * dotnet/java-interop@087684a7: [generator] Improve Javadoc remarks on properties (#911)

A `frameworks.xml` file will now be passed to `mdoc.exe` when
updating external API docs.  This file contains the metadata required
to find and update or create [`FrameworksIndex` files][0].

The version of `Mono.Android.dll` used to generate docs will no
longer be passed to `mdoc.exe`.  Instead, it will be copied to the
relative `%(Source)` directory described in `frameworks.xml`, to be
resolved automatically.

The `mdoc` package version specification has also been fixed, and
we'll now use [`5.8.5`][1] instead of `5.0.0.25`
(`%(PackageReference.PackageVersion)` is not A Thing; `%(Version)`
should be used, but wasn't).

[0]: https://github.com/xamarin/android-api-docs/tree/cd414a93057b6f61afcdd3db6ff44391fb166246/docs/Mono.Android/en/FrameworksIndex
[1]: https://www.nuget.org/packages/mdoc/5.8.5
@github-actions github-actions bot locked and limited conversation to collaborators Feb 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants