Skip to content

Conversation

@atsushieno
Copy link
Contributor

Otherwise debugging won't work with d8/r8.

@dellis1972
Copy link
Contributor

Where do we set the default for DxExtraArguments? I don't see any .targets or .props changes in this PR?

@atsushieno
Copy link
Contributor Author

@dellis1972 dellis1972 merged commit b89302c into dotnet:master Oct 30, 2017
Redth pushed a commit to Redth/xamarin-android that referenced this pull request Oct 30, 2017
jonpryor pushed a commit that referenced this pull request Jun 14, 2022
Changes: dotnet/java-interop@d0ef9e3...51c3dae

  * dotnet/java-interop@51c3dae7: [Java.Interop-MonoAndroid.csproj] Add jnienv-gen ProjectReference (#990)

Remove all instances of `dotnet build -m:1` from the build system,
and fix all issues which prevent it from appearing to work.

(Testing was via 4 consecutive CI builds without errors.  This does
not mean it's a complete fix, but it seems good enough to merge.)

Fixes include:

Using `build-tools/create-android-api` (9987069) to build
`JNIEnv.g.cs` only once, instead of once per
`$(TargetFrameworkVersion)`.  This prevents sharing violations when
multiple `Mono.Android.csproj` builds attempt to create it
simultaneously:

	System.IO.IOException: The process cannot access the file 'C:\a\_work\1\s\src\Mono.Android\Android.Runtime\JNIEnv.g.cs' because it is being used by another process.

*Serialize* gradlew-using project references, such that `r8.csproj`
has a `@(ProjectReference)` to `manifestmerger.csproj`, and
`manifestmerger.csproj` has a `@(ProjectReference)` to
`apksigner.csproj`.  `gradlew` execution can time out when multiple
`gradlew` instances are run concurrently, even if
`gradlew  --no-daemon` is used.  Serializing these project references
avoids the errors:

	org.gradle.launcher.daemon.client.DaemonConnectionException: Timeout waiting to connect to the Gradle daemon.
	The file lock is held by a different Gradle process.

Add a `@(ProjectReference)` on `Microsoft.Android.Sdk.ILLink.csproj` to
`Xamarin.Android.Build.Tasks.csproj`, so that
`Xamarin.Android.Build.Tasks\obj\$(Configuration)\Profile.g.cs` is
available for compilation.  Fixes:

	CSC error CS2001: Source file 'C:\code\xamarin-android\src\Microsoft.Android.Sdk.ILLink\..\Xamarin.Android.Build.Tasks\obj\Debug\Profile.g.cs' could not be found.

Commit dotnet/java-interop@51c3dae7, which adds a
`@(ProjectReference)` on `Java.Interop-MonoAndroid.csproj` to
`jnienv-gen.csproj`, which ensures that `jnienv-gen.exe` exists when
`Java.Interop-MonoAndroid.csproj` is built.  Fix errors such as:

	'"C:\a\_work\1\s\external\Java.Interop\bin\BuildRelease\jnienv-gen.exe"' is not recognized as an internal or external command, operable program or batch file.

or

	…/xamarin-android/external/Java.Interop/src/Java.Interop/Java.Interop.targets(19,5):
	error MSB3073: The command "mono "…/xamarin-android/external/Java.Interop/bin/BuildDebug/jnienv-gen.exe" Java.Interop/JniEnvironment.g.cs obj/Debug/jni.c" exited with code 2.
	[…/xamarin-android/external/Java.Interop/src/Java.Interop/Java.Interop-MonoAndroid.csproj]
@github-actions github-actions bot locked and limited conversation to collaborators Feb 4, 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.

3 participants