Merge branch 'master' into 27.1.1

# Conflicts:
#	arch-lifecycle/viewmodel/source/Arch.Lifecycle.ViewModel.csproj
#	build.cake
#	build.sh
#	cake.packages.config
#	preference-leanback-v17/source/V17-Preference-Leanback.csproj
#	support-dynamic-animation/source/Additions/Additions.cs
This commit is contained in:
Redth 2018-07-23 14:25:32 -04:00
Родитель a8e489ee90 4619472a3d
Коммит 3c370963d1
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 17E1C97FEEE960BD
12 изменённых файлов: 135 добавлений и 76 удалений

Просмотреть файл

@ -16,6 +16,7 @@
<DelaySign>true</DelaySign> <DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>publickey.snk</AssemblyOriginatorKeyFile> --> <AssemblyOriginatorKeyFile>publickey.snk</AssemblyOriginatorKeyFile> -->
<AndroidClassParser>class-parse</AndroidClassParser> <AndroidClassParser>class-parse</AndroidClassParser>
<AndroidCodegenTarget>XAJavaInterop1</AndroidCodegenTarget>
<ProductVersion>8.0.30703</ProductVersion> <ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
</PropertyGroup> </PropertyGroup>

Просмотреть файл

@ -66,8 +66,8 @@ var MAVEN_REPO_URL = "https://dl.google.com/dl/android/maven2/";
var BUILD_TOOLS_URL = "https://dl-ssl.google.com/android/repository/build-tools_r27-macosx.zip"; var BUILD_TOOLS_URL = "https://dl-ssl.google.com/android/repository/build-tools_r27-macosx.zip";
var ANDROID_SDK_VERSION = IsRunningOnWindows () ? "v8.0" : "android-26"; var ANDROID_SDK_VERSION = IsRunningOnWindows () ? "v8.0" : "android-26";
var RENDERSCRIPT_FOLDER = "android-8.1.0"; var RENDERSCRIPT_FOLDER = "android-8.1.0";
var DOCS_URL = "https://bosstoragemirror.blob.core.windows.net/android-docs-scraper/ea/ea65204c51cf20873c17c32584f3b12ed390ac55/android-support.zip";
var REFERENCE_DOCS_URL = "https://developer.android.com/reference/"; var REFERENCE_DOCS_URL = "https://developer.android.com/reference/";
var REFERENCE_DOCS_PACKAGELIST_URL = REFERENCE_DOCS_URL + "android/support/package-list";
// We grab the previous release's api-info.xml to use as a comparison for this build's generated info to make an api-diff // We grab the previous release's api-info.xml to use as a comparison for this build's generated info to make an api-diff
var BASE_API_INFO_URL = EnvironmentVariable("MONO_API_INFO_XML_URL") ?? API_INFO_URL; var BASE_API_INFO_URL = EnvironmentVariable("MONO_API_INFO_XML_URL") ?? API_INFO_URL;
@ -609,36 +609,23 @@ Task ("buildtasks")
Task ("droiddocs") Task ("droiddocs")
.Does (() => .Does (() =>
{ {
EnsureDirectoryExists("./output"); EnsureDirectoryExists("./externals/");
var compressedDocsFile = "./output/docs-" + DOC_VERSION + ".zip"; if (!FileExists("./externals/docs.zip"))
DownloadFile(DOCS_URL, "./externals/docs.zip");
if (DirectoryExists("./docs"))
DeleteDirectory("./docs", true);
EnsureDirectoryExists("./docs/");
if (!FileExists(compressedDocsFile)) { Unzip("./externals/docs.zip", "./docs");
if (IsRunningOnWindows ())
StartProcess ("util/droiddocs.exe", "scrape --out ./docs --url " + REFERENCE_DOCS_URL + " --package-list-source " + REFERENCE_DOCS_PACKAGELIST_URL + " --package-filter \"android.support\"");
else
StartProcess ("mono", "util/droiddocs.exe scrape --out ./docs --url " + REFERENCE_DOCS_URL + " --package-list-source " + REFERENCE_DOCS_PACKAGELIST_URL + " --package-filter \"android.support\"");
// Scraper misses a few files we require EnsureDirectoryExists("./docs/reference/");
EnsureDirectoryExists("./docs/reference");
DownloadFile(REFERENCE_DOCS_URL + "classes.html", "./docs/reference/classes.html"); DownloadFile(REFERENCE_DOCS_URL + "classes.html", "./docs/reference/classes.html");
CopyFile ("./docs/reference/classes.html", "./docs/reference/index.html"); CopyFile ("./docs/reference/classes.html", "./docs/reference/index.html");
DownloadFile(REFERENCE_DOCS_URL + "packages.html", "./docs/reference/packages.html"); DownloadFile(REFERENCE_DOCS_URL + "packages.html", "./docs/reference/packages.html");
ZipCompress ("./docs", compressedDocsFile);
}
if (!DirectoryExists("./docs"))
Unzip (compressedDocsFile, "./docs");
if (!FileExists("./Metadata.generated.xml")) {
// Generate metadata file from docs
if (IsRunningOnWindows ())
StartProcess ("util/droiddocs.exe", "transform --out ./Metadata.generated.xml --type Metadata --dir ./docs --prefix \"/reference/\" --package-filter \"android.support\"");
else
StartProcess ("mono", "util/droiddocs.exe transform --out ./Metadata.generated.xml --type Metadata --dir ./docs --prefix \"/reference/\" --package-filter \"android.support\"");
}
}); });
Task ("clean") Task ("clean")

Просмотреть файл

@ -106,6 +106,7 @@ $PACKAGES_CONFIG = Join-Path $TOOLS_DIR "packages.config"
$PACKAGES_CONFIG_MD5 = Join-Path $TOOLS_DIR "packages.config.md5sum" $PACKAGES_CONFIG_MD5 = Join-Path $TOOLS_DIR "packages.config.md5sum"
$ADDINS_PACKAGES_CONFIG = Join-Path $ADDINS_DIR "packages.config" $ADDINS_PACKAGES_CONFIG = Join-Path $ADDINS_DIR "packages.config"
$MODULES_PACKAGES_CONFIG = Join-Path $MODULES_DIR "packages.config" $MODULES_PACKAGES_CONFIG = Join-Path $MODULES_DIR "packages.config"
$CAKE_PACKAGES_CONFIG = Join-Path $PSScriptRoot "cake.packages.config"
# Make sure tools folder exists # Make sure tools folder exists
if ((Test-Path $PSScriptRoot) -and !(Test-Path $TOOLS_DIR)) { if ((Test-Path $PSScriptRoot) -and !(Test-Path $TOOLS_DIR)) {
@ -115,11 +116,16 @@ if ((Test-Path $PSScriptRoot) -and !(Test-Path $TOOLS_DIR)) {
# Make sure that packages.config exist. # Make sure that packages.config exist.
if (!(Test-Path $PACKAGES_CONFIG)) { if (!(Test-Path $PACKAGES_CONFIG)) {
Write-Verbose -Message "Downloading packages.config..." if (!(Test-Path $CAKE_PACKAGES_CONFIG)) {
try { Write-Verbose -Message "Downloading packages.config..."
$wc = GetProxyEnabledWebClient try {
$wc.DownloadFile("https://cakebuild.net/download/bootstrapper/packages", $PACKAGES_CONFIG) } catch { $wc = GetProxyEnabledWebClient
Throw "Could not download packages.config." $wc.DownloadFile("https://cakebuild.net/download/bootstrapper/packages", $PACKAGES_CONFIG) } catch {
Throw "Could not download packages.config."
}
} else {
Write-Verbose -Message "using local cake.packages.config..."
Copy-Item $CAKE_PACKAGES_CONFIG $PACKAGES_CONFIG
} }
} }
@ -232,4 +238,4 @@ $cakeArguments += $ScriptArgs
# Start Cake # Start Cake
Write-Host "Running build script..." Write-Host "Running build script..."
&$CAKE_EXE $cakeArguments &$CAKE_EXE $cakeArguments
exit $LASTEXITCODE exit $LASTEXITCODE

Просмотреть файл

@ -46,12 +46,17 @@ if [ ! -d "$TOOLS_DIR" ]; then
fi fi
# Make sure that packages.config exist. # Make sure that packages.config exist.
if [ ! -f "$SCRIPT_DIR/cake.packages.config" ]; then if [ ! -f "$TOOLS_DIR/packages.config" ]; then
echo "Downloading packages.config..." if [ ! -f "$SCRIPT_DIR/cake.packages.config" ]; then
curl -Lsfo "$TOOLS_DIR/packages.config" https://cakebuild.net/download/bootstrapper/packages echo "Downloading packages.config..."
if [ $? -ne 0 ]; then curl -Lsfo "$TOOLS_DIR/packages.config" https://cakebuild.net/download/bootstrapper/packages
echo "An error occurred while downloading packages.config." if [ $? -ne 0 ]; then
exit 1 echo "An error occurred while downloading packages.config."
exit 1
fi
else
echo "using local cake.packages.config..."
cp "$SCRIPT_DIR/cake.packages.config" "$TOOLS_DIR/packages.config"
fi fi
else else
echo "using local cake.packages.config..." echo "using local cake.packages.config..."

Просмотреть файл

@ -19,6 +19,7 @@
<ProductVersion>8.0.30703</ProductVersion> <ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
<AndroidClassParser>class-parse</AndroidClassParser> <AndroidClassParser>class-parse</AndroidClassParser>
<AndroidCodegenTarget>XAJavaInterop1</AndroidCodegenTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>

Просмотреть файл

@ -19,8 +19,8 @@
<ProductVersion>8.0.30703</ProductVersion> <ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
<AndroidClassParser>class-parse</AndroidClassParser> <AndroidClassParser>class-parse</AndroidClassParser>
<AndroidCodegenTarget>XAJavaInterop1</AndroidCodegenTarget> <AndroidCodegenTarget>XAJavaInterop1</AndroidCodegenTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType> <DebugType>full</DebugType>

Просмотреть файл

@ -20,6 +20,7 @@
<ProductVersion>8.0.30703</ProductVersion> <ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
<AndroidClassParser>class-parse</AndroidClassParser> <AndroidClassParser>class-parse</AndroidClassParser>
<AndroidCodegenTarget>XAJavaInterop1</AndroidCodegenTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>

Просмотреть файл

@ -15,7 +15,7 @@
<dependencies> <dependencies>
<group targetFramework="MonoAndroid81"> <group targetFramework="MonoAndroid81">
<dependency id="Xamarin.Android.Support.Annotations" version="[$version$]" /> <dependency id="Xamarin.Android.Support.Annotations" version="[$version$]" />
<dependency id="Xamarin.Android.Arch.Lifecycle.Runtime" version="1.0.3" /> <dependency id="Xamarin.Android.Arch.Lifecycle.Runtime" version="$android.arch.lifecycle.runtime$" />
</group> </group>
</dependencies> </dependencies>
</metadata> </metadata>

Просмотреть файл

@ -1,36 +1,86 @@
using System; // using System;
using Android.Runtime; // using Android.Runtime;
namespace Android.Support.Animation // namespace Android.Support.Animation
{ // {
internal static class __JniCtorUtil // internal static class __JniCtorUtil
{ // {
internal static unsafe void CtorImpl(Java.Lang.Object sender, Type classType, IntPtr classRef, IntPtr methodId, string jniSignature, JValue* args, Action<IntPtr, JniHandleOwnership> setHandle) // internal static unsafe void CtorImpl(Java.Lang.Object sender, Type classType, IntPtr classRef, IntPtr methodId, string jniSignature, JValue* args, Action<IntPtr, JniHandleOwnership> setHandle)
{ // {
if (sender.Handle != IntPtr.Zero) // if (sender.Handle != IntPtr.Zero)
return; // return;
try // try
{ // {
if (((object)sender).GetType() != classType) // if (((object)sender).GetType() != classType)
{ // {
setHandle( // setHandle(
global::Android.Runtime.JNIEnv.StartCreateInstance(((object)sender).GetType(), jniSignature, args), // global::Android.Runtime.JNIEnv.StartCreateInstance(((object)sender).GetType(), jniSignature, args),
JniHandleOwnership.TransferLocalRef); // JniHandleOwnership.TransferLocalRef);
global::Android.Runtime.JNIEnv.FinishCreateInstance(((global::Java.Lang.Object)sender).Handle, jniSignature, args); // global::Android.Runtime.JNIEnv.FinishCreateInstance(((global::Java.Lang.Object)sender).Handle, jniSignature, args);
return; // return;
} // }
if (methodId == IntPtr.Zero) // if (methodId == IntPtr.Zero)
methodId = JNIEnv.GetMethodID(classRef, "<init>", jniSignature); // methodId = JNIEnv.GetMethodID(classRef, "<init>", jniSignature);
setHandle( // setHandle(
global::Android.Runtime.JNIEnv.StartCreateInstance(classRef, methodId, args), // global::Android.Runtime.JNIEnv.StartCreateInstance(classRef, methodId, args),
JniHandleOwnership.TransferLocalRef); // JniHandleOwnership.TransferLocalRef);
JNIEnv.FinishCreateInstance(((global::Java.Lang.Object)sender).Handle, classRef, methodId, args); // JNIEnv.FinishCreateInstance(((global::Java.Lang.Object)sender).Handle, classRef, methodId, args);
} // }
finally // finally
{ // {
} // }
} // }
} // }
}
// public partial class SpringAnimation
// {
// private const string CTOR_1 = "(Ljava/lang/Object;Landroid/support/animation/FloatPropertyCompat;)V";
// static IntPtr id_ctor_1;
// [Register(".ctor", CTOR_1, "")]
// public unsafe SpringAnimation(global::Java.Lang.Object @object, FloatPropertyCompat @property)
// : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
// {
// JValue* __args = stackalloc JValue[2];
// __args[0] = new JValue(@object);
// __args[1] = new JValue(@property);
// __JniCtorUtil.CtorImpl(this, typeof(SpringAnimation), class_ref, id_ctor_1, CTOR_1, __args, SetHandle);
// }
// private const string JNI_CTOR_2 = "(Ljava/lang/Object;Landroid/support/animation/FloatPropertyCompat;F)V";
// static IntPtr id_ctor_2;
// [Register(".ctor", JNI_CTOR_2, "")]
// public unsafe SpringAnimation(global::Java.Lang.Object @object, FloatPropertyCompat @property, float finalPosition)
// : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
// {
// JValue* __args = stackalloc JValue[3];
// __args[0] = new JValue(@object);
// __args[1] = new JValue(@property);
// __args[2] = new JValue(finalPosition);
// __JniCtorUtil.CtorImpl(this, typeof(SpringAnimation), class_ref, id_ctor_2, JNI_CTOR_2, __args, SetHandle);
// }
// }
// public partial class FlingAnimation
// {
// private const string JNI_CTOR_1 = "(Ljava/lang/Object;Landroid/support/animation/FloatPropertyCompat;)V";
// static IntPtr id_ctor_1;
// [Register(".ctor", JNI_CTOR_1, "")]
// public unsafe FlingAnimation(global::Java.Lang.Object @object, FloatPropertyCompat @property)
// : base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
// {
// JValue* __args = stackalloc JValue[2];
// __args[0] = new JValue(@object);
// __args[1] = new JValue(@property);
// __JniCtorUtil.CtorImpl(this, typeof(FlingAnimation), class_ref, id_ctor_1, JNI_CTOR_1, __args, SetHandle);
// }
// }
// }

Просмотреть файл

@ -16,6 +16,7 @@
<DelaySign>true</DelaySign> <DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>publickey.snk</AssemblyOriginatorKeyFile> --> <AssemblyOriginatorKeyFile>publickey.snk</AssemblyOriginatorKeyFile> -->
<AndroidClassParser>class-parse</AndroidClassParser> <AndroidClassParser>class-parse</AndroidClassParser>
<AndroidCodegenTarget>XAJavaInterop1</AndroidCodegenTarget>
<ProductVersion>8.0.30703</ProductVersion> <ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
</PropertyGroup> </PropertyGroup>

Просмотреть файл

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<AndroidFragmentType>Android.Support.V4.App.Fragment</AndroidFragmentType>
</PropertyGroup>
</Project>

Просмотреть файл

@ -16,6 +16,7 @@
<DelaySign>true</DelaySign> <DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>publickey.snk</AssemblyOriginatorKeyFile> --> <AssemblyOriginatorKeyFile>publickey.snk</AssemblyOriginatorKeyFile> -->
<AndroidClassParser>class-parse</AndroidClassParser> <AndroidClassParser>class-parse</AndroidClassParser>
<AndroidCodegenTarget>XAJavaInterop1</AndroidCodegenTarget>
<ProductVersion>8.0.30703</ProductVersion> <ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
</PropertyGroup> </PropertyGroup>