diff --git a/Documentation/guides/messages/xa0121.md b/Documentation/guides/messages/xa0121.md
index c736263a2f1..728e4cdfb49 100644
--- a/Documentation/guides/messages/xa0121.md
+++ b/Documentation/guides/messages/xa0121.md
@@ -1,21 +1,21 @@
---
-title: Xamarin.Android warning XA0121
-description: XA0121 warning code
-ms.date: 09/19/2019
+title: Xamarin.Android error XA0121
+description: XA0121 error code
+ms.date: 10/30/2019
---
-# Xamarin.Android warning XA0121
+# Xamarin.Android error XA0121
## Issue
The behavior implemented in the
-`` MSBuild task is now
-deprecated.
+`` MSBuild task is no longer
+supported.
This MSBuild task is a precursor to [Xamarin.Build.Download][xbd] that
enables downloading of Android packages from the internet.
Libraries using any of the following custom assembly-level attributes
-will encounter this warning:
+will encounter this error:
* `IncludeAndroidResourcesFromAttribute`
* `NativeLibraryReferenceAttribute`
@@ -26,9 +26,8 @@ will encounter this warning:
The [Xamarin Support Libraries][supportlibs], can be simply updated to
a newer version on NuGet.
-Library authors will need to remove usage of these deprecated
-attributes. Their functionality will be removed in a future version of
-Xamarin.Android.
+Library authors will need to remove usage of these attributes. Their
+functionality was removed in Xamarin.Android 10.2.
[xbd]: https://www.nuget.org/packages/Xamarin.Build.Download
[supportlibs]: https://github.com/xamarin/AndroidSupportComponents
diff --git a/src/Mono.Android/Android/IncludeAndroidResourcesFromAttribute.cs b/src/Mono.Android/Android/IncludeAndroidResourcesFromAttribute.cs
index e89125dfd86..5430424083f 100644
--- a/src/Mono.Android/Android/IncludeAndroidResourcesFromAttribute.cs
+++ b/src/Mono.Android/Android/IncludeAndroidResourcesFromAttribute.cs
@@ -3,7 +3,7 @@
namespace Android {
[AttributeUsage (AttributeTargets.Assembly, AllowMultiple = true)]
- [Obsolete ("This attribute is deprecated and will be removed in a future release.")]
+ [Obsolete ("This attribute is not longer supported.", error: true)]
public class IncludeAndroidResourcesFromAttribute : ReferenceFilesAttribute
{
public IncludeAndroidResourcesFromAttribute (string path)
diff --git a/src/Mono.Android/Android/NativeLibraryReferenceAttribute.cs b/src/Mono.Android/Android/NativeLibraryReferenceAttribute.cs
index 88941e5e649..83c7e6b0886 100644
--- a/src/Mono.Android/Android/NativeLibraryReferenceAttribute.cs
+++ b/src/Mono.Android/Android/NativeLibraryReferenceAttribute.cs
@@ -3,7 +3,7 @@
namespace Android {
[AttributeUsage (AttributeTargets.Assembly, AllowMultiple = true)]
- [Obsolete ("This attribute is deprecated and will be removed in a future release.")]
+ [Obsolete ("This attribute is not longer supported.", error: true)]
sealed public class NativeLibraryReferenceAttribute : ReferenceFilesAttribute
{
public NativeLibraryReferenceAttribute (string filename)
diff --git a/src/Mono.Android/Android/ReferenceFilesAttribute.cs b/src/Mono.Android/Android/ReferenceFilesAttribute.cs
index c73ebc394a2..b691d7a3544 100644
--- a/src/Mono.Android/Android/ReferenceFilesAttribute.cs
+++ b/src/Mono.Android/Android/ReferenceFilesAttribute.cs
@@ -1,7 +1,7 @@
using System;
namespace Android {
- [Obsolete ("This attribute is deprecated and will be removed in a future release.")]
+ [Obsolete ("This attribute is not longer supported.", error: true)]
public abstract class ReferenceFilesAttribute : Attribute
{
internal ReferenceFilesAttribute () {}
diff --git a/src/Mono.Android/Java.Interop/JavaLibraryReferenceAttribute.cs b/src/Mono.Android/Java.Interop/JavaLibraryReferenceAttribute.cs
index a859cc23135..b62fd97858a 100644
--- a/src/Mono.Android/Java.Interop/JavaLibraryReferenceAttribute.cs
+++ b/src/Mono.Android/Java.Interop/JavaLibraryReferenceAttribute.cs
@@ -3,7 +3,7 @@
namespace Java.Interop {
[AttributeUsage (AttributeTargets.Assembly, AllowMultiple = true)]
- [Obsolete ("This attribute is deprecated and will be removed in a future release.")]
+ [Obsolete ("This attribute is not longer supported.", error: true)]
public class JavaLibraryReferenceAttribute : Android.ReferenceFilesAttribute
{
public JavaLibraryReferenceAttribute (string filename)
diff --git a/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Aapt.targets b/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Aapt.targets
index 835083ed8d3..429c3a463b0 100644
--- a/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Aapt.targets
+++ b/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Aapt.targets
@@ -48,7 +48,6 @@ Copyright (C) 2019 Microsoft Corporation. All rights reserved.
ExtraArgs="$(AndroidResgenExtraArgs)"
ToolPath="$(AaptToolPath)"
ToolExe="$(AaptToolExe)"
- AdditionalAndroidResourcePaths="@(_AdditonalAndroidResourceCachePaths)"
ApiLevel="$(_AndroidTargetSdkVersion)"
AndroidUseLatestPlatformSdk="$(AndroidUseLatestPlatformSdk)"
ResourceNameCaseMap="$(_AndroidResourceNameCaseMap)"
@@ -81,7 +80,6 @@ Copyright (C) 2019 Microsoft Corporation. All rights reserved.
AssetDirectory="$(MonoAndroidAssetsDirIntermediate)"
ToolPath="$(AaptToolPath)"
ToolExe="$(AaptToolExe)"
- AdditionalAndroidResourcePaths="@(_AdditonalAndroidResourceCachePaths)"
ApiLevel="$(_AndroidTargetSdkVersion)"
AndroidUseLatestPlatformSdk="$(AndroidUseLatestPlatformSdk)"
ResourceNameCaseMap="$(_AndroidResourceNameCaseMap)"
diff --git a/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Aapt2.targets b/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Aapt2.targets
index 4bfa41f4bd8..5cd02d6aca5 100644
--- a/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Aapt2.targets
+++ b/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Aapt2.targets
@@ -50,7 +50,7 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
Condition=" '$(_AndroidUseAapt2)' == 'True' "
>
diff --git a/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Designer.targets b/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Designer.targets
index a2750bbcb46..8aca9e217e2 100644
--- a/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Designer.targets
+++ b/src/Xamarin.Android.Build.Tasks/MSBuild/Xamarin/Android/Xamarin.Android.Designer.targets
@@ -19,12 +19,6 @@ Copyright (C) 2016 Xamarin. All rights reserved.
-
-
-
-
@@ -41,9 +35,6 @@ Copyright (C) 2016 Xamarin. All rights reserved.
-
-
-
diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/FilterAssemblies.cs b/src/Xamarin.Android.Build.Tasks/Tasks/FilterAssemblies.cs
index 4f7caf39bc3..c163a95ff7c 100644
--- a/src/Xamarin.Android.Build.Tasks/Tasks/FilterAssemblies.cs
+++ b/src/Xamarin.Android.Build.Tasks/Tasks/FilterAssemblies.cs
@@ -43,7 +43,7 @@ public override bool RunTask ()
using (var pe = new PEReader (File.OpenRead (assemblyItem.ItemSpec))) {
var reader = pe.GetMetadataReader ();
var assemblyDefinition = reader.GetAssemblyDefinition ();
- var targetFrameworkIdentifier = assemblyDefinition.GetTargetFrameworkIdentifier (reader);
+ var targetFrameworkIdentifier = GetTargetFrameworkIdentifier (assemblyDefinition, reader);
if (string.Compare (targetFrameworkIdentifier, TargetFrameworkIdentifier, StringComparison.OrdinalIgnoreCase) == 0) {
output.Add (assemblyItem);
continue;
@@ -71,6 +71,40 @@ public override bool RunTask ()
return !Log.HasLoggedErrors;
}
+ string GetTargetFrameworkIdentifier (AssemblyDefinition assembly, MetadataReader reader)
+ {
+ string targetFrameworkIdentifier = null;
+ foreach (var handle in assembly.GetCustomAttributes ()) {
+ var attribute = reader.GetCustomAttribute (handle);
+ var name = reader.GetCustomAttributeFullName (attribute);
+ switch (name) {
+ case "System.Runtime.Versioning.TargetFrameworkAttribute":
+ var arguments = attribute.GetCustomAttributeArguments ();
+ foreach (var p in arguments.FixedArguments) {
+ // Of the form "MonoAndroid,Version=v8.1"
+ var value = p.Value?.ToString ();
+ if (!string.IsNullOrEmpty (value)) {
+ int commaIndex = value.IndexOf (",", StringComparison.Ordinal);
+ if (commaIndex != -1) {
+ targetFrameworkIdentifier = value.Substring (0, commaIndex);
+ break;
+ }
+ }
+ }
+ break;
+ case "Android.IncludeAndroidResourcesFromAttribute":
+ case "Android.NativeLibraryReferenceAttribute":
+ case "Java.Interop.JavaLibraryReferenceAttribute":
+ Log.LogCodedError ("XA0121",
+ $"Assembly '{reader.GetString (assembly.Name)}' is using '[assembly: {name}]', which is no longer supported. Use a newer version of this NuGet package or notify the library author.");
+ break;
+ default:
+ break;
+ }
+ }
+ return targetFrameworkIdentifier;
+ }
+
bool HasReference (MetadataReader reader)
{
foreach (var handle in reader.AssemblyReferences) {
diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/GetAdditionalResourcesFromAssemblies.cs b/src/Xamarin.Android.Build.Tasks/Tasks/GetAdditionalResourcesFromAssemblies.cs
deleted file mode 100644
index 205b7f6268b..00000000000
--- a/src/Xamarin.Android.Build.Tasks/Tasks/GetAdditionalResourcesFromAssemblies.cs
+++ /dev/null
@@ -1,482 +0,0 @@
-using Microsoft.Build.Framework;
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Net;
-using System.Reflection.Metadata;
-using System.Reflection.PortableExecutable;
-using System.Security.Cryptography;
-using System.Text.RegularExpressions;
-using System.Xml.Linq;
-using Xamarin.Android.Tools;
-
-namespace Xamarin.Android.Tasks
-{
-
- public class GetAdditionalResourcesFromAssemblies : AndroidAsyncTask
- {
- public override string TaskPrefix => "GAR";
-
- ///
- /// Environment variable named XAMARIN_CACHEPATH that can be set
- /// to override the default cache path.
- ///
- public const string CachePathEnvironmentVar = "%XAMARIN_CACHEPATH%";
-
- ///
- /// Base directory under the user's local app data folder that is used as the
- /// default cache location.
- ///
- const string CacheBaseDir = "Xamarin";
-
- ///
- /// Assemblies whose resources are unzipped to a cache path rather than in-place.
- ///
- const string AssemblyNamePrefix = "Xamarin.";
-
- [Required]
- public string AndroidSdkDirectory { get; set; }
-
- public string AndroidNdkDirectory { get; set; }
-
- [Required]
- public ITaskItem[] Assemblies { get; set; }
-
- [Required]
- public bool DesignTimeBuild { get; set; }
-
- [Required]
- public string CacheFile { get; set; }
-
- string CachePath;
-
- internal const string AndroidSkipResourceExtraction = "AndroidSkipResourceExtraction";
-
- public GetAdditionalResourcesFromAssemblies ()
- {
- }
-
- readonly Regex regex = new Regex(@"(\$(\w+))\b");
-
- readonly string[] extraPaths = new string[] {
- Path.Combine ("extras", "android"),
- Path.Combine ("extras", "google"),
- };
-
- string SubstituteEnvVariables (string path)
- {
- MatchEvaluator replaceEnvVar = (Match m) => {
- var e = m.Groups [2].Value;
- switch (e) {
- case "ANDROID_SDK_PATH":
- return AndroidSdkDirectory.TrimEnd (Path.DirectorySeparatorChar);
- case "ANDROID_NDK_PATH":
- //NOTE: AndroidNdkDirectory is not [Required]
- if (string.IsNullOrEmpty (AndroidNdkDirectory)) {
- goto default;
- }
- return AndroidNdkDirectory.TrimEnd (Path.DirectorySeparatorChar);
- default:
- var v = Environment.GetEnvironmentVariable (e);
- if (!string.IsNullOrEmpty (v))
- return v;
- return m.Groups [1].Value;
- }
- };
-
- return regex.Replace (path, replaceEnvVar);
- }
-
- internal static string ErrorMessage (CustomAttributeValue
-
-
-
-
-
-
-
-
-
-
-
-
-
_ResolveMonoAndroidSdks
- ;_GetAdditionalResourcesFromAssemblies
;_ExtractLibraryProjectImports
;_GetLibraryImports
;_ExtractJavaDocJars
@@ -612,7 +582,6 @@ Copyright (C) 2012 Xamarin Inc. All rights reserved.
-
diff --git a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj
index 8ef1c4b5052..6aeb9002866 100644
--- a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj
+++ b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj
@@ -262,7 +262,6 @@
-
@@ -284,7 +283,6 @@
-
diff --git a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets
index 04e7b9694fa..f467e0628e7 100644
--- a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets
+++ b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets
@@ -71,7 +71,6 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
-
@@ -91,7 +90,6 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
-
@@ -279,7 +277,6 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
<_LibraryProjectImportsDirectoryName Condition=" '$(_LibraryProjectImportsDirectoryName)'==''">library_project_imports
<_NativeLibraryImportsDirectoryName Condition=" '$(_NativeLibraryImportsDirectoryName)'==''">native_library_imports
<_AndroidLayoutBindingsDependencyCache>$(IntermediateOutputPath)layout-binding-deps.cache
- <_AndroidResourcePathsCache>$(IntermediateOutputPath)resourcepaths.cache
<_AndroidLibraryImportsCache>$(IntermediateOutputPath)libraryimports.cache
<_AndroidLibraryProjectImportsCache>$(IntermediateOutputPath)libraryprojectimports.cache
<_AndroidLibrayProjectIntermediatePath Condition=" '$(_AndroidLibrayProjectIntermediatePath)' == '' And '$(UseShortFileNames)' == 'True' ">$(IntermediateOutputPath)lp\
@@ -481,7 +478,6 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
true
True
False
- <_AndroidResourcePathsCache Condition=" '$(DesignTimeBuild)' == 'true' And !Exists ('$(_AndroidResourcePathsCache)') ">$(_AndroidResourcePathsDesignTimeCache)
<_AndroidLibraryImportsCache Condition=" '$(DesignTimeBuild)' == 'true' And !Exists ('$(_AndroidLibraryImportsCache)') ">$(_AndroidLibraryImportsDesignTimeCache)
<_AndroidLibraryProjectImportsCache Condition=" '$(DesignTimeBuild)' == 'true' And !Exists ('$(_AndroidLibraryProjectImportsCache)') ">$(_AndroidLibraryProjectImportsDesignTimeCache)
<_AndroidBuildPropertiesCache Condition=" '$(DesignTimeBuild)' == 'true' ">$(_AndroidDesignTimeBuildPropertiesCache)
@@ -522,66 +518,6 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
-
- <_BeforeBuildAdditionalResourcesCache>
- _CreatePropertiesCache;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(MSBuildProjectDirectory)\packages.config
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_AdditionalAndroidResourceCachePaths Include="@(_AdditionalAndroidResourcePaths)" />
-
-
-
-
-
-
-
-
-
-
-
@@ -1263,7 +1167,6 @@ because xbuild doesn't support framework reference assemblies.
<_AndroidStaticResourcesFlag>$(IntermediateOutputPath)static.flag
<_AndroidResourcesCacheFile>$(IntermediateOutputPath)mergeresources.cache
True
- <_AndroidResourcePathsDesignTimeCache>$(_AndroidIntermediateDesignTimeBuildDirectory)resourcepaths.cache
<_AndroidLibraryImportsDesignTimeCache>$(_AndroidIntermediateDesignTimeBuildDirectory)libraryimports.cache
<_AndroidLibraryProjectImportsDesignTimeCache>$(_AndroidIntermediateDesignTimeBuildDirectory)libraryprojectimports.cache
<_AndroidManagedResourceDesignerFile>$(_AndroidIntermediateDesignTimeBuildDirectory)$(_AndroidResourceDesigner)
@@ -1335,9 +1238,9 @@ because xbuild doesn't support framework reference assemblies.
+ DependsOnTargets="_CreatePropertiesCache;_ExtractLibraryProjectImports;_ValidateAndroidPackageProperties">
'%(Identity)\cache.stamp');
$(_AndroidBuildPropertiesCache);
$(ProjectAssetsFile);
- $(_AndroidResourcePathsCache);
$(_AndroidLibraryProjectImportsCache);
$(_AndroidLibraryImportsCache);
@@ -2364,8 +2264,6 @@ because xbuild doesn't support framework reference assemblies.
_GenerateEnvironmentFiles;
_GetLibraryImports;
_CheckDuplicateJavaLibraries;
- _GetAdditionalResourcesFromAssemblies;
- _CreateAdditionalResourceCache;
UpdateAndroidAssets;
$(_AfterCreateBaseApkDependsOnTargets);
_PrepareCreateBaseApk;
@@ -2444,8 +2342,6 @@ because xbuild doesn't support framework reference assemblies.
_GetLibraryImports;
_CheckDuplicateJavaLibraries;
_CreateBaseApk;
- _GetAdditionalResourcesFromAssemblies;
- _CreateAdditionalResourceCache;
_DetermineJavaLibrariesToCompile;
$(_CompileJavaDependsOnTargets)
@@ -2506,8 +2402,6 @@ because xbuild doesn't support framework reference assemblies.
_CompileJava;
_CreateApplicationSharedLibraries;
_GetMonoPlatformJarPath;
- _GetAdditionalResourcesFromAssemblies;
- _CreateAdditionalResourceCache;
_GetLibraryImports
<_CompileToDalvikInputs>
@@ -3319,7 +3213,6 @@ because xbuild doesn't support framework reference assemblies.
-
diff --git a/tests/CodeGen-Binding/Xamarin.Android.LibraryProjectZip-LibBinding/Properties/AssemblyInfo.cs b/tests/CodeGen-Binding/Xamarin.Android.LibraryProjectZip-LibBinding/Properties/AssemblyInfo.cs
index 9dd7ca0da3e..82821c9ccc0 100644
--- a/tests/CodeGen-Binding/Xamarin.Android.LibraryProjectZip-LibBinding/Properties/AssemblyInfo.cs
+++ b/tests/CodeGen-Binding/Xamarin.Android.LibraryProjectZip-LibBinding/Properties/AssemblyInfo.cs
@@ -20,32 +20,3 @@
// if desired. See the Mono documentation for more information about signing.
//[assembly: AssemblyDelaySign(false)]
//[assembly: AssemblyKeyFile("")]
-
-[assembly: Android.IncludeAndroidResourcesFromAttribute ("./",
- SourceUrl="file:///JavaLib.zip")]
-[assembly: Java.Interop.JavaLibraryReference ("classes.jar",
- SourceUrl="file:///JavaLib.zip")]
-
-// native library path should contain abi
-[assembly: Android.NativeLibraryReference ("arm64-v8a/libsimple.so",
- SourceUrl="file:///NativeLib.zip", Version="native-lib-1")]
-[assembly: Android.NativeLibraryReference ("armeabi-v7a/libsimple.so",
- SourceUrl="file:///NativeLib.zip", Version="native-lib-1")]
-[assembly: Android.NativeLibraryReference ("x86/libsimple.so",
- SourceUrl="file:///NativeLib.zip", Version="native-lib-1")]
-[assembly: Android.NativeLibraryReference ("x86_64/libsimple.so",
- SourceUrl="file:///NativeLib.zip", Version="native-lib-1")]
-
-// native library path should contain abi
-[assembly: Android.NativeLibraryReference ("arm64-v8a/libsimple2.so",
- EmbeddedArchive="aar-test/EmbeddedNativeLib.zip",
- SourceUrl="file:///NativeLib2.zip", Version="native-lib-2")]
-[assembly: Android.NativeLibraryReference ("armeabi-v7a/libsimple2.so",
- EmbeddedArchive="aar-test/EmbeddedNativeLib.zip",
- SourceUrl="file:///NativeLib2.zip", Version="native-lib-2")]
-[assembly: Android.NativeLibraryReference ("x86/libsimple2.so",
- EmbeddedArchive="aar-test/EmbeddedNativeLib.zip",
- SourceUrl="file:///NativeLib2.zip", Version="native-lib-2")]
-[assembly: Android.NativeLibraryReference ("x86_64/libsimple2.so",
- EmbeddedArchive="aar-test/EmbeddedNativeLib.zip",
- SourceUrl="file:///NativeLib2.zip", Version="native-lib-2")]
diff --git a/tests/CodeGen-Binding/Xamarin.Android.LibraryProjectZip-LibBinding/Xamarin.Android.LibraryProjectZip-LibBinding.csproj b/tests/CodeGen-Binding/Xamarin.Android.LibraryProjectZip-LibBinding/Xamarin.Android.LibraryProjectZip-LibBinding.csproj
index b130c95ce22..f27cb0af573 100644
--- a/tests/CodeGen-Binding/Xamarin.Android.LibraryProjectZip-LibBinding/Xamarin.Android.LibraryProjectZip-LibBinding.csproj
+++ b/tests/CodeGen-Binding/Xamarin.Android.LibraryProjectZip-LibBinding/Xamarin.Android.LibraryProjectZip-LibBinding.csproj
@@ -69,10 +69,7 @@
-
-
-
-
+
diff --git a/tests/CodeGen-Binding/Xamarin.Android.LibraryProjectZip-LibBinding/Xamarin.Android.LibraryProjectZip-LibBinding.targets b/tests/CodeGen-Binding/Xamarin.Android.LibraryProjectZip-LibBinding/Xamarin.Android.LibraryProjectZip-LibBinding.targets
index 12ee7a54908..acda8372890 100644
--- a/tests/CodeGen-Binding/Xamarin.Android.LibraryProjectZip-LibBinding/Xamarin.Android.LibraryProjectZip-LibBinding.targets
+++ b/tests/CodeGen-Binding/Xamarin.Android.LibraryProjectZip-LibBinding/Xamarin.Android.LibraryProjectZip-LibBinding.targets
@@ -2,25 +2,33 @@
+
+ <_Abi Include="arm64-v8a" />
+ <_Abi Include="armeabi-v7a" />
+ <_Abi Include="x86" />
+ <_Abi Include="x86_64" />
+ <_NativeLibs Include="@(_Abi->'libs\%(Identity)\libsimple.so')" />
+
+ Outputs="@(_NativeLibs2)">
-
-
+
+
+
+
+ <_NativeLibs2 Include="@(_Abi->'simple2\libs\%(Identity)\libsimple2.so')" />
+
+ Outputs="@(_NativeLibs2)">
-
-
-
-
+
+
+
+ Outputs="$(OutputPath)JavaLib.aar">
<_Jdk9Modules Condition="$(_JdkVersion.StartsWith ('9'))">JAVA_OPTS="--add-modules java.xml.bind"
@@ -53,10 +54,10 @@
WorkingDirectory="$(MSBuildThisFileDirectory)java\JavaLib"
/>
-
+
-
-
+
+
diff --git a/tests/MSBuildDeviceIntegration/Tests/InstantRunTest.cs b/tests/MSBuildDeviceIntegration/Tests/InstantRunTest.cs
index 64e66acd1f8..e62c706518b 100644
--- a/tests/MSBuildDeviceIntegration/Tests/InstantRunTest.cs
+++ b/tests/MSBuildDeviceIntegration/Tests/InstantRunTest.cs
@@ -166,8 +166,8 @@ public void SkipFastDevAlreadyInstalledFile ([Values ("dx", "d8")] string dexToo
DexTool = dexTool,
};
proj.SetDefaultTargetDevice ();
- proj.Packages.Add (KnownPackages.AndroidSupportV4_22_1_1_1);
- proj.Packages.Add (KnownPackages.SupportV7AppCompat_22_1_1_1);
+ proj.PackageReferences.Add (KnownPackages.AndroidSupportV4_27_0_2_1);
+ proj.PackageReferences.Add (KnownPackages.SupportV7AppCompat_27_0_2_1);
proj.MainActivity = proj.DefaultMainActivity.Replace (": Activity", ": Android.Support.V7.App.AppCompatActivity");
var b = CreateApkBuilder (Path.Combine ("temp", TestName));
Assert.IsTrue (b.Install (proj), "install should have succeeded.");
@@ -191,7 +191,7 @@ public void SkipFastDevAlreadyInstalledFile ([Values ("dx", "d8")] string dexToo
#pragma warning disable 414
static object [] SkipFastDevAlreadyInstalledResourcesSource = new object [] {
new object[] { new Package [0], null },
- new object[] { new Package [] { KnownPackages.AndroidSupportV4_22_1_1_1, KnownPackages.SupportV7AppCompat_22_1_1_1}, "Android.Support.V7.App.AppCompatActivity" },
+ new object[] { new Package [] { KnownPackages.AndroidSupportV4_27_0_2_1, KnownPackages.SupportV7AppCompat_27_0_2_1}, "Android.Support.V7.App.AppCompatActivity" },
};
#pragma warning restore 414
@@ -208,7 +208,7 @@ public void SkipFastDevAlreadyInstalledResources (Package [] packages, string ba
var proj = new XamarinAndroidApplicationProject () { AndroidFastDeploymentType = "Assemblies:Dexes", UseLatestPlatformSdk = true };
proj.SetDefaultTargetDevice ();
foreach (var pkg in packages)
- proj.Packages.Add (pkg);
+ proj.PackageReferences.Add (pkg);
if (baseActivityClass != null)
proj.MainActivity = proj.DefaultMainActivity.Replace (": Activity", ": " + baseActivityClass);
var b = CreateApkBuilder ("temp/SkipFastDevAlreadyInstalledResources");