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

[tests/Codegen-Binding] Use a variable for the Android SDK in the BuildJavaLibs 'gradlew' invocation #696

Merged
merged 1 commit into from
Jul 19, 2017
Merged

Conversation

pjcollins
Copy link
Member

This fixes a 'gradlew' failure which is encountered on Windows only. Unfortunately, the 'gradlew' invocation prefixes the 'sdk.dir' value read from 'local.properties' with the path of the working directory.
As a result, we encounter a failure along the following lines on Windows:

    * What went wrong:
      A problem occurred configuring project ':library'.
      > The SDK directory 'C:\Users\xamarinqa\git\xamarin-android\tests\CodeGen-Binding\Xamarin.Android.LibraryProjectZip-LibBinding\java\JavaLib\C:Program Files (x86)Androidandroid-sdk' does not exist

This can be avoided by exporting ANDROID_HOME in the Exec portion of the BuildJavaLibs target, rather than writing this information to a file and expecting 'gradlew' to process it correctly.

…n BuildJavaLibs

This fixes a 'gradlew' failure which is encountered on Windows only. Unfortunately, the 'gradlew' invocation prefixes the 'sdk.dir' value read from 'local.properties' with the path of the working directory.
As a result, we encounter a failure along the following lines on Windows:

```
    * What went wrong:
      A problem occurred configuring project ':library'.
      > The SDK directory 'C:\Users\xamarinqa\git\xamarin-android\tests\CodeGen-Binding\Xamarin.Android.LibraryProjectZip-LibBinding\java\JavaLib\C:Program Files (x86)Androidandroid-sdk' does not exist
```

This can be avoided by exporting ANDROID_HOME in the Exec portion of the BuildJavaLibs target, rather than writing this information to a file and expecting 'gradlew' to process it correctly.
@pjcollins
Copy link
Member Author

@jonpryor does this seem reasonable? It worked for me locally on both macOS and Windows, and will allow for Codegen tests to compile again on Windows without any major setup hacks required on my end.

@pjcollins pjcollins changed the title [tests/Codegen-Binding] Use a variable for the 'gradlew' invocation in BuildJavaLibs [tests/Codegen-Binding] Use a variable for the Android SDK in the BuildJavaLibs 'gradlew' invocation Jul 18, 2017
@jonpryor
Copy link
Member

LGTM. We should merge if it passes macOS+xbuild PR Build.

@jonpryor jonpryor merged commit f2eb704 into dotnet:master Jul 19, 2017
pjcollins added a commit that referenced this pull request Jul 19, 2017
…n BuildJavaLibs (#696)

This fixes a 'gradlew' failure which is encountered on Windows only. Unfortunately, the 'gradlew' invocation prefixes the 'sdk.dir' value read from 'local.properties' with the path of the working directory.
As a result, we encounter a failure along the following lines on Windows:

```
    * What went wrong:
      A problem occurred configuring project ':library'.
      > The SDK directory 'C:\Users\xamarinqa\git\xamarin-android\tests\CodeGen-Binding\Xamarin.Android.LibraryProjectZip-LibBinding\java\JavaLib\C:Program Files (x86)Androidandroid-sdk' does not exist
```

This can be avoided by exporting ANDROID_HOME in the Exec portion of the BuildJavaLibs target, rather than writing this information to a file and expecting 'gradlew' to process it correctly.
jonpryor added a commit to jonpryor/xamarin-android that referenced this pull request Sep 5, 2020
jonpryor pushed a commit that referenced this pull request Sep 9, 2020
Fixes: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1193891

Changes: dotnet/java-interop@afbc5b3...ac914ce

  * dotnet/java-interop@ac914ce3: [ci] Add DevDiv required Roslyn analyzers, fix errors (#704)
  * dotnet/java-interop@a98c1ae1: [build] fix env vars causing gradle build error (#705)
  * dotnet/java-interop@75354b9f: [Java.Interop] Dispose, *then* Remove (#708)
  * dotnet/java-interop@8ea0bb28: [jnimarshalmethod-gen] Localizable errors (#696)

Commit dotnet/java-interop@ac914ce3 moved the location of
`NullableAttributes.cs`; update
`Xamarin.Android.Tools.JavadocImporter.csproj` appropriately.
@github-actions github-actions bot locked and limited conversation to collaborators Feb 2, 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