Skip to content
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

Fix some build issues #454

Closed
wants to merge 3 commits into from

Conversation

mmarinchenko
Copy link

This PR is part 1 of #437. It fixes some build issues related to main source directory.


build.cake changes

  1. Addins and tools versions are bumped up. Message about older Cake.Core is no longer appears in the build log.
  2. No need to have java executable in the PATH directly. JAVA_HOME/bin/java may be used to generate javadocs now.
  3. No need to have nuget executable in the PATH nor install NuGet.Versioning addin. MSBuild is always used to restore projects now.
  4. MSBuild is always uses specified MAX_CPU_COUNT now.
  5. Unused code which caused CS0162 and CS0219 is commented out.
  6. Some tabs vs. spaces mess is fixed.

Related changes

  1. There was "unused-almost-empty" project Firebase-Iid.csproj. I deleted it.
  2. GooglePlayServicesTargets.cshtml had unnecessary duplicated tags.
  3. <NoWarn> tags were filled incorrectly in GooglePlayServicesProject.cshtml (I also added BG8A01 in addition to BG8A00 and BG8A04). Some of them didn't work earlier - so I added TODOs to review them as they may suppress potentially important warnings now.

@moljac
Copy link
Member

moljac commented Apr 20, 2021

Some of them didn't work earlier - so I added TODOs to review them as they may suppress potentially important warnings now.

It still does not work on Mac, but work on Windows (WarningsAsErrors) - found out this week after build started mysteriously failing on Windows CI. Not sure what was changed.

@mmarinchenko
Copy link
Author

@moljac

It still does not work on Mac, but work on Windows (WarningsAsErrors) - found out this week after build started mysteriously failing on Windows CI. Not sure what was changed.

I don't have access to your Azure Pipelines but it seems macOS and Windows environments may have different Java.Interop versions. I started having problems with Kotlin interfaces nested in private/internal classes after I upgraded to VS 16.9 (i.e. Xamarin.Android 11.2) on Windows.

I'm not sure but some of these changes may be related: https://github.com/xamarin/java.interop/commits/main/src/Xamarin.Android.Tools.Bytecode/Kotlin/KotlinFixups.cs

Copy link
Member

@moljac moljac left a comment

Choose a reason for hiding this comment

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

can you revert to latest 29.x.y build tools instead of 30.x.y, please?

The builds are failing

       "/Users/runner/work/1/s/generated/GooglePlayServices.sln" (Build target) (1:2) ->
       "/Users/runner/work/1/s/generated/com.google.mlkit.vision-internal-vkp/com.google.mlkit.vision-internal-vkp.csproj" (default target) (140:10) ->
         /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Legacy.targets(176,5): error XA0032: Java SDK 11.0 or above is required when using Android SDK Build-Tools 30.0.2. [/Users/runner/work/1/s/generated/com.google.mlkit.vision-internal-vkp/com.google.mlkit.vision-internal-vkp.csproj]

@mmarinchenko
Copy link
Author

Yes, but that means you're using Xamarin.Android 11.1 or older. I guess my assumption about different Java.Interop versions on macOS and Windows is correct)

xamarin/xamarin-android#5234

@mmarinchenko
Copy link
Author

@moljac

I've created xamarin/java.interop#826.

@jpobst
Copy link
Contributor

jpobst commented May 3, 2024

This PR is likely outdated and no longer relevant.

@jpobst jpobst closed this May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants