Skip to content

Conversation

@jonathanpeppers
Copy link
Member

Context:
https://github.com/xamarin/xamarin-android/blob/master/tools/scripts/xabuild#L105

xabuild, the shell script, has some logic to set MSBuild properties
for AndroidSdkDirectory and AndroidNdkDirectory. The issue here is
on Windows, xabuild.exe is not invoked from this shell script. So we
need to replicate the logic in C# in xabuild.exe, but not break what
was fixed in #977.

Changes:

  • check for ANDROID_SDK_PATH or ANDROID_NDK_PATH environment
    variables
  • Run Paths.targets via a new MSBuild process, the same way as
    xabuild, the script
  • Set the AndroidSdkDirectory and AndroidNdkDirectory values in the
    config file if they are not blank
  • AndroidSdkDirectory and AndroidNdkDirectory can still be
    overridden by a user, because incoming values supersede what is found
    in the config file

Context:
https://github.com/xamarin/xamarin-android/blob/master/tools/scripts/xabuild#L105

`xabuild`, the shell script, has some logic to set MSBuild properties
for `AndroidSdkDirectory` and `AndroidNdkDirectory`. The issue here is
on Windows, `xabuild.exe` is not invoked from this shell script. So we
need to replicate the logic in C# in `xabuild.exe`, but not break what
was fixed in dotnet#977.

Changes:
- check for `ANDROID_SDK_PATH` or `ANDROID_NDK_PATH` environment
variables
- Run `Paths.targets` via a new MSBuild process, the same way as
`xabuild`, the script
- Set the `AndroidSdkDirectory` and `AndroidNdkDirectory` values in the
config file if they are not blank
- `AndroidSdkDirectory` and `AndroidNdkDirectory` can still be
overridden by a user, because incoming values supersede what is found
in the config file
@dnfclas
Copy link

dnfclas commented Oct 27, 2017

@jonathanpeppers,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by .NET Foundation. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

@jonpryor jonpryor merged commit a5fba94 into dotnet:master Oct 27, 2017
@jonathanpeppers jonathanpeppers deleted the xabuild.exe-paths.targets branch October 27, 2017 22:13
Redth pushed a commit to Redth/xamarin-android that referenced this pull request Oct 30, 2017
Context: https://github.com/xamarin/xamarin-android/blob/master/tools/scripts/xabuild#L105

`xabuild`, the shell script, has some logic to set MSBuild properties
for `AndroidSdkDirectory` and `AndroidNdkDirectory`. The issue here is
on Windows, `xabuild.exe` is not invoked from this shell script. So we
need to replicate the logic in C# in `xabuild.exe`, but not break what
was fixed in dotnet#977.

Changes:

  * Check for `ANDROID_SDK_PATH` or `ANDROID_NDK_PATH` environment
    variables
  * Run `Paths.targets` via a new MSBuild process, the same way as
    `tools/scripts/xabuild`
  * Set the `AndroidSdkDirectory` and `AndroidNdkDirectory`
    properties in the config file if they are not blank
  * `AndroidSdkDirectory` and `AndroidNdkDirectory` can still be
    overridden by a user, because incoming values supersede what is
    found in the config file
jonpryor pushed a commit that referenced this pull request Jun 2, 2022
Changes: dotnet/java-interop@1f27ab5...1bab47d

  * dotnet/java-interop@1bab47d6: [build] Target `net7.0` (#988)

Java.Interop now targets `net7.0`.

The `Configuration.Java.Interop.Override.props` file is now partially
generated by `xaprepare`, to avoid having to hard code duplicate
version and path values in it.

The Java.Interop `Prepare` step has been moved out of `xaprepare` and
into a new MSBuild target that will be ran with the .NET 7 preview
SDK that is installed by `xaprepare`.

Extra Java.Interop tests have been removed from the
"Windows Build and Smoke Test" job, as these should already be
running as part of Java Interop CI.

The `dotnet --list-sdks` command was failing on macOS when installing
the latest .NET 7 Preview SDK, and it has been replaced by a step
that runs `dotnet --info`.

Co-authored-by: Peter Collins <[email protected]>
@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