* Setup Azure DevOps for CI
* Install Android NDK Bundle on Windows build agents
* Workaround for `JAVA_HOME` on Windows build agents
* Support for Android NDK r19 and r20
* Updated Cake scripts to support VS 2019 on Windows
* Pin NuGet download URL to v4.7.3
* Bump to xamarin/xamarin-android-tools/master@294f447
* Changes: 4c00c22...294f447
* Fix for `mono-support.h` on Windows
Fixes:
c:\program files (x86)\mono\include\mono-2.0\mono\utils\mono-publib.h(94): error C2371: 'mono_unichar2': redefinition; different basic types [D:\a\1\s\tests\common\mk\common.Tests.vcxproj]
Fixes this warning:
In thin-framework.sh line 70:
let C++ || true
^------^ SC2219: Instead of 'let expr', prefer (( expr )) .
For more information:
https://www.shellcheck.net/wiki/SC2219 -- Instead of 'let expr', prefer (( ...
make: *** [shellcheck] Error 1
Context: https://travis-ci.org/mono/Embeddinator-4000/jobs/471012684
Context: https://travis-ci.org/mono/Embeddinator-4000/jobs/471026456
Context: https://travis-ci.org/mono/Embeddinator-4000/jobs/471037351
First issue we are hitting is a missing version of Cake on MyGet:
Unable to find version '0.23.0' of package 'Cake'.
https://www.myget.org/F/cake/api/v3/index.json: Package 'Cake.0.23.0' is not found on source 'https://www.myget.org/F/cake/api/v3/index.json'.
To fix this:
- Let's remove `MyGet.config` and just use NuGet
- Update Cake to 0.31, I recently used that version on another project
Next issue is that the build will not work using JDK 10:
Compiling binding code...
Invoking: /usr/libexec/java_home
/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home
Invoking: /Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home/bin/javac
...
Fatal Error: Unable to find package java.lang in classpath or bootclasspath
To fix this we should use the `-v 1.8` switch on every call to `java_home`.
Next issue is that we aren't specifying a version with the `#tool`
directive:
The 'tool' directive is attempting to install the 'NUnit.ConsoleRunner' package
without specifying a package version number.
After that we were hitting issues where Xamarin.iOS\Mac\Mono were having trouble being provisioned, so I bumped them all to current stable.
Then a few test fixes, including some from https://github.com/mono/Embeddinator-4000/pull/714 originally.
This fixes Jenkins and part fixes the other builds. @jonathanpeppers will look at those later
Context: https://help.github.com/articles/dealing-with-line-endings/
If you work on this repo on Windows, you quickly see the `.gitattributes` are not setup right for development on Windows.
1. Certain files had mixed line endings, which causes Visual Studio to prompt to adjust.
2. Running `premake` yields Windows line endings on Windows, and so every `*.csproj` file appears to have changes.
`xamarin-android` has a well-used `.gitattributes` file, so I used it as a starting point and added an entry for `*.cake` files.
The way it works (as I understand it):
- `git` stores everything with unix line endings
- on checkout, clients convert the line endings according to settings in the `.gitattributes` file
So, for example:
- All `*.csproj` files will have Windows line endings, as Visual Studio expects (both Mac and Windows)
- `*.cs` files will have Windows line endings on Windows, and unix line endings on Mac
As part of consolidating our CI setup, we now have Windows builds running on Jenkins. This means we no longer need to use AppVeyor at all, which is a good thing. AppVeyor is not a CI system well known by other folks working on the Xamarin or Mono teams, where Jenkins is mostly used.
Other changes:
- Updated `.gitignore` for files appearing on Windows: `UpgradeLog.htm` from VS upgrading projects and `*.obj` from running the C tests
- `Download-Xamarin-Android` needs to "copy" from temp, since the bots have temp in `D:\` and you can't do a "move" operation across drives
- Added a `Jenkins` cake target to replace `AppVeyor`
- Switch to Android API Level 26 and `TargetFrameworkVersion` v8.0 by default. Jenkins PR bots did not have an option to provision API 24.
- Updated to Android Support Libs 26.x
Changes for latest Android Studio + Windows
- Updated `.gitignore`
- Removed files we don't need to check into source control
- Changed option for max heap size that was erroring on Windows
- Use `--stacktrace` option when running gradle, so we get error messages
- Updated Android test project to API 26, and support lib 26.x
TODO in future PRs:
- Drop everything that says "AppVeyor"
One of the most common issues Windows developers face when using E4K is a message such as:
Cannot find Java SDK: JAVA_HOME environment variable is not set.
In fact, most Windows users don't set `JAVA_HOME` at all, since it is not something done system-wide by any installer.
Solution? Let's add a fallback to use `AndroidSdk.JavaSdkPath`.
`AndroidSdk` from `xamarin-android-tools` has very reliable logic for finding Java on all platforms. However, we haven't been using it in E4K for locating Java, because it _implicitly_ requires the Android SDK (see class name) be installed in order to work. See where `AndroidSdkInfo` throws here: b159597b15/src/Xamarin.Android.Tools.AndroidSdk/AndroidSdkInfo.cs (L23)
Using it as a last resort will make things alot simpler for our Windows users. If they have Xamarin.Android installed from VS 2017, everything will "Just Work".
- Restored: partial missing of extension support + bitcode enabling for iOS
- Fix quoting issue somewhat unrelated to original PR
- [cake] Use DeleteDirectories to work around cake bug https://github.com/cake-build/cake/issues/2135
- Remove files covered under docs.microsoft.com
- Remove stale Contributing doc
- Remove stale android research docs
- Update readme with cake bits from old file
We should just use the default verbosity for the MSBuild Cake alias, which follows the verbosity passed to Cake at the command line.
Such as:
./build.sh -v diagnostic
Previously we were always forcing this to `Verbosity.Minimal`.
This is not optimal, since an `NSArray` of enums can't be done
without turning everything into `NSNumber`.
However the current code does not compile and that's worse that
an suboptimal API.
Fix https://github.com/mono/Embeddinator-4000/issues/561
Test projects failing to build on Linux on TravisCI, perhaps this will
fix it? This seems to be happening since #616, but I think it is a change on
the TravisCI build bots.
Changes:
- FSharp Android project shouldn't have `AndroidUseLatestPlatformSdk` on
- We don't need System.ValueTuple
- The `Build-C-Tests` Cake task should also copy `FSharp.Core.dll` as using
the system one doesn't seem to be working reliably on TravisCI