-
Notifications
You must be signed in to change notification settings - Fork 533
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
[build] fixes for failing Windows build #2368
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This looks good, the Windows build has two
|
jonpryor
approved these changes
Nov 1, 2018
...deGen-Binding/Xamarin.Android.LibraryProjectZip-LibBinding/java/JavaLib/library/build.gradle
Outdated
Show resolved
Hide resolved
Context: dotnet#2019 Context: http://build.devdiv.io/2168276 Context: http://build.devdiv.io/2169681 Since 4bb4b2e, our builds have been failing on VSTS on Windows. Jenkins is green, however. Currently getting a failure in `Xamarin.Android.LibraryProjectZip-LibBinding.csproj` such as: 2018-10-31T14:02:28.8336608Z .\gradlew assembleDebug --stacktrace --no-daemon 2018-10-31T14:02:40.7122197Z NDK is missing a "platforms" directory. 2018-10-31T14:02:40.7122937Z If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to C:\Users\dlab14\android-toolchain\sdk\ndk-bundle. 2018-10-31T14:02:40.7124870Z If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning. It doesn't really make sense to me why this started happening with d8/r8 support... The `~\android-toolchain\sdk\ndk-bundle` path seems completely wrong. However, it looks like we should be setting `ANDROID_NDK_HOME=$(AndroidNdkDirectory)`. After that change, we got a new error: 2018-10-31T17:19:30.1558223Z Checking the license for package Android SDK Build-Tools 25.0.2 in C:\Users\dlab14\android-toolchain\sdk\licenses 2018-10-31T17:19:30.1562674Z EXEC : warning : License for package Android SDK Build-Tools 25.0.2 not accepted. [E:\A\_work\14\s\tests\CodeGen-Binding\Xamarin.Android.LibraryProjectZip-LibBinding\Xamarin.Android.LibraryProjectZip-LibBinding.csproj] So this is the actual problem! In fa57aa8, I changed `android-toolchain` to not run `<AcceptAndroidSdkLicense/>` all the time. That was actually making this `.\gradlew` command successfully install Android SDK Build-Tools 25.0.2 and use it without a license prompt. We started seeing the problem since 4bb4b2e, because it caused a new `~\android-toolchain\sdk` directory to get setup. The fix here is to just use Build-Tools 28.0.0, since that is the version we boostrap and install during our build. But we would never actually remember to update this value... So we should make a `build.gradle.in` file, and replace with our existing property from `Configuration.props`: <XABuildToolsFolder Condition="'$(XABuildToolsFolder)' == ''">28.0.0</XABuildToolsFolder> Other changes: - Added `--stacktrace` to the gradle calls in `r8.targets`, so we get better error messages. It also matches the gradle command in `Xamarin.Android.LibraryProjectZip-LibBinding.csproj`.
jonathanpeppers
force-pushed
the
fix-windows-build
branch
from
November 1, 2018 21:53
b60acfe
to
13ea4e9
Compare
macOS test failure was network-related:
So this looks good? Windows also looks good, only the 2 known |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context: #2019
Context: http://build.devdiv.io/2168276
Context: http://build.devdiv.io/2169681
Since 4bb4b2e, our builds have been failing on VSTS on Windows.
Jenkins is green, however.
Currently getting a failure in
Xamarin.Android.LibraryProjectZip-LibBinding.csproj
such as:It doesn't really make sense to me why this started happening with
d8/r8 support... The
~\android-toolchain\sdk\ndk-bundle
path seemscompletely wrong.
However, it looks like we should be setting
ANDROID_NDK_HOME=$(AndroidNdkDirectory)
.After that change, we got a new error:
So this is the actual problem!
In fa57aa8, I changed
android-toolchain
to not run<AcceptAndroidSdkLicense/>
all the time. That was actually makingthis
.\gradlew
command successfully install Android SDK Build-Tools25.0.2 and use it without a license prompt. We started seeing the
problem since 4bb4b2e, because it caused a new
~\android-toolchain\sdk
directory to get setup.The fix here is to just use Build-Tools 28.0.0, since that is the
version we boostrap and install during our build.
But we would never actually remember to update this value... So we
should make a
build.gradle.in
file, and replace with our existingproperty from
Configuration.props
:Other changes:
--stacktrace
to the gradle calls inr8.targets
, so we getbetter error messages. It also matches the gradle command in
Xamarin.Android.LibraryProjectZip-LibBinding.csproj
.