diff --git a/.external b/.external
index dcdcafeeda7..23481e3f471 100644
--- a/.external
+++ b/.external
@@ -1,2 +1,2 @@
-xamarin/monodroid:master@1ac5333ec5e90b4e1fb9b324714811effdede37f
+xamarin/monodroid:master@767f647151936303c294d154d0d0a4da8b601464
mono/mono:2020-02@be2226b5a1c57df065efc4c1cf008d581e5cec7d
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 551d332b1b5..8d93f4fd837 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -4,6 +4,7 @@
"bin/TestDebug/MSBuildDeviceIntegration/MSBuildDeviceIntegration.dll",
"bin/TestDebug/net472/Xamarin.Android.Build.Tests.dll",
"bin/TestDebug/Xamarin.Android.Build.Tests.Commercial.dll",
+ "bin/TestRelease/MSBuildDeviceIntegration/MSBuildDeviceIntegration.dll",
],
"cmake.configureOnOpen": false
}
\ No newline at end of file
diff --git a/Documentation/guides/building-apps/build-process.md b/Documentation/guides/building-apps/build-process.md
index ea3de81b7e2..c823f7833f0 100644
--- a/Documentation/guides/building-apps/build-process.md
+++ b/Documentation/guides/building-apps/build-process.md
@@ -36,38 +36,35 @@ In broad terms, there are two types of Android application packages
Not coincidentally, these match the MSBuild `Configuration` which
produces the package.
-## Shared Runtime
-
-The *shared runtime* is a pair of additional Android packages which
-provide the Base Class Library (`mscorlib.dll`, etc.) and the
-Android binding library (`Mono.Android.dll`, etc.). Debug builds
-rely upon the shared runtime in lieu of including the Base Class Library and
-Binding assemblies within the Android application package, allowing the
-Debug package to be smaller.
-
-The shared runtime may be disabled in Debug builds by setting the
-[`$(AndroidUseSharedRuntime)`](~/android/deploy-test/building-apps/build-properties.md#androidusesharedruntime)
-property to `False`.
-
## Fast Deployment
-*Fast deployment* works in concert with the shared runtime to further
-shrink the Android application package size. This is done by not
-bundling the app's assemblies within the package. Instead, they are
-copied onto the target via `adb push`. This process speeds up the
-build/deploy/debug cycle because if *only* assemblies are changed,
-the package is not reinstalled. Instead, only the updated assemblies are
-re-synchronized to the target device.
+*Fast deployment* works by further shrinking Android application
+package size. This is done by not bundling the app's assemblies
+within the package. Instead, the are deployed directly to the
+application internal `files` directory. This is usually located
+in `/data/data/com.some.package`. This is not a global writable
+folder, so we need to use the `run-as` tool to run all the
+commands to copy the files into that diectory.
-Fast deployment is known to fail on devices which block `adb` from
-synchronizing to the directory
-`/data/data/@PACKAGE_NAME@/files/.__override__`.
+This process speeds up the build/deploy/debug cycle because
+if *only* assemblies are changed, the package is not reinstalled.
+Instead, only the updated assemblies are re-synchronized to the
+target device.
+
+Fast deployment is known to fail on devices which block `run-as`. This
+is usually devices of API 20 and lower.
Fast deployment is enabled by default, and may be disabled in Debug builds
by setting the `$(EmbedAssembliesIntoApk)` property to `True`.
+The [Enhanced Fast Deployment](~/android/deploy-test/building-apps/build-properties.md#AndroidFastDeploymentType) mode can
+be used in conjunction with this feature to speed up deployments even further.
+This will deploy both assemblies, native libraries, typemaps and dexes to the `files`
+directory. But you should only really need to enable this if you are changing
+native libraries, bindings or Java code.
+
## MSBuild Projects
The Xamarin.Android build process is based on MSBuild, which is also
diff --git a/Documentation/guides/building-apps/build-properties.md b/Documentation/guides/building-apps/build-properties.md
index 49cfd3e2171..bcf12b0161f 100644
--- a/Documentation/guides/building-apps/build-properties.md
+++ b/Documentation/guides/building-apps/build-properties.md
@@ -418,6 +418,8 @@ compiler.
Added in Xamarin.Android 10.2.
+
+
## AndroidFastDeploymentType
A `:` (colon)-separated list
@@ -433,12 +435,16 @@ faster.) Valid values include:
- `Assemblies`: Deploy application assemblies.
-- `Dexes`: Deploy `.dex` files, Android Resources, and Android
- Assets. **This value can *only* be used on devices running
+- `Dexes`: Deploy `.dex` files, native libraries and typemaps.
+ **This value can *only* be used on devices running
Android 4.4 or later (API-19).**
The default value is `Assemblies`.
+Support for Fast Deploying resources and assets via that system was
+removed in commit [f0d565fe](https://github.com/xamarin/xamarin-android/commit/f0d565fe4833f16df31378c77bbb492ffd2904b9). This was becuase it required the use of
+deprecated API's to work.
+
**Experimental**. Added in Xamarin.Android 6.1.
## AndroidGenerateJniMarshalMethods
@@ -1003,18 +1009,6 @@ than `aapt`.
Added in Xamarin.Android 8.1.
-## AndroidUseSharedRuntime
-
-A boolean property that
-determines whether the *shared runtime packages* are required in
-order to run the Application on the target device. Relying on the
-shared runtime packages allows the Application package to be
-smaller, speeding up the package creation and deployment process,
-resulting in a faster build/deploy/debug turnaround cycle.
-
-This property should be `True` for Debug builds, and `False` for
-Release projects.
-
## AndroidVersionCodePattern
A string property which allows
diff --git a/Documentation/guides/messages/README.md b/Documentation/guides/messages/README.md
index c558263bc1d..4eff81b1f84 100644
--- a/Documentation/guides/messages/README.md
+++ b/Documentation/guides/messages/README.md
@@ -69,6 +69,15 @@ ms.date: 01/24/2020
+ [XA0122](xa0122.md): Assembly '{assembly}' is using a deprecated attribute '[assembly: Java.Interop.DoNotPackageAttribute]'. Use a newer version of this NuGet package or notify the library author.
+ XA0123: Removing {issue} from {propertyName}. Lint {version} does not support this check.
+ [XA0124](xa0124.md): Interpreter is not supported by the x86 ABI
++ [XA0125](xa0125.md): `{Project}` is using a deprecated debug information level.
+Set the debugging information to Portable in the Visual Studio project property pages or edit the project file in a text editor and set the 'DebugType' MSBuild property to 'portable' to use the newer, cross-platform debug information level.
+If this file comes from a NuGet package, update to a newer version of the NuGet package or notify the library author.
++ [XA0126](xa0126.md): Error installing FastDev Tools. This device does not support Fast Deployment. Please rebuild your app using `EmbedAssembliesIntoApk = True`.
++ [XA0127](xa0127.md): There was an issue deploying {destination} using {FastDevTool}. We encountered the following error {output}. Please rebuild your app using `EmbedAssembliesIntoApk = True`.
++ [XA0128](xa0128.md): Stdio Redirection is enabled. Please disable it to use Fast Deployment.
++ [XA0129](xa0129.md): Error deploying `{File}`. Please disable fast deployment in the Visual Studio project property pages or edit the project file in a text editor and set the 'EmbedAssembliesIntoApk' MSBuild property to 'true'.
++ [XA0130](xa0130.md): Sorry. Fast deployment is only supported on devices running Android 5.0 (API level 21) or higher.
+Please disable fast deployment in the Visual Studio project property pages or edit the project file in a text editor and set the 'EmbedAssembliesIntoApk' MSBuild property to 'true'.
## XA1xxx: Project related
@@ -233,6 +242,7 @@ and `NNN` is a 3 digit number indicating the type of the unhandled `Exception`.
* `DES` - `Desugar`
* `DJL` - `DetermineJavaLibrariesToCompile`
* `DX8` - `D8`
+* `FD` - `FastDeploy`
* `FLB` - `FindLayoutsToBind`
* `FLT` - `FilterAssemblies`
* `GAD` - `GetAndroidDefineConstants`
diff --git a/Documentation/guides/messages/xa0119.md b/Documentation/guides/messages/xa0119.md
index db6fb8355ea..ef0c4c269a9 100644
--- a/Documentation/guides/messages/xa0119.md
+++ b/Documentation/guides/messages/xa0119.md
@@ -31,12 +31,10 @@ Remove the following options from `Debug` configurations:
* `None`
* `False`
-* `True`
*DO* use the following options for `Release` configurations:
* `True`
-* `False`
Consider submitting a [bug][bug] if you are getting one of these
warnings under normal circumstances.
diff --git a/Documentation/guides/messages/xa0126.md b/Documentation/guides/messages/xa0126.md
new file mode 100644
index 00000000000..93589a1a901
--- /dev/null
+++ b/Documentation/guides/messages/xa0126.md
@@ -0,0 +1,20 @@
+---
+title: Xamarin.Android error XA0126
+description: XA0126 error code
+ms.date: 08/07/2020
+---
+# Xamarin.Android error XA0126
+
+## Issue
+
+This issue happens when you are trying to use fast deployment on a device which
+does not support it. Fast deployment requires features which are not available
+on devices running API 20 or lower. The Fast Deployment system makes use of the
+[`run-as`](https://android.googlesource.com/platform/system/core.git/+/refs/heads/master/run-as/run-as.cpp#42) feature of the Android OS. This feature was either not available or had
+limited capabilities in API 20 and earlier.
+
+## Solution
+
+Disable Fast Deployment by setting `EmbedAssembliesIntoApk = True` in your .csproj.
+Or turn off `Fast Deployment` in the IDE. You will still be able to debug on the device,
+all the required files will be packaged inside the .apk.
\ No newline at end of file
diff --git a/Documentation/guides/messages/xa0127.md b/Documentation/guides/messages/xa0127.md
new file mode 100644
index 00000000000..940aa931102
--- /dev/null
+++ b/Documentation/guides/messages/xa0127.md
@@ -0,0 +1,19 @@
+---
+title: Xamarin.Android error XA0127
+description: XA0127 error code
+ms.date: 08/07/2020
+---
+# Xamarin.Android error XA0127
+
+## Issue
+
+If you encounter this issue something unexpected happened with the Fast Deployment
+native tooling. This is most likely to be a native crash.
+
+## Solution
+
+To work around the issue disable Fast Deployment by setting `EmbedAssembliesIntoApk = True`
+in your .csproj. Or turn off `Fast Deployment` in the IDE. You will still be able to debug
+on the device, all the required files will be packaged inside the .apk.
+
+In addition raise an issue at [https://github.com/xamarin/xamarin-android/issues/new/choose](https://github.com/xamarin/xamarin-android/issues/new/choose). Please provide the deployment log and as much detail as possible.
\ No newline at end of file
diff --git a/Documentation/guides/messages/xa0128.md b/Documentation/guides/messages/xa0128.md
new file mode 100644
index 00000000000..ed968694f94
--- /dev/null
+++ b/Documentation/guides/messages/xa0128.md
@@ -0,0 +1,26 @@
+---
+title: Xamarin.Android error XA0128
+description: XA0128 error code
+ms.date: 08/07/2020
+---
+# Xamarin.Android error XA0128
+
+## Issue
+
+The Fast Deployment system relys on reading the output from the various system applications
+on the device. This is done by reading `System.out`, which by default is where all output
+will be redirected. If `log.redirect-stdio` this will cause all of the Fast Deployment tooling
+to fail.
+
+## Solution
+
+Disable the redirection of stdio in order to use Fast Deployment. This can be done using
+the following commands.
+
+```
+adb shell stop
+adb shell setprop log.redirect-stdio false
+adb shell start
+```
+
+Depending on the device you might need to run `adb root` before running the above commands.
\ No newline at end of file
diff --git a/Documentation/guides/messages/xa0129.md b/Documentation/guides/messages/xa0129.md
new file mode 100644
index 00000000000..14ea9f1691c
--- /dev/null
+++ b/Documentation/guides/messages/xa0129.md
@@ -0,0 +1,19 @@
+title: Xamarin.Android error XA0129
+description: XA0129 error code
+ms.date: 08/07/2020
+---
+# Xamarin.Android error XA0129
+
+## Issue
+
+This issue happens when you are trying to use fast deployment on a device which
+does not support it. In this case both the normal and backup types of fast
+deployment failed. The Fast Deployment system makes use of the
+[`run-as`](https://android.googlesource.com/platform/system/core.git/+/refs/heads/master/run-as/run-as.cpp#42) feature of the Android OS. This feature was either not available or had
+limited capabilities in API 20 and earlier
+
+## Solution
+
+Disable Fast Deployment by setting `EmbedAssembliesIntoApk = True` in your .csproj.
+Or turn off `Fast Deployment` in the IDE. You will still be able to debug on the device,
+all the required files will be packaged inside the .apk.
\ No newline at end of file
diff --git a/Documentation/guides/messages/xa0130.md b/Documentation/guides/messages/xa0130.md
new file mode 100644
index 00000000000..738be7d78e3
--- /dev/null
+++ b/Documentation/guides/messages/xa0130.md
@@ -0,0 +1,19 @@
+title: Xamarin.Android error XA0130
+description: XA013- error code
+ms.date: 08/07/2020
+---
+# Xamarin.Android error XA0130
+
+## Issue
+
+This issue happens when you are trying to use fast deployment on a device which
+does not support it. Fast deployment requires features which are not available
+on devices running API 20 or lower. The Fast Deployment system makes use of the
+[`run-as`](https://android.googlesource.com/platform/system/core.git/+/refs/heads/master/run-as/run-as.cpp#42) feature of the Android OS. This feature was either not available or had
+limited capabilities in API 20 and earlier.
+
+## Solution
+
+Disable Fast Deployment by setting `EmbedAssembliesIntoApk = True` in your .csproj.
+Or turn off `Fast Deployment` in the IDE. You will still be able to debug on the device,
+all the required files will be packaged inside the .apk.
\ No newline at end of file
diff --git a/Documentation/release-notes/4690.md b/Documentation/release-notes/4690.md
new file mode 100644
index 00000000000..6044120137d
--- /dev/null
+++ b/Documentation/release-notes/4690.md
@@ -0,0 +1,17 @@
+# Fast Deployment Updates.
+
+As part of this update the fast deplyment system used for Debugging apps has
+been changed. The shared runtime is now no longer used or required.
+The Platform package has also been make obsolete.
+
+The new system also no longer uses the `external` drive for the fast deployment
+files. All of the files and tooling are now stored in the applications' `internal`
+directory. This has an advantage in that when the application is uninstalled all
+if the files and the tooling will be removed as well.
+
+The new system will not work on any devices older than API 21. This is because it
+relys on features that only work from API 21 onwards. Also API 21 is the lowest
+supported platform for the runtime, so running and debugging on older devices will
+be impossible.
+
+See [Documentation](~/android/deploy-test/building-apps/build-process.md#FastDeployment) for more details.
\ No newline at end of file
diff --git a/build-tools/installers/create-installers.targets b/build-tools/installers/create-installers.targets
index 93701b51af3..5152027ea2e 100644
--- a/build-tools/installers/create-installers.targets
+++ b/build-tools/installers/create-installers.targets
@@ -23,7 +23,7 @@
dllTrueFalse
- <_HasCommercialFiles Condition="Exists('$(MSBuildSrcDir)\Mono.Android.DebugRuntime-debug.apk')">True
+ <_HasCommercialFiles Condition="Exists('$(MSBuildSrcDir)\Xamarin.Android.Common.Debugging.targets')">True
<_MsxDocAssembly Include="Mono.Android">
@@ -421,6 +421,10 @@
<_MSBuildFiles Include="$(MSBuildSrcDir)\Xamarin.Installer.Common.dll" />
<_MSBuildFiles Include="$(MSBuildSrcDir)\Xamarin.Installer.Common.pdb" />
<_MSBuildFiles Include="$(MSBuildSrcDir)\Xamarin.Installer.Common.targets" />
+ <_MSBuildFiles Include="$(MSBuildSrcDir)\K4os.Compression.LZ4.dll" />
+ <_MSBuildFiles Include="@(AndroidSupportedTargetJitAbi->'$(MSBuildSrcDir)\lib\%(Identity)\xamarin.sync')" />
+ <_MSBuildFiles Include="@(AndroidSupportedTargetJitAbi->'$(MSBuildSrcDir)\lib\%(Identity)\xamarin.find')" />
+ <_MSBuildFiles Include="@(AndroidSupportedTargetJitAbi->'$(MSBuildSrcDir)\lib\%(Identity)\xamarin.stat')" />
diff --git a/samples/HelloWorld/HelloLibrary/HelloLibrary.csproj b/samples/HelloWorld/HelloLibrary/HelloLibrary.csproj
index 0200146e047..aa9cb8a9b8b 100644
--- a/samples/HelloWorld/HelloLibrary/HelloLibrary.csproj
+++ b/samples/HelloWorld/HelloLibrary/HelloLibrary.csproj
@@ -38,7 +38,6 @@
prompt4SdkOnly
- falsetrue
@@ -46,7 +45,6 @@
TRACEprompt4
- falseSdkOnly
@@ -60,7 +58,7 @@
-
-
- false
- true
+
None
- falsetruetrue
diff --git a/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.targets b/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.targets
index 13e6659e536..2abec96ad84 100644
--- a/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.targets
+++ b/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.targets
@@ -7,11 +7,12 @@
+ true
-
diff --git a/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx b/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx
index 94a56c918af..edd62f00d8a 100644
--- a/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx
+++ b/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx
@@ -1,17 +1,17 @@
-
@@ -281,7 +281,7 @@ The term "lock file" comes from NuGet. For example, search for "UnauthorizedLock
{0} - A NuGet target framework moniker string
- Using the shared runtime and Android App Bundles at the same time is not currently supported. Use the shared runtime for Debug configurations and Android App Bundles for Release configurations.
+ Using Fast Deployment and Android App Bundles at the same time is not currently supported. Use Fast Deployment for Debug configurations and Android App Bundles for Release configurations.The following are literal names and should not be translated: Android App Bundles
diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.cs.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.cs.xlf
index e3d4e46c15f..6dd8f285ad6 100644
--- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.cs.xlf
+++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.cs.xlf
@@ -228,8 +228,8 @@ The term "lock file" comes from NuGet. For example, search for "UnauthorizedLock
{0} - A NuGet target framework moniker string
- Using the shared runtime and Android App Bundles at the same time is not currently supported. Use the shared runtime for Debug configurations and Android App Bundles for Release configurations.
- Používání sdíleného modulu runtime a Android App Bundles zároveň se v současné době nepodporuje. Pro konfigurace Debug použijte sdílený modul runtime, pro konfigurace Release pak Android App Bundles.
+ Using Fast Deployment and Android App Bundles at the same time is not currently supported. Use Fast Deployment for Debug configurations and Android App Bundles for Release configurations.
+ Using Fast Deployment and Android App Bundles at the same time is not currently supported. Use Fast Deployment for Debug configurations and Android App Bundles for Release configurations.The following are literal names and should not be translated: Android App Bundles
diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.de.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.de.xlf
index 53c9b975994..57ac9c87e55 100644
--- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.de.xlf
+++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.de.xlf
@@ -228,8 +228,8 @@ The term "lock file" comes from NuGet. For example, search for "UnauthorizedLock
{0} - A NuGet target framework moniker string
- Using the shared runtime and Android App Bundles at the same time is not currently supported. Use the shared runtime for Debug configurations and Android App Bundles for Release configurations.
- Das gleichzeitige Verwenden von Shared Runtime und Android App Bundles wird derzeit nicht unterstützt. Verwenden Sie die Shared Runtime für Debuggingkonfigurationen und Android App Bundles für Releasekonfigurationen.
+ Using Fast Deployment and Android App Bundles at the same time is not currently supported. Use Fast Deployment for Debug configurations and Android App Bundles for Release configurations.
+ Using Fast Deployment and Android App Bundles at the same time is not currently supported. Use Fast Deployment for Debug configurations and Android App Bundles for Release configurations.The following are literal names and should not be translated: Android App Bundles
diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.es.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.es.xlf
index 095b51ad54a..36258ae27e1 100644
--- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.es.xlf
+++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.es.xlf
@@ -228,8 +228,8 @@ The term "lock file" comes from NuGet. For example, search for "UnauthorizedLock
{0} - A NuGet target framework moniker string
- Using the shared runtime and Android App Bundles at the same time is not currently supported. Use the shared runtime for Debug configurations and Android App Bundles for Release configurations.
- No se admite el uso de Android App Bundles y el entorno de ejecución compartido al mismo tiempo. Use el entorno de ejecución compartido para las configuraciones de depuración y Android App Bundles para las configuraciones de versión.
+ Using Fast Deployment and Android App Bundles at the same time is not currently supported. Use Fast Deployment for Debug configurations and Android App Bundles for Release configurations.
+ Using Fast Deployment and Android App Bundles at the same time is not currently supported. Use Fast Deployment for Debug configurations and Android App Bundles for Release configurations.The following are literal names and should not be translated: Android App Bundles
diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.fr.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.fr.xlf
index 675dadf0e11..54f06168b5f 100644
--- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.fr.xlf
+++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.fr.xlf
@@ -228,8 +228,8 @@ The term "lock file" comes from NuGet. For example, search for "UnauthorizedLock
{0} - A NuGet target framework moniker string
- Using the shared runtime and Android App Bundles at the same time is not currently supported. Use the shared runtime for Debug configurations and Android App Bundles for Release configurations.
- L'utilisation simultanée du runtime partagé et des bundles d'applications Android n'est pas prise en charge actuellement. Utilisez le runtime partagé pour les configurations de débogage et les bundles d'applications Android pour les configurations de mise en production.
+ Using Fast Deployment and Android App Bundles at the same time is not currently supported. Use Fast Deployment for Debug configurations and Android App Bundles for Release configurations.
+ Using Fast Deployment and Android App Bundles at the same time is not currently supported. Use Fast Deployment for Debug configurations and Android App Bundles for Release configurations.The following are literal names and should not be translated: Android App Bundles
diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.it.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.it.xlf
index 2cd4741065d..b2ed4863957 100644
--- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.it.xlf
+++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.it.xlf
@@ -228,8 +228,8 @@ The term "lock file" comes from NuGet. For example, search for "UnauthorizedLock
{0} - A NuGet target framework moniker string
- Using the shared runtime and Android App Bundles at the same time is not currently supported. Use the shared runtime for Debug configurations and Android App Bundles for Release configurations.
- L'uso contestuale del runtime condiviso e di bundle dell'app Android non è attualmente supportato. Usare il runtime condiviso per le configurazioni di debug e i bundle dell'app Android per le configurazioni di versione.
+ Using Fast Deployment and Android App Bundles at the same time is not currently supported. Use Fast Deployment for Debug configurations and Android App Bundles for Release configurations.
+ Using Fast Deployment and Android App Bundles at the same time is not currently supported. Use Fast Deployment for Debug configurations and Android App Bundles for Release configurations.The following are literal names and should not be translated: Android App Bundles
diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ja.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ja.xlf
index 56279f26b9d..9cfd7bbbd20 100644
--- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ja.xlf
+++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ja.xlf
@@ -228,8 +228,8 @@ The term "lock file" comes from NuGet. For example, search for "UnauthorizedLock
{0} - A NuGet target framework moniker string
- Using the shared runtime and Android App Bundles at the same time is not currently supported. Use the shared runtime for Debug configurations and Android App Bundles for Release configurations.
- 共有ランタイムと Android App Bundles を同時に使用することは、現在サポートされていません。デバッグ構成には共有ランタイムを使用し、リリース構成には Android App Bundles を使用してください。
+ Using Fast Deployment and Android App Bundles at the same time is not currently supported. Use Fast Deployment for Debug configurations and Android App Bundles for Release configurations.
+ Using Fast Deployment and Android App Bundles at the same time is not currently supported. Use Fast Deployment for Debug configurations and Android App Bundles for Release configurations.The following are literal names and should not be translated: Android App Bundles
diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ko.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ko.xlf
index 5aa78fe53b8..b21e32e031e 100644
--- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ko.xlf
+++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ko.xlf
@@ -228,8 +228,8 @@ The term "lock file" comes from NuGet. For example, search for "UnauthorizedLock
{0} - A NuGet target framework moniker string
- Using the shared runtime and Android App Bundles at the same time is not currently supported. Use the shared runtime for Debug configurations and Android App Bundles for Release configurations.
- 현재는 공유 런타임 및 Android 앱 번들을 동시에 사용할 수 없습니다. 디버그 구성에는 공유 런타임을 사용하고 릴리스 구성에는 Android 앱 번들을 사용하세요.
+ Using Fast Deployment and Android App Bundles at the same time is not currently supported. Use Fast Deployment for Debug configurations and Android App Bundles for Release configurations.
+ Using Fast Deployment and Android App Bundles at the same time is not currently supported. Use Fast Deployment for Debug configurations and Android App Bundles for Release configurations.The following are literal names and should not be translated: Android App Bundles
diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pl.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pl.xlf
index c7e84d452c6..b9eaee1d482 100644
--- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pl.xlf
+++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pl.xlf
@@ -228,8 +228,8 @@ The term "lock file" comes from NuGet. For example, search for "UnauthorizedLock
{0} - A NuGet target framework moniker string
- Using the shared runtime and Android App Bundles at the same time is not currently supported. Use the shared runtime for Debug configurations and Android App Bundles for Release configurations.
- Jednoczesne używanie udostępnionego środowiska uruchomieniowego i pakietów aplikacji systemu Android nie jest obecnie obsługiwane. Używaj udostępnionego środowiska uruchomieniowego w przypadku konfiguracji debugowania, a pakietów aplikacji systemu Android na potrzeby konfiguracji wydania.
+ Using Fast Deployment and Android App Bundles at the same time is not currently supported. Use Fast Deployment for Debug configurations and Android App Bundles for Release configurations.
+ Using Fast Deployment and Android App Bundles at the same time is not currently supported. Use Fast Deployment for Debug configurations and Android App Bundles for Release configurations.The following are literal names and should not be translated: Android App Bundles
diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pt-BR.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pt-BR.xlf
index 4f0844edecb..6789a1b181d 100644
--- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pt-BR.xlf
+++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.pt-BR.xlf
@@ -228,8 +228,8 @@ The term "lock file" comes from NuGet. For example, search for "UnauthorizedLock
{0} - A NuGet target framework moniker string
- Using the shared runtime and Android App Bundles at the same time is not currently supported. Use the shared runtime for Debug configurations and Android App Bundles for Release configurations.
- Não há suporte para usar o runtime compartilhado e os Lotes de Aplicativo Android ao mesmo tempo no momento. Use o runtime compartilhado para configurações de Depuração e os Lotes de Aplicativo Android para configurações de Versão.
+ Using Fast Deployment and Android App Bundles at the same time is not currently supported. Use Fast Deployment for Debug configurations and Android App Bundles for Release configurations.
+ Using Fast Deployment and Android App Bundles at the same time is not currently supported. Use Fast Deployment for Debug configurations and Android App Bundles for Release configurations.The following are literal names and should not be translated: Android App Bundles
diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ru.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ru.xlf
index fc7431f6b1a..ae18e258095 100644
--- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ru.xlf
+++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.ru.xlf
@@ -228,8 +228,8 @@ The term "lock file" comes from NuGet. For example, search for "UnauthorizedLock
{0} - A NuGet target framework moniker string
- Using the shared runtime and Android App Bundles at the same time is not currently supported. Use the shared runtime for Debug configurations and Android App Bundles for Release configurations.
- Одновременное использование общей среды выполнения и Android App Bundles сейчас не поддерживается. Используйте общую среду выполнения для конфигураций отладки и Android App Bundles для конфигураций выпуска.
+ Using Fast Deployment and Android App Bundles at the same time is not currently supported. Use Fast Deployment for Debug configurations and Android App Bundles for Release configurations.
+ Using Fast Deployment and Android App Bundles at the same time is not currently supported. Use Fast Deployment for Debug configurations and Android App Bundles for Release configurations.The following are literal names and should not be translated: Android App Bundles
diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.tr.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.tr.xlf
index 8a530537b6e..85eea9fe48b 100644
--- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.tr.xlf
+++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.tr.xlf
@@ -228,8 +228,8 @@ The term "lock file" comes from NuGet. For example, search for "UnauthorizedLock
{0} - A NuGet target framework moniker string
- Using the shared runtime and Android App Bundles at the same time is not currently supported. Use the shared runtime for Debug configurations and Android App Bundles for Release configurations.
- Paylaşılan çalışma zamanı ve Android Uygulama Paketi Grupları'nın aynı zamanda kullanılması şu anda desteklenmiyor. Hata Ayıklama yapılandırmaları için paylaşılan çalışma zamanını, Sürüm yapılandırmaları için Android Uygulama Paketi Grupları'nı kullanın.
+ Using Fast Deployment and Android App Bundles at the same time is not currently supported. Use Fast Deployment for Debug configurations and Android App Bundles for Release configurations.
+ Using Fast Deployment and Android App Bundles at the same time is not currently supported. Use Fast Deployment for Debug configurations and Android App Bundles for Release configurations.The following are literal names and should not be translated: Android App Bundles
diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hans.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hans.xlf
index 99c4f2117c8..4e575d3503a 100644
--- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hans.xlf
+++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hans.xlf
@@ -228,8 +228,8 @@ The term "lock file" comes from NuGet. For example, search for "UnauthorizedLock
{0} - A NuGet target framework moniker string
- Using the shared runtime and Android App Bundles at the same time is not currently supported. Use the shared runtime for Debug configurations and Android App Bundles for Release configurations.
- 当前不支持同时使用共享运行时和 Android 应用程序包。请使用共享运行时进行调试配置,使用 Android 应用程序包进行发布配置。
+ Using Fast Deployment and Android App Bundles at the same time is not currently supported. Use Fast Deployment for Debug configurations and Android App Bundles for Release configurations.
+ Using Fast Deployment and Android App Bundles at the same time is not currently supported. Use Fast Deployment for Debug configurations and Android App Bundles for Release configurations.The following are literal names and should not be translated: Android App Bundles
diff --git a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hant.xlf b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hant.xlf
index 748b6a0f8df..3391e538d22 100644
--- a/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hant.xlf
+++ b/src/Xamarin.Android.Build.Tasks/Properties/xlf/Resources.zh-Hant.xlf
@@ -228,8 +228,8 @@ The term "lock file" comes from NuGet. For example, search for "UnauthorizedLock
{0} - A NuGet target framework moniker string
- Using the shared runtime and Android App Bundles at the same time is not currently supported. Use the shared runtime for Debug configurations and Android App Bundles for Release configurations.
- 目前不支援同時使用共用執行階段及 Android App Bundles。請將共用執行階段用於偵錯組態; 將 Android App Bundles 用於發行組態。
+ Using Fast Deployment and Android App Bundles at the same time is not currently supported. Use Fast Deployment for Debug configurations and Android App Bundles for Release configurations.
+ Using Fast Deployment and Android App Bundles at the same time is not currently supported. Use Fast Deployment for Debug configurations and Android App Bundles for Release configurations.The following are literal names and should not be translated: Android App Bundles
diff --git a/src/Xamarin.Android.Build.Tasks/Resources/MonoRuntimeProvider.Shared.20.java b/src/Xamarin.Android.Build.Tasks/Resources/MonoRuntimeProvider.Shared.20.java
deleted file mode 100644
index 4977e7118f4..00000000000
--- a/src/Xamarin.Android.Build.Tasks/Resources/MonoRuntimeProvider.Shared.20.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package mono;
-
-//NOTE: we can't use import, see Generator.GetMonoInitSource
-
-public class MonoRuntimeProvider
- extends android.content.ContentProvider
-{
- public MonoRuntimeProvider ()
- {
- }
-
- @Override
- public boolean onCreate ()
- {
- return true;
- }
-
- @Override
- public void attachInfo (android.content.Context context, android.content.pm.ProviderInfo info)
- {
- // Mono Runtime Initialization {{{
- android.content.pm.ApplicationInfo applicationInfo = context.getApplicationInfo ();
- android.content.pm.PackageManager packageManager = context.getPackageManager ();
- java.util.List apks = new java.util.ArrayList ();
- apks.add (applicationInfo.sourceDir);
- String platformPackage = mono.MonoPackageManager.getApiPackageName ();
- if (platformPackage != null) {
- try {
- android.content.pm.ApplicationInfo apiInfo = packageManager.getApplicationInfo (platformPackage, 0);
- apks.add (0, apiInfo.sourceDir);
- } catch (android.content.pm.PackageManager.NameNotFoundException e) {
- throw new RuntimeException ("Unable to find application " + platformPackage + "!", e);
- }
- }
- try {
- android.content.pm.ApplicationInfo runtimeInfo = packageManager.getApplicationInfo ("Mono.Android.DebugRuntime", 0);
- apks.add (0, runtimeInfo.sourceDir);
- applicationInfo = runtimeInfo;
- } catch (android.content.pm.PackageManager.NameNotFoundException e) {
- throw new RuntimeException ("Unable to find application Mono.Android.DebugRuntime!", e);
- }
- mono.MonoPackageManager.LoadApplication (context, applicationInfo, apks.toArray(new String[0]));
- // }}}
- super.attachInfo (context, info);
- }
-
- @Override
- public android.database.Cursor query (android.net.Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder)
- {
- throw new RuntimeException ("This operation is not supported.");
- }
-
- @Override
- public String getType (android.net.Uri uri)
- {
- throw new RuntimeException ("This operation is not supported.");
- }
-
- @Override
- public android.net.Uri insert (android.net.Uri uri, android.content.ContentValues initialValues)
- {
- throw new RuntimeException ("This operation is not supported.");
- }
-
- @Override
- public int delete (android.net.Uri uri, String where, String[] whereArgs)
- {
- throw new RuntimeException ("This operation is not supported.");
- }
-
- @Override
- public int update (android.net.Uri uri, android.content.ContentValues values, String where, String[] whereArgs)
- {
- throw new RuntimeException ("This operation is not supported.");
- }
-}
-
diff --git a/src/Xamarin.Android.Build.Tasks/Resources/MonoRuntimeProvider.Shared.java b/src/Xamarin.Android.Build.Tasks/Resources/MonoRuntimeProvider.Shared.java
deleted file mode 100644
index 09c7a81bf84..00000000000
--- a/src/Xamarin.Android.Build.Tasks/Resources/MonoRuntimeProvider.Shared.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package mono;
-
-//NOTE: we can't use import, see Generator.GetMonoInitSource
-
-public class MonoRuntimeProvider
- extends android.content.ContentProvider
-{
- public MonoRuntimeProvider ()
- {
- }
-
- @Override
- public boolean onCreate ()
- {
- return true;
- }
-
- @Override
- public void attachInfo (android.content.Context context, android.content.pm.ProviderInfo info)
- {
- // Mono Runtime Initialization {{{
- android.content.pm.ApplicationInfo applicationInfo = context.getApplicationInfo ();
- android.content.pm.PackageManager packageManager = context.getPackageManager ();
- java.util.List apks = new java.util.ArrayList ();
- apks.add (applicationInfo.sourceDir);
- if (android.os.Build.VERSION.SDK_INT >= 21) {
- String[] splitApks = applicationInfo.splitPublicSourceDirs;
- if (splitApks != null && splitApks.length > 0) {
- java.util.Collections.addAll (apks, splitApks);
- }
- }
- String platformPackage = mono.MonoPackageManager.getApiPackageName ();
- if (platformPackage != null) {
- try {
- android.content.pm.ApplicationInfo apiInfo = packageManager.getApplicationInfo (platformPackage, 0);
- apks.add (0, apiInfo.sourceDir);
- } catch (android.content.pm.PackageManager.NameNotFoundException e) {
- throw new RuntimeException ("Unable to find application " + platformPackage + "!", e);
- }
- }
- try {
- android.content.pm.ApplicationInfo runtimeInfo = packageManager.getApplicationInfo ("Mono.Android.DebugRuntime", 0);
- apks.add (0, runtimeInfo.sourceDir);
- applicationInfo = runtimeInfo;
- } catch (android.content.pm.PackageManager.NameNotFoundException e) {
- throw new RuntimeException ("Unable to find application Mono.Android.DebugRuntime!", e);
- }
- mono.MonoPackageManager.LoadApplication (context, applicationInfo, apks.toArray(new String[0]));
- // }}}
- super.attachInfo (context, info);
- }
-
- @Override
- public android.database.Cursor query (android.net.Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder)
- {
- throw new RuntimeException ("This operation is not supported.");
- }
-
- @Override
- public String getType (android.net.Uri uri)
- {
- throw new RuntimeException ("This operation is not supported.");
- }
-
- @Override
- public android.net.Uri insert (android.net.Uri uri, android.content.ContentValues initialValues)
- {
- throw new RuntimeException ("This operation is not supported.");
- }
-
- @Override
- public int delete (android.net.Uri uri, String where, String[] whereArgs)
- {
- throw new RuntimeException ("This operation is not supported.");
- }
-
- @Override
- public int update (android.net.Uri uri, android.content.ContentValues values, String where, String[] whereArgs)
- {
- throw new RuntimeException ("This operation is not supported.");
- }
-}
-
diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs b/src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs
index 717a3535439..8d78927282d 100644
--- a/src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs
+++ b/src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs
@@ -63,9 +63,6 @@ public class BuildApk : AndroidTask
public bool CreatePackagePerAbi { get; set; }
- [Required]
- public string UseSharedRuntime { get; set; }
-
public bool EmbedAssemblies { get; set; }
public bool BundleAssemblies { get; set; }
@@ -315,7 +312,6 @@ public override bool RunTask ()
void AddAssemblies (ZipArchiveEx apk, bool debug, bool compress, IDictionary compressedAssembliesInfo)
{
- bool use_shared_runtime = String.Equals (UseSharedRuntime, "true", StringComparison.OrdinalIgnoreCase);
string sourcePath;
AssemblyCompression.AssemblyData compressedAssembly = null;
string compressedOutputDir = Path.GetFullPath (Path.Combine (Path.GetDirectoryName (ApkOutputPath), "..", "lz4"));
@@ -359,9 +355,6 @@ void AddAssemblies (ZipArchiveEx apk, bool debug, bool compress, IDictionary javaTypes, TypeDefinitionCache cache)
{
string outputPath = Path.Combine (OutputDirectory, "src");
- string monoInit = GetMonoInitSource (AndroidSdkPlatform, UseSharedRuntime);
+ string monoInit = GetMonoInitSource (AndroidSdkPlatform);
bool hasExportReference = ResolvedAssemblies.Any (assembly => Path.GetFileName (assembly.ItemSpec) == "Mono.Android.Export.dll");
bool generateOnCreateOverrides = int.Parse (AndroidSdkPlatform) <= 10;
@@ -358,13 +355,13 @@ bool CreateJavaSources (IEnumerable javaTypes, TypeDefinitionCac
return ok;
}
- static string GetMonoInitSource (string androidSdkPlatform, bool useSharedRuntime)
+ static string GetMonoInitSource (string androidSdkPlatform)
{
// Lookup the mono init section from MonoRuntimeProvider:
// Mono Runtime Initialization {{{
// }}}
var builder = new StringBuilder ();
- var runtime = useSharedRuntime ? "Shared" : "Bundled";
+ var runtime = "Bundled";
var api = "";
if (int.TryParse (androidSdkPlatform, out int apiLevel) && apiLevel < 21) {
api = ".20";
diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/GeneratePackageManagerJava.cs b/src/Xamarin.Android.Build.Tasks/Tasks/GeneratePackageManagerJava.cs
index 2592eb7302a..550f2942ecd 100644
--- a/src/Xamarin.Android.Build.Tasks/Tasks/GeneratePackageManagerJava.cs
+++ b/src/Xamarin.Android.Build.Tasks/Tasks/GeneratePackageManagerJava.cs
@@ -34,9 +34,6 @@ public class GeneratePackageManagerJava : AndroidTask
[Required]
public string EnvironmentOutputDirectory { get; set; }
- [Required]
- public string UseSharedRuntime { get; set; }
-
[Required]
public string MainAssembly { get; set; }
@@ -87,12 +84,11 @@ public override bool RunTask ()
BuildId = buildId.ToString ();
Log.LogDebugMessage (" [Output] BuildId: {0}", BuildId);
- var shared_runtime = string.Compare (UseSharedRuntime, "true", true) == 0;
var doc = AndroidAppManifest.Load (Manifest, MonoAndroidHelper.SupportedVersions);
int minApiVersion = doc.MinSdkVersion == null ? 4 : (int) doc.MinSdkVersion;
// We need to include any special assemblies in the Assemblies list
var assemblies = ResolvedUserAssemblies
- .Concat (MonoAndroidHelper.GetFrameworkAssembliesToTreatAsUserAssemblies (ResolvedAssemblies))
+ .Concat (MonoAndroidHelper.GetFrameworkAssembliesToTreatAsUserAssemblies (ResolvedAssemblies))
.ToList ();
var mainFileName = Path.GetFileName (MainAssembly);
Func fileNameEq = (a,b) => a.Equals (b, StringComparison.OrdinalIgnoreCase);
@@ -121,11 +117,6 @@ public override bool RunTask ()
pkgmgr.WriteLine ("\t};");
- // Write the platform api apk we need
- pkgmgr.WriteLine ("\tpublic static String ApiPackageName = {0};", shared_runtime
- ? string.Format ("\"Mono.Android.Platform.ApiLevel_{0}\"",
- MonoAndroidHelper.SupportedVersions.GetApiLevelFromFrameworkVersion (TargetFrameworkVersion))
- : "null");
pkgmgr.WriteLine ("}");
pkgmgr.Flush ();
diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/LinkAssemblies.cs b/src/Xamarin.Android.Build.Tasks/Tasks/LinkAssemblies.cs
index fcf3d4b22d8..16525473961 100644
--- a/src/Xamarin.Android.Build.Tasks/Tasks/LinkAssemblies.cs
+++ b/src/Xamarin.Android.Build.Tasks/Tasks/LinkAssemblies.cs
@@ -25,9 +25,6 @@ public class LinkAssemblies : AndroidTask, ML.ILogger
{
public override string TaskPrefix => "LNK";
- [Required]
- public string UseSharedRuntime { get; set; }
-
[Required]
public string MainAssembly { get; set; }
@@ -105,11 +102,8 @@ bool Execute (DirectoryAssemblyResolver res)
options.TlsProvider = TlsProvider;
options.PreserveJniMarshalMethods = PreserveJniMarshalMethods;
options.DeterministicOutput = Deterministic;
-
- var skiplist = new List ();
- if (string.Compare (UseSharedRuntime, "true", true) == 0)
- skiplist.AddRange (Profile.SharedRuntimeAssemblies.Where (a => a.EndsWith (".dll")).Select (a => Path.GetFileNameWithoutExtension (a)));
+ var skiplist = new List ();
// Add LinkSkip options
if (!string.IsNullOrWhiteSpace (LinkSkip))
diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/ProcessAssemblies.cs b/src/Xamarin.Android.Build.Tasks/Tasks/ProcessAssemblies.cs
index ee9dd618603..a400eb9b3c3 100644
--- a/src/Xamarin.Android.Build.Tasks/Tasks/ProcessAssemblies.cs
+++ b/src/Xamarin.Android.Build.Tasks/Tasks/ProcessAssemblies.cs
@@ -11,7 +11,7 @@ namespace Xamarin.Android.Tasks
{
///
/// Processes .dll files coming from @(ResolvedFileToPublish). Removes duplicate .NET assemblies by MVID.
- ///
+ ///
/// Also sets some metadata:
/// * %(FrameworkAssembly)=True to determine if framework or user assembly
/// * %(HasMonoAndroidReference)=True for incremental build performance
@@ -21,10 +21,10 @@ public class ProcessAssemblies : AndroidTask
{
public override string TaskPrefix => "PRAS";
- public bool UseSharedRuntime { get; set; }
-
public string LinkMode { get; set; }
+ public bool IncludeDebugSymbols { get; set; }
+
public ITaskItem [] InputAssemblies { get; set; }
[Output]
@@ -100,7 +100,7 @@ public override bool RunTask ()
}
// Set ShrunkAssemblies for _RemoveRegisterAttribute and
- if (!string.IsNullOrEmpty (LinkMode) && !string.Equals (LinkMode, "None", StringComparison.OrdinalIgnoreCase) && !UseSharedRuntime) {
+ if (!string.IsNullOrEmpty (LinkMode) && !string.Equals (LinkMode, "None", StringComparison.OrdinalIgnoreCase) && !IncludeDebugSymbols) {
ShrunkAssemblies = OutputAssemblies.Select (a => {
var dir = Path.GetDirectoryName (a.ItemSpec);
var file = Path.GetFileName (a.ItemSpec);
diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AotTests.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AotTests.cs
index 6023d89d6b4..5512722d7df 100644
--- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AotTests.cs
+++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AotTests.cs
@@ -252,7 +252,6 @@ public void BuildAMassiveApp ()
",
});
- app1.SetProperty (KnownProperties.AndroidUseSharedRuntime, "False");
sb.Projects.Add (app1);
var code = new StringBuilder ();
code.AppendLine ("using System;");
diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.cs
index f82256278d9..65921c51374 100644
--- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.cs
+++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.cs
@@ -115,7 +115,6 @@ public void BuildHasNoWarnings (bool isRelease, bool xamarinForms, bool multidex
// Disable fast deployment for aabs, because we give:
// XA0119: Using Fast Deployment and Android App Bundles at the same time is not recommended.
proj.EmbedAssembliesIntoApk = true;
- proj.AndroidUseSharedRuntime = false;
}
proj.SetProperty ("XamarinAndroidSupportSkipVerifyVersions", "True"); // Disables API 29 warning in Xamarin.Build.Download
proj.SetProperty ("AndroidPackageFormat", packageFormat);
@@ -729,8 +728,8 @@ public void BuildApplicationAndClean ([Values (false, true)] bool isRelease, [Va
};
proj.SetProperty ("AndroidPackageFormat", packageFormat);
if (packageFormat == "aab")
- // Disable the shared runtime for aabs because it is not currently compatible and so gives an XA0119 build error.
- proj.AndroidUseSharedRuntime = false;
+ // Disable fast deployment for aabs because it is not currently compatible and so gives an XA0119 build error.
+ proj.EmbedAssembliesIntoApk = true;
using (var b = CreateApkBuilder ()) {
Assert.IsTrue (b.Build (proj), "Build should have succeeded.");
Assert.IsTrue (b.Clean (proj), "Clean should have succeeded.");
@@ -2375,6 +2374,7 @@ public interface OnFooListener
[Test]
[Category ("SmokeTests"), Category ("AOT")]
+ [NonParallelizable]
public void BuildApplicationWithSpacesInPath ([Values (true, false)] bool enableMultiDex, [Values ("dx", "d8")] string dexTool, [Values ("", "proguard", "r8")] string linkTool)
{
AssertDexToolSupported (dexTool);
@@ -2656,7 +2656,6 @@ public void BuildBasicApplicationCheckPdb ()
{
var proj = new XamarinAndroidApplicationProject {
EmbedAssembliesIntoApk = true,
- AndroidUseSharedRuntime = false,
};
using (var b = CreateApkBuilder ()) {
var reference = new BuildItem.Reference ("PdbTestLibrary.dll") {
@@ -3334,7 +3333,6 @@ public void XA0119 ()
{
var proj = new XamarinAndroidApplicationProject ();
proj.SetProperty ("_XASupportsFastDev", "True");
- proj.SetProperty (KnownProperties.AndroidUseSharedRuntime, "True");
proj.SetProperty (proj.DebugProperties, "AndroidLinkMode", "Full");
using (var b = CreateApkBuilder (Path.Combine ("temp", TestName))) {
b.Target = "Build"; // SignAndroidPackage would fail for OSS builds
@@ -3348,15 +3346,11 @@ public void XA0119AAB ()
{
var proj = new XamarinAndroidApplicationProject ();
proj.SetProperty ("_XASupportsFastDev", "True");
- proj.SetProperty (KnownProperties.AndroidUseSharedRuntime, "True");
proj.SetProperty ("AndroidPackageFormat", "aab");
using (var builder = CreateApkBuilder ()) {
builder.ThrowOnBuildFailure = false;
- Assert.IsFalse (builder.Build (proj), "Build should have failed.");
- string error = builder.LastBuildOutput
- .SkipWhile (x => !x.StartsWith ("Build FAILED."))
- .FirstOrDefault (x => x.Contains ("error XA0119:"));
- Assert.IsNotNull (error, "Build should have failed with XA0119.");
+ Assert.IsTrue (builder.Build (proj), "Build should have succeeded.");
+ Assert.IsTrue (StringAssertEx.ContainsText (builder.LastBuildOutput, "XA0119"), "Output should contain XA0119 warnings");
}
}
@@ -3364,7 +3358,6 @@ public void XA0119AAB ()
public void FastDeploymentDoesNotAddContentProvider ()
{
var proj = new XamarinAndroidApplicationProject {
- AndroidUseSharedRuntime = true,
EmbedAssembliesIntoApk = false,
};
proj.SetProperty ("_XASupportsFastDev", "True");
@@ -3842,8 +3835,8 @@ public void KotlinServiceLoader ([Values ("apk", "aab")] string packageFormat)
var proj = new XamarinAndroidApplicationProject ();
proj.SetProperty ("AndroidPackageFormat", packageFormat);
if (packageFormat == "aab")
- // Disable the shared runtime for aabs because it is not currently compatible and so gives an XA0119 build error.
- proj.AndroidUseSharedRuntime = false;
+ // Disable fast deployment for aabs because it is not currently compatible and so gives an XA0119 build error.
+ proj.EmbedAssembliesIntoApk = true;
proj.OtherBuildItems.Add (new BuildItem ("AndroidJavaLibrary", "kotlinx-coroutines-android-1.3.2.jar") {
WebContent = "https://repo1.maven.org/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-android/1.3.2/kotlinx-coroutines-android-1.3.2.jar"
});
diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/IncrementalBuildTest.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/IncrementalBuildTest.cs
index 257779aae52..01f52297bac 100644
--- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/IncrementalBuildTest.cs
+++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/IncrementalBuildTest.cs
@@ -125,7 +125,7 @@ public void CheckNothingIsDeletedByIncrementalClean ([Values (true, false)] bool
public void CheckResourceDirectoryDoesNotGetHosed ()
{
// do a release build
- // change one of the properties (say AotAssemblies)
+ // change one of the properties (say AotAssemblies)
// do another build. it should NOT hose the resource directory.
var path = Path.Combine ("temp", TestName);
var proj = new XamarinAndroidApplicationProject () {
@@ -276,7 +276,7 @@ public TestMe createTestMe () {
Assert.IsFalse (
b.Output.IsTargetSkipped ("_BuildApkEmbed"),
"the _BuildApkEmbed target should not be skipped");
- var expectedOutput = Path.Combine (Root, b.ProjectDirectory, app.IntermediateOutputPath, "android", "bin", "classes",
+ var expectedOutput = Path.Combine (Root, b.ProjectDirectory, app.IntermediateOutputPath, "android", "bin", "classes",
"com", "android", "test", "TestMe.class");
Assert.IsTrue (File.Exists (expectedOutput), string.Format ("{0} should exist.", expectedOutput));
Assert.IsTrue (b.Build (app), "Second build should have succeeded");
@@ -525,7 +525,6 @@ public void ProduceReferenceAssembly ()
ProjectName = "MyApp",
//NOTE: so _BuildApkEmbed runs in commercial tests
EmbedAssembliesIntoApk = true,
- AndroidUseSharedRuntime = false,
Sources = {
new BuildItem.Source ("Foo.cs") {
TextContent = () => "public class Foo : Bar { }"
@@ -661,14 +660,13 @@ public void ConvertCustomView ([Values (true, false)] bool useAapt2)
ProjectName = "MyApp",
//NOTE: so _BuildApkEmbed runs in commercial tests
EmbedAssembliesIntoApk = true,
- AndroidUseSharedRuntime = false,
AndroidUseAapt2 = useAapt2,
Sources = {
new BuildItem.Source ("Foo.cs") {
TextContent = () => "public class Foo : Bar { }"
},
new BuildItem.Source ("CustomTextView.cs") {
- TextContent = () =>
+ TextContent = () =>
@"using Android.Widget;
using Android.Content;
using Android.Util;
@@ -1063,7 +1061,6 @@ public void DeterministicBuilds ([Values (true, false)] bool deterministic)
Deterministic = deterministic,
//NOTE: so _BuildApkEmbed runs in commercial tests
EmbedAssembliesIntoApk = true,
- AndroidUseSharedRuntime = false,
};
using (var b = CreateApkBuilder ()) {
Assert.IsTrue (b.Build (proj), "first build should have succeeded.");
diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/ManifestTest.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/ManifestTest.cs
index d4419c54b23..223b8f591a6 100644
--- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/ManifestTest.cs
+++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/ManifestTest.cs
@@ -840,32 +840,5 @@ public void AllServiceAttributeProperties ([Values ("legacy", "manifestmerger.ja
Assert.AreEqual (expectedOutput, string.Join (" ", e.Attributes ()));
}
}
-
- [Test]
- public void Queries_API30 ([Values (true, false)] bool useAapt2)
- {
- AssertAaptSupported (useAapt2);
- AssertCommercialBuild ();
-
- var proj = new XamarinAndroidApplicationProject {
- AndroidUseSharedRuntime = true,
- EmbedAssembliesIntoApk = false,
- TargetSdkVersion = "30",
- };
- proj.AndroidUseAapt2 = useAapt2;
- using (var b = CreateApkBuilder ()) {
- Assert.IsTrue (b.Build (proj), "Build should have succeeded");
-
- string manifest = b.Output.GetIntermediaryAsText (Path.Combine ("android", "AndroidManifest.xml"));
- var doc = XDocument.Parse (manifest);
- var ns = XNamespace.Get ("http://schemas.android.com/apk/res/android");
- var names = doc.Element ("manifest")?
- .Element ("queries")?
- .Elements ("package")?
- .Select (e => e.Attribute (ns + "name")?.Value);
- StringAssertEx.Contains ("Mono.Android.DebugRuntime", names);
- StringAssertEx.Contains ("Mono.Android.Platform.ApiLevel_30", names);
- }
- }
}
}
diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/PackagingTest.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/PackagingTest.cs
index 4e63a1dd72f..7ec78bbe29a 100644
--- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/PackagingTest.cs
+++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/PackagingTest.cs
@@ -520,8 +520,8 @@ public void CheckAppBundle ([Values (true, false)] bool isRelease)
IsRelease = isRelease,
};
proj.SetProperty ("AndroidPackageFormat", "aab");
- // Disable the shared runtime because it is not currently compatible with aabs and so gives an XA0119 build error.
- proj.AndroidUseSharedRuntime = false;
+ // Disable the fast deployment because it is not currently compatible with aabs and so gives an XA0119 build error.
+ proj.EmbedAssembliesIntoApk = true;
using (var b = CreateApkBuilder (Path.Combine ("temp", TestName))) {
var bin = Path.Combine (Root, b.ProjectDirectory, proj.OutputPath);
diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/BaseTest.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/BaseTest.cs
index f1187ed132d..1a86883d4a1 100644
--- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/BaseTest.cs
+++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/BaseTest.cs
@@ -29,6 +29,11 @@ public static string DeviceAbi {
private set;
}
+ public static int DeviceSdkVersion {
+ get;
+ private set;
+ }
+
public static bool CommercialBuildAvailable {
get;
private set;
@@ -57,13 +62,17 @@ static SetUp ()
public void BeforeAllTests ()
{
try {
- int sdkVersion = GetSdkVersion ();
- if (HasDevices = sdkVersion != -1) {
- if (sdkVersion >= 21)
+ DeviceSdkVersion = GetSdkVersion ();
+ if (HasDevices = DeviceSdkVersion != -1) {
+ if (DeviceSdkVersion >= 21)
DeviceAbi = RunAdbCommand ("shell getprop ro.product.cpu.abilist64").Trim ();
if (string.IsNullOrEmpty (DeviceAbi))
DeviceAbi = RunAdbCommand ("shell getprop ro.product.cpu.abi") ?? RunAdbCommand ("shell getprop ro.product.cpu.abi2");
+
+ if (DeviceAbi.Contains (",")) {
+ DeviceAbi = DeviceAbi.Split (',')[0];
+ }
}
} catch (Exception ex) {
Console.Error.WriteLine ("Failed to determine whether there is Android target emulator or not: " + ex);
@@ -132,6 +141,8 @@ public void AssertHasDevices (bool fail = true)
protected string DeviceAbi => SetUp.DeviceAbi;
+ protected int DeviceSdkVersion => SetUp.DeviceSdkVersion;
+
protected bool IsWindows => TestEnvironment.IsWindows;
protected bool IsMacOS => TestEnvironment.IsMacOS;
@@ -550,7 +561,7 @@ protected virtual void CleanupTest ()
}
if (!Directory.Exists (output))
return;
- if (TestContext.CurrentContext.Result.Outcome.Status == NUnit.Framework.Interfaces.TestStatus.Passed ||
+ if (TestContext.CurrentContext.Result.Outcome.Status == NUnit.Framework.Interfaces.TestStatus.Passed ||
TestContext.CurrentContext.Result.Outcome.Status == NUnit.Framework.Interfaces.TestStatus.Skipped) {
FileSystemUtils.SetDirectoryWriteable (output);
try {
diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/DeviceTest.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/DeviceTest.cs
index 2e0751fa631..a5fc67ec10f 100644
--- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/DeviceTest.cs
+++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/DeviceTest.cs
@@ -153,6 +153,16 @@ protected static bool WaitForPermissionActivity (string logcatFilePath, int time
return result;
}
+ protected static bool WaitForAppBuiltForOlderAndroidWarning (string packageName, string logcatFilePath, int timeout = 5)
+ {
+ bool result = MonitorAdbLogcat ((line) => {
+ return line.Contains ($"ActivityTaskManager: Showing SDK deprecation warning for package {packageName}");
+ }, logcatFilePath, timeout);
+ if (result)
+ ClickButton ("", "android:id/button1", "OK");
+ return result;
+ }
+
protected static bool WaitForActivityToStart (string activityNamespace, string activityName, string logcatFilePath, int timeout = 60)
{
return WaitForActivityToStart (activityNamespace, activityName, logcatFilePath, out TimeSpan time, timeout);
@@ -219,7 +229,7 @@ protected static void ClickButton (string packageName, string buttonName, string
///
/// Returns the first device listed via `adb devices`
- ///
+ ///
/// Output is:
/// > adb devices
/// List of devices attached
diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/WearTests.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/WearTests.cs
index 768c65271ce..08ae91b8f12 100644
--- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/WearTests.cs
+++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/WearTests.cs
@@ -47,11 +47,9 @@ public void BundledWearApp ()
var path = Path.Combine ("temp", TestName);
var app = new XamarinAndroidApplicationProject {
ProjectName = "MyApp",
- AndroidUseSharedRuntime = false,
EmbedAssembliesIntoApk = true,
};
var wear = new XamarinAndroidWearApplicationProject {
- AndroidUseSharedRuntime = false,
EmbedAssembliesIntoApk = true,
};
app.References.Add (new BuildItem.ProjectReference ($"..\\{wear.ProjectName}\\{wear.ProjectName}.csproj", wear.ProjectName, wear.ProjectGuid) {
diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/XASdkTests.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/XASdkTests.cs
index 8dbd84ef3be..856cc30db67 100644
--- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/XASdkTests.cs
+++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/XASdkTests.cs
@@ -152,6 +152,9 @@ public void DotNetBuild (string runtimeIdentifiers, bool isRelease)
var apk = Path.Combine (outputPath, "UnnamedProject.UnnamedProject.apk");
FileAssert.Exists (apk);
+
+ bool expectEmbededAssembies = !(CommercialBuildAvailable && !isRelease);
+
using (var zip = ZipHelper.OpenZip (apk)) {
var rids = runtimeIdentifiers.Split (';');
foreach (var abi in rids.Select (MonoAndroidHelper.RuntimeIdentifierToAbi)) {
@@ -159,10 +162,10 @@ public void DotNetBuild (string runtimeIdentifiers, bool isRelease)
Assert.IsTrue (zip.ContainsEntry ($"lib/{abi}/libmonosgen-2.0.so"), "libmonosgen-2.0.so should exist.");
if (rids.Length > 1) {
var entry = $"assemblies/{abi}/System.Private.CoreLib.dll";
- Assert.IsTrue (zip.ContainsEntry (entry), $"{entry} should exist.");
+ Assert.AreEqual (expectEmbededAssembies, zip.ContainsEntry (entry), $"{entry} should {(expectEmbededAssembies ? "" : "not")} exist.");
} else {
var entry = "assemblies/System.Private.CoreLib.dll";
- Assert.IsTrue (zip.ContainsEntry (entry), $"{entry} should exist.");
+ Assert.AreEqual (expectEmbededAssembies, zip.ContainsEntry (entry), $"{entry} should {(expectEmbededAssembies ? "" : "not")} exist.");
}
}
}
@@ -195,11 +198,11 @@ public void DotNetPublish ([Values (false, true)] bool isRelease)
FileAssert.Exists (apk);
FileAssert.Exists (apkSigned);
- Assert.IsTrue (dotnet.Publish (parameters: new [] { "AndroidPackageFormat=aab" }), "second `dotnet publish` should succeed");
- FileAssert.DoesNotExist (apk);
- FileAssert.DoesNotExist (apkSigned);
+ Assert.IsTrue (dotnet.Publish (parameters: new [] { "AndroidPackageFormat=aab" }), $"second `dotnet publish` should succeed");
var aab = Path.Combine (publishDirectory, $"{proj.PackageName}.aab");
var aabSigned = Path.Combine (publishDirectory, $"{proj.PackageName}-Signed.aab");
+ FileAssert.DoesNotExist (apk);
+ FileAssert.DoesNotExist (apkSigned);
FileAssert.Exists (aab);
FileAssert.Exists (aabSigned);
}
diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/KnownProperties.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/KnownProperties.cs
index da0bbc30a43..7f9e1d7b529 100644
--- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/KnownProperties.cs
+++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/KnownProperties.cs
@@ -8,7 +8,6 @@ public static class KnownProperties
public const string TargetFrameworkVersion = "TargetFrameworkVersion";
public const string AndroidLinkMode = "AndroidLinkMode";
- public const string AndroidUseSharedRuntime = "AndroidUseSharedRuntime";
public const string EmbedAssembliesIntoApk = "EmbedAssembliesIntoApk";
public const string AndroidUseLatestPlatformSdk = "AndroidUseLatestPlatformSdk";
public const string AndroidUseAapt2 = "AndroidUseAapt2";
diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/XamarinAndroidApplicationProject.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/XamarinAndroidApplicationProject.cs
index 3c04e96a17c..47b59aa6ee2 100644
--- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/XamarinAndroidApplicationProject.cs
+++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/XamarinAndroidApplicationProject.cs
@@ -122,11 +122,6 @@ public bool Deterministic {
set { SetProperty (KnownProperties.Deterministic, value.ToString ()); }
}
- public bool AndroidUseSharedRuntime {
- get { return string.Equals (GetProperty (KnownProperties.AndroidUseSharedRuntime), "True", StringComparison.OrdinalIgnoreCase); }
- set { SetProperty (KnownProperties.AndroidUseSharedRuntime, value.ToString ()); }
- }
-
public bool EmbedAssembliesIntoApk {
get { return string.Equals (GetProperty (KnownProperties.EmbedAssembliesIntoApk), "True", StringComparison.OrdinalIgnoreCase); }
set { SetProperty (KnownProperties.EmbedAssembliesIntoApk, value.ToString ()); }
diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/XamarinAndroidProject.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/XamarinAndroidProject.cs
index fb8e13b8037..5fdfa10d2c3 100644
--- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/XamarinAndroidProject.cs
+++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/XamarinAndroidProject.cs
@@ -25,7 +25,6 @@ protected XamarinAndroidProject (string debugConfigurationName = "Debug", string
SetProperty ("MonoAndroidResourcePrefix", "Resources");
SetProperty (KnownProperties.AndroidUseLatestPlatformSdk, () => UseLatestPlatformSdk ? "True" : "False");
SetProperty (KnownProperties.TargetFrameworkVersion, () => TargetFrameworkVersion);
- SetProperty (ReleaseProperties, KnownProperties.AndroidUseSharedRuntime, "False");
}
SetProperty (KnownProperties.OutputType, "Library");
diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Common/BuildOutput.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Common/BuildOutput.cs
index ec1ead770a7..e141bac573f 100644
--- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Common/BuildOutput.cs
+++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Common/BuildOutput.cs
@@ -12,20 +12,20 @@ internal BuildOutput (XamarinProject project)
{
Project = project;
}
-
+
public ProjectBuilder Builder { get; set; }
-
+
public XamarinProject Project { get; private set; }
-
+
public string GetPropertyInApplicableConfiguration (string name)
{
return Project.GetProperty (Project.IsRelease ? Project.ReleaseProperties : Project.DebugProperties, name) ?? Project.GetProperty (name);
}
-
+
public string OutputPath {
get { return GetPropertyInApplicableConfiguration (KnownProperties.OutputPath); }
}
-
+
public string IntermediateOutputPath {
get { return GetPropertyInApplicableConfiguration (KnownProperties.IntermediateOutputPath) ?? "obj" + OutputPath.Substring (3); } // obj/{Config}
}
@@ -34,7 +34,7 @@ public string GetIntermediaryPath (string file)
{
return Path.Combine (Project.Root, Builder.ProjectDirectory, IntermediateOutputPath, file.Replace ('/', Path.DirectorySeparatorChar));
}
-
+
public string GetIntermediaryAsText (string root, string file)
{
return File.ReadAllText (GetIntermediaryPath (file));
@@ -97,7 +97,7 @@ public TimeSpan GetTargetOrTaskTime (string targetOrTask)
public bool IsApkInstalled {
get {
foreach (var line in Builder.LastBuildOutput) {
- if (line.Contains (" pm install "))
+ if (line.Contains ("Installed Package") || line.Contains (" pm install "))
return true;
}
return false;
@@ -114,53 +114,53 @@ public bool AreTargetsAllBuilt (params string [] targets)
return targets.All (t => !IsTargetSkipped (t));
}
}
-
+
public class AndroidApplicationBuildOutput : BuildOutput
{
internal AndroidApplicationBuildOutput (XamarinProject project)
: base (project)
{
}
-
+
public new XamarinAndroidApplicationProject Project {
get { return (XamarinAndroidApplicationProject) base.Project; }
}
-
+
public string ApkFile {
// If we could know package name, this can be simpler and much less hackier...
get { return Directory.GetFiles (Path.Combine (GetIntermediaryPath ("android"), "bin"), "*.apk").First (); }
}
-
+
public OutputApk OpenApk ()
{
return new OutputApk (ZipHelper.OpenZip (ApkFile));
}
}
-
+
public class OutputApk : IDisposable
{
ZipArchive apk;
-
+
internal OutputApk (ZipArchive apk)
{
this.apk = apk;
}
-
+
public void Dispose ()
{
apk.Dispose ();
}
-
+
ZipEntry GetEntry (string file)
{
return apk.First (e => e.FullName == file);
}
-
+
public bool Exists (string file)
{
return apk.Any (e => e.FullName == file);
}
-
+
public string GetText (string file)
{
using (var ms = new MemoryStream ()) {
@@ -170,7 +170,7 @@ public string GetText (string file)
return sr.ReadToEnd ();
}
}
-
+
public byte [] GetRaw (string file)
{
var e = GetEntry (file);
diff --git a/src/Xamarin.Android.Build.Tasks/Utilities/ManifestDocument.cs b/src/Xamarin.Android.Build.Tasks/Utilities/ManifestDocument.cs
index a0a3c66f6d3..6f5d20e2de8 100644
--- a/src/Xamarin.Android.Build.Tasks/Utilities/ManifestDocument.cs
+++ b/src/Xamarin.Android.Build.Tasks/Utilities/ManifestDocument.cs
@@ -88,7 +88,6 @@ internal class ManifestDocument
public bool MultiDex { get; set; }
public bool NeedsInternet { get; set; }
public bool InstantRunEnabled { get; set; }
- public bool UseSharedRuntime { get; set; }
public string VersionCode {
get {
XAttribute attr = doc.Root.Attribute (androidNs + "versionCode");
@@ -410,8 +409,7 @@ public IList Merge (TaskLoggingHelper log, TypeDefinitionCache cache, Li
AddUsesPermissions (app);
AddUsesFeatures (app);
AddSupportsGLTextures (app);
- if (UseSharedRuntime && targetSdkVersionValue >= 30)
- AddQueries (app, targetSdkVersionValue);
+
if (targetSdkVersionValue >= 23) {
if (app.Attribute (androidNs + "extractNativeLibs") == null)
app.SetAttributeValue (androidNs + "extractNativeLibs", "true");
@@ -837,18 +835,6 @@ void AddUsesPermissions (XElement application)
if (!application.Parent.Descendants ("uses-permission").Any (x => (string)x.Attribute (attName) == upa.Name))
application.AddBeforeSelf (upa.ToElement (PackageName));
}
-
- void AddQueries (XElement application, int targetSdkVersion)
- {
- var queries = application.Parent.Element ("queries");
- if (queries == null) {
- application.AddAfterSelf (queries = new XElement ("queries"));
- }
-
- queries.Add (new XElement ("package", new XAttribute (androidNs + "name", "Mono.Android.DebugRuntime")));
- queries.Add (new XElement ("package", new XAttribute (androidNs + "name", $"Mono.Android.Platform.ApiLevel_{targetSdkVersion}")));
- }
-
void AddUsesConfigurations (XElement application, IEnumerable configs)
{
foreach (var uca in configs)
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 30f62b872fb..9a393579dd8 100644
--- a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj
+++ b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj
@@ -378,12 +378,6 @@
MonoRuntimeProvider.Bundled.20.java
-
- MonoRuntimeProvider.Shared.java
-
-
- MonoRuntimeProvider.Shared.20.java
- Java.Interop.xml
diff --git a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets
index 00aabcc716a..eb70fbad9ab 100644
--- a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets
+++ b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets
@@ -94,11 +94,11 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
-
@@ -133,7 +133,7 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
-->
+ Condition=" '$(UsingAndroidNETSdk)' != 'True' And Exists('$(MSBuildThisFileDirectory)Xamarin.Android.Common.Debugging.props')" />
-
+
armeabi-v7a;arm64-v8a
@@ -234,7 +233,7 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
true
-
+
TrueFalse
@@ -287,9 +286,9 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
1G
<_AndroidMainDexListFile>$(IntermediateOutputPath)multidex.keep
-
+
-
+
<_PackagedResources>$(IntermediateOutputPath)android\bin\packaged_resources
<_Android32bitArchitectures>armeabi-v7a;x86;mips
@@ -404,7 +403,7 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
-
+
-
-
-
-
-
+
@@ -870,7 +866,6 @@ because xbuild doesn't support framework reference assemblies.
<_PropertyCacheItems Include="AndroidDexTool=$(AndroidDexTool)" />
<_PropertyCacheItems Include="AndroidLinkTool=$(AndroidLinkTool)" />
<_PropertyCacheItems Include="AndroidPackageFormat=$(AndroidPackageFormat)" />
- <_PropertyCacheItems Include="UseSharedRuntime=$(AndroidUseSharedRuntime)" />
<_PropertyCacheItems Include="EmbedAssembliesIntoApk=$(EmbedAssembliesIntoApk)" />
<_PropertyCacheItems Include="AndroidLinkMode=$(AndroidLinkMode)" />
<_PropertyCacheItems Include="AndroidLinkSkip=$(AndroidLinkSkip)" />
@@ -963,14 +958,14 @@ because xbuild doesn't support framework reference assemblies.
-
+
+ DependsOnTargets="$(CoreResolveReferencesDependsOn);_CreatePropertiesCache;_CheckForDeletedResourceFile;_ComputeAndroidResourcePaths;_UpdateAndroidResgen;_CreateManagedLibraryResourceArchive">
-
@@ -980,7 +975,7 @@ because xbuild doesn't support framework reference assemblies.
-
+
-
+
@@ -1115,18 +1110,18 @@ because xbuild doesn't support framework reference assemblies.
DependsOnTargets="$(_PrepareUpdateAndroidResgenDependsOnTargets)"
Inputs="$(_UpdateAndroidResgenInputs)"
Outputs="$(_AndroidResgenFlagFile)">
-
+
-
+
-
+
@@ -1170,7 +1165,7 @@ because xbuild doesn't support framework reference assemblies.
LibraryTextFiles="@(LibraryResourceDirectories->'%(Identity)\..\R.txt')"
ManifestFiles="@(LibraryResourceDirectories->'%(Identity)\..\AndroidManifest.xml')"
/>
-
+
-
-
-
+
-
+
@@ -1416,7 +1401,6 @@ because xbuild doesn't support framework reference assemblies.
TypemapOutputDirectory="$(_NativeAssemblySourceDir)"
GenerateNativeAssembly="!$(_InstantRunEnabled)"
MergedAndroidManifestOutput="$(_ManifestOutput)"
- UseSharedRuntime="$(AndroidUseSharedRuntime)"
EmbedAssemblies="$(EmbedAssembliesIntoApk)"
BundledWearApplicationName="$(BundledWearApplicationPackageName)"
PackageNamingPolicy="$(AndroidPackageNamingPolicy)"
@@ -1465,7 +1449,7 @@ because xbuild doesn't support framework reference assemblies.
CustomViewMapFile="$(_CustomViewMapFile)"
AcwMapFile="$(_AcwMapFile)"
ResourceDirectories="$(MonoAndroidResDirIntermediate);@(_LibraryResourceHashDirectories)">
-
+
@@ -1546,8 +1530,7 @@ because xbuild doesn't support framework reference assemblies.
MainAssembly="$(TargetPath)"
OutputDirectory="$(_AndroidIntermediateJavaSourceDirectory)mono"
EnvironmentOutputDirectory="$(IntermediateOutputPath)android"
- UseSharedRuntime="$(AndroidUseSharedRuntime)"
- TargetFrameworkVersion="$(TargetFrameworkVersion)"
+ TargetFrameworkVersion="$(TargetFrameworkVersion)"
Manifest="$(IntermediateOutputPath)android\AndroidManifest.xml"
Environments="@(AndroidEnvironment);@(LibraryEnvironments)"
AndroidAotMode="$(AndroidAotMode)"
@@ -1614,7 +1597,6 @@ because xbuild doesn't support framework reference assemblies.
LibraryProjectImportsDirectoryName="$(_LibraryProjectImportsDirectoryName)">
-
-
+
@@ -1844,7 +1826,7 @@ because xbuild doesn't support framework reference assemblies.
-
+
<_Assemblies>@(_ResolvedFrameworkAssemblies)
@@ -1877,8 +1859,8 @@ because xbuild doesn't support framework reference assemblies.
-
-
+
+
-
+
-
+
@@ -2266,7 +2246,7 @@ because xbuild doesn't support framework reference assemblies.
-
+
@@ -2605,8 +2585,8 @@ because xbuild doesn't support framework reference assemblies.
<_AndroidAllowMissingSdkTooling>True
-
-
+
+
<_ProjectAndroidManifest>$(ProjectDir)$(AndroidManifest)
@@ -2642,11 +2622,11 @@ because xbuild doesn't support framework reference assemblies.
-
diff --git a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Legacy.targets b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Legacy.targets
index 5941a6cf6e7..4a99d576395 100644
--- a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Legacy.targets
+++ b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Legacy.targets
@@ -199,7 +199,7 @@ projects. .NET 5 projects will not import this file.
-
+
@@ -237,7 +237,7 @@ projects. .NET 5 projects will not import this file.
AotAssemblies="$(AotAssemblies)"
Aapt2ToolPath="$(Aapt2ToolPath)"
SequencePointsMode="$(_AndroidSequencePointsMode)"
- ProjectFilePath="$(MSBuildProjectFullPath)"
+ ProjectFilePath="$(MSBuildProjectFullPath)"
LintToolPath="$(LintToolPath)"
ZipAlignPath="$(ZipAlignToolPath)">
@@ -432,14 +432,14 @@ projects. .NET 5 projects will not import this file.
<_ResolvedAssemblies Include="@(ResolvedAssemblies->'$(MonoAndroidIntermediateAssemblyDir)%(Filename)%(Extension)')" />
<_ResolvedSymbols Include="@(ResolvedSymbols->'$(MonoAndroidIntermediateAssemblyDir)%(Filename)%(Extension)')" />
<_ResolvedUserAssemblies Include="@(ResolvedUserAssemblies->'$(MonoAndroidIntermediateAssemblyDir)%(Filename)%(Extension)')" />
- <_ResolvedFrameworkAssemblies Include="@(ResolvedFrameworkAssemblies)" />
+ <_ResolvedFrameworkAssemblies Include="@(ResolvedFrameworkAssemblies->'$(MonoAndroidIntermediateAssemblyDir)%(Filename)%(Extension)')" />
-
+
<_ShrunkAssemblies Include="@(_ResolvedAssemblies)" />
<_ShrunkUserAssemblies Include="@(_ResolvedUserAssemblies)" />
<_ShrunkFrameworkAssemblies Include="@(_ResolvedFrameworkAssemblies)" />
-
+
<_ShrunkAssemblies Include="@(_ResolvedAssemblies->'$(MonoAndroidIntermediateAssemblyDir)shrunk\%(Filename)%(Extension)')" />
<_ShrunkUserAssemblies Include="@(_ResolvedUserAssemblies->'$(MonoAndroidIntermediateAssemblyDir)shrunk\%(Filename)%(Extension)')" />
<_ShrunkFrameworkAssemblies Include="@(_ResolvedFrameworkAssemblies->'$(MonoAndroidIntermediateAssemblyDir)shrunk\%(Filename)%(Extension)')" />
@@ -485,7 +485,6 @@ projects. .NET 5 projects will not import this file.
GetObjectArrayElement (externalStorageDirs, 0);
- androidSystem.set_override_dir (1, utils.strdup_new (jstr.get_cstr ()));
-
- jstr = env->GetObjectArrayElement (externalStorageDirs, 1);
- androidSystem.set_override_dir (2, utils.strdup_new (jstr.get_cstr ()));
-
- for (uint32_t i = 0; i < BasicAndroidSystem::MAX_OVERRIDES; ++i) {
- const char *p = androidSystem.get_override_dir (i);
- if (p == nullptr || !utils.directory_exists (p))
- continue;
- log_warn (LOG_DEFAULT, "Using override path: %s", p);
- }
if (runtimeNativeLibDir != nullptr) {
jstr = runtimeNativeLibDir;
diff --git a/src/monodroid/jni/debug-app-helper.hh b/src/monodroid/jni/debug-app-helper.hh
index e3cf56ed4ea..817c7636afd 100644
--- a/src/monodroid/jni/debug-app-helper.hh
+++ b/src/monodroid/jni/debug-app-helper.hh
@@ -12,6 +12,6 @@ extern "C" {
* Signature: ([Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String);[Ljava/lang/String);Ljava/lang/String;IZ)V
*/
JNIEXPORT void JNICALL Java_mono_android_DebugRuntime_init
- (JNIEnv *, jclass, jobjectArray, jstring, jobjectArray, jobjectArray);
+ (JNIEnv *, jclass, jobjectArray, jstring, jobjectArray);
}
#endif // _Included_mono_android_DebugRuntime
diff --git a/src/monodroid/jni/mono_android_Runtime.h b/src/monodroid/jni/mono_android_Runtime.h
index 7e34104a3a4..40f51c63825 100644
--- a/src/monodroid/jni/mono_android_Runtime.h
+++ b/src/monodroid/jni/mono_android_Runtime.h
@@ -18,10 +18,10 @@ JNIEXPORT void JNICALL Java_mono_android_Runtime_init
/*
* Class: mono_android_Runtime
* Method: initInternal
- * Signature: (Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/ClassLoader;[Ljava/lang/String;[Ljava/lang/String;IZ)V
+ * Signature: (Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/ClassLoader;[Ljava/lang/String;IZ)V
*/
JNIEXPORT void JNICALL Java_mono_android_Runtime_initInternal
-(JNIEnv *, jclass, jstring, jobjectArray, jstring, jobjectArray, jobject, jobjectArray, jobjectArray, jint, jboolean);
+(JNIEnv *, jclass, jstring, jobjectArray, jstring, jobjectArray, jobject, jobjectArray, jint, jboolean);
/*
* Class: mono_android_Runtime
diff --git a/src/monodroid/jni/monodroid-glue-internal.hh b/src/monodroid/jni/monodroid-glue-internal.hh
index c81a5e08c4e..1dc9dfee2b7 100644
--- a/src/monodroid/jni/monodroid-glue-internal.hh
+++ b/src/monodroid/jni/monodroid-glue-internal.hh
@@ -76,8 +76,7 @@ namespace xamarin::android::internal
void Java_mono_android_Runtime_register (JNIEnv *env, jstring managedType, jclass nativeClass, jstring methods);
void Java_mono_android_Runtime_initInternal (JNIEnv *env, jclass klass, jstring lang, jobjectArray runtimeApksJava,
jstring runtimeNativeLibDir, jobjectArray appDirs, jobject loader,
- jobjectArray externalStorageDirs, jobjectArray assembliesJava,
- jint apiLevel, jboolean isEmulator);
+ jobjectArray assembliesJava, jint apiLevel, jboolean isEmulator);
jint Java_mono_android_Runtime_createNewContextWithData (JNIEnv *env, jclass klass, jobjectArray runtimeApksJava, jobjectArray assembliesJava,
jobjectArray assembliesBytes, jobjectArray assembliesPaths, jobject loader, jboolean force_preload_assemblies);
void Java_mono_android_Runtime_switchToContext (JNIEnv *env, jint contextID);
diff --git a/src/monodroid/jni/monodroid-glue.cc b/src/monodroid/jni/monodroid-glue.cc
index 94e516c1e64..b81467d63d6 100644
--- a/src/monodroid/jni/monodroid-glue.cc
+++ b/src/monodroid/jni/monodroid-glue.cc
@@ -1615,8 +1615,7 @@ MonodroidRuntime::get_my_location (bool remove_file_name)
inline void
MonodroidRuntime::Java_mono_android_Runtime_initInternal (JNIEnv *env, jclass klass, jstring lang, jobjectArray runtimeApksJava,
jstring runtimeNativeLibDir, jobjectArray appDirs, jobject loader,
- [[maybe_unused]] jobjectArray externalStorageDirs, jobjectArray assembliesJava,
- jint apiLevel, jboolean isEmulator)
+ jobjectArray assembliesJava, jint apiLevel, jboolean isEmulator)
{
init_logging_categories ();
@@ -1660,20 +1659,6 @@ MonodroidRuntime::Java_mono_android_Runtime_initInternal (JNIEnv *env, jclass kl
set_debug_env_vars ();
#endif
-#ifndef RELEASE
- jstr = env->GetObjectArrayElement (externalStorageDirs, 0);
- androidSystem.set_override_dir (1, utils.strdup_new (jstr.get_cstr ()));
-
- jstr = env->GetObjectArrayElement (externalStorageDirs, 1);
- androidSystem.set_override_dir (2, utils.strdup_new (jstr.get_cstr ()));
-
- for (uint32_t i = 0; i < AndroidSystem::MAX_OVERRIDES; ++i) {
- const char *p = androidSystem.get_override_dir (i);
- if (!utils.directory_exists (p))
- continue;
- log_warn (LOG_DEFAULT, "Using override path: %s", p);
- }
-#endif
setup_bundled_app ("libmonodroid_bundle_app.so");
if (runtimeNativeLibDir != nullptr) {
@@ -1846,7 +1831,6 @@ Java_mono_android_Runtime_init (JNIEnv *env, jclass klass, jstring lang, jobject
runtimeNativeLibDir,
appDirs,
loader,
- externalStorageDirs,
assembliesJava,
apiLevel,
/* isEmulator */ JNI_FALSE
@@ -1856,8 +1840,7 @@ Java_mono_android_Runtime_init (JNIEnv *env, jclass klass, jstring lang, jobject
JNIEXPORT void JNICALL
Java_mono_android_Runtime_initInternal (JNIEnv *env, jclass klass, jstring lang, jobjectArray runtimeApksJava,
jstring runtimeNativeLibDir, jobjectArray appDirs, jobject loader,
- jobjectArray externalStorageDirs, jobjectArray assembliesJava,
- jint apiLevel, jboolean isEmulator)
+ jobjectArray assembliesJava, jint apiLevel, jboolean isEmulator)
{
monodroidRuntime.Java_mono_android_Runtime_initInternal (
env,
@@ -1867,7 +1850,6 @@ Java_mono_android_Runtime_initInternal (JNIEnv *env, jclass klass, jstring lang,
runtimeNativeLibDir,
appDirs,
loader,
- externalStorageDirs,
assembliesJava,
apiLevel,
isEmulator
diff --git a/tests/BCL-Tests/LocalTests.NUnit/LocalTests.NUnit.csproj b/tests/BCL-Tests/LocalTests.NUnit/LocalTests.NUnit.csproj
index 4e6cc859724..ab58b85bc0a 100644
--- a/tests/BCL-Tests/LocalTests.NUnit/LocalTests.NUnit.csproj
+++ b/tests/BCL-Tests/LocalTests.NUnit/LocalTests.NUnit.csproj
@@ -33,7 +33,6 @@
prompt4true
- false
diff --git a/tests/BCL-Tests/Xamarin.Android.Bcl-Tests/Xamarin.Android.Bcl-Tests.csproj b/tests/BCL-Tests/Xamarin.Android.Bcl-Tests/Xamarin.Android.Bcl-Tests.csproj
index 1547c76b11e..28051cc9f86 100644
--- a/tests/BCL-Tests/Xamarin.Android.Bcl-Tests/Xamarin.Android.Bcl-Tests.csproj
+++ b/tests/BCL-Tests/Xamarin.Android.Bcl-Tests/Xamarin.Android.Bcl-Tests.csproj
@@ -15,7 +15,6 @@
Properties\AndroidManifest.xmlResourcesAssets
- falsearmeabi-v7a;x86
diff --git a/tests/CodeGen-Binding/Xamarin.Android.FixJavaAbstractMethod-APIv1Binding/Xamarin.Android.FixJavaAbstractMethod-APIv1Binding.csproj b/tests/CodeGen-Binding/Xamarin.Android.FixJavaAbstractMethod-APIv1Binding/Xamarin.Android.FixJavaAbstractMethod-APIv1Binding.csproj
index a16670dd2af..e291c417f88 100644
--- a/tests/CodeGen-Binding/Xamarin.Android.FixJavaAbstractMethod-APIv1Binding/Xamarin.Android.FixJavaAbstractMethod-APIv1Binding.csproj
+++ b/tests/CodeGen-Binding/Xamarin.Android.FixJavaAbstractMethod-APIv1Binding/Xamarin.Android.FixJavaAbstractMethod-APIv1Binding.csproj
@@ -34,7 +34,6 @@
bin\Releaseprompt4
- falsefalse
diff --git a/tests/CodeGen-Binding/Xamarin.Android.FixJavaAbstractMethod-APIv2Binding/Xamarin.Android.FixJavaAbstractMethod-APIv2Binding.csproj b/tests/CodeGen-Binding/Xamarin.Android.FixJavaAbstractMethod-APIv2Binding/Xamarin.Android.FixJavaAbstractMethod-APIv2Binding.csproj
index c3cd6109339..3a7076cb794 100644
--- a/tests/CodeGen-Binding/Xamarin.Android.FixJavaAbstractMethod-APIv2Binding/Xamarin.Android.FixJavaAbstractMethod-APIv2Binding.csproj
+++ b/tests/CodeGen-Binding/Xamarin.Android.FixJavaAbstractMethod-APIv2Binding/Xamarin.Android.FixJavaAbstractMethod-APIv2Binding.csproj
@@ -34,7 +34,6 @@
..\..\..\bin\TestReleaseprompt4
- falsefalse
diff --git a/tests/CodeGen-Binding/Xamarin.Android.FixJavaAbstractMethod-Library/Xamarin.Android.FixJavaAbstractMethod-Library.csproj b/tests/CodeGen-Binding/Xamarin.Android.FixJavaAbstractMethod-Library/Xamarin.Android.FixJavaAbstractMethod-Library.csproj
index 1541946c187..7ac55170257 100644
--- a/tests/CodeGen-Binding/Xamarin.Android.FixJavaAbstractMethod-Library/Xamarin.Android.FixJavaAbstractMethod-Library.csproj
+++ b/tests/CodeGen-Binding/Xamarin.Android.FixJavaAbstractMethod-Library/Xamarin.Android.FixJavaAbstractMethod-Library.csproj
@@ -33,7 +33,6 @@
truebin\Release4
- falsefalse
diff --git a/tests/CodeGen-Binding/Xamarin.Android.JcwGen-Tests/Xamarin.Android.JcwGen-Tests.csproj b/tests/CodeGen-Binding/Xamarin.Android.JcwGen-Tests/Xamarin.Android.JcwGen-Tests.csproj
index 5d0e2cf993b..a9048655826 100644
--- a/tests/CodeGen-Binding/Xamarin.Android.JcwGen-Tests/Xamarin.Android.JcwGen-Tests.csproj
+++ b/tests/CodeGen-Binding/Xamarin.Android.JcwGen-Tests/Xamarin.Android.JcwGen-Tests.csproj
@@ -17,7 +17,6 @@
Xamarin.Android.JcwGen-TestsProperties\AndroidManifest.xmlarmeabi-v7a;x86
- falsepreview
@@ -40,7 +39,6 @@
..\..\..\bin\TestReleaseprompt4
- falsefalsetrue
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 f27cb0af573..f9d9c1e1cdb 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
@@ -34,7 +34,6 @@
..\..\..\bin\TestReleaseprompt4
- falsefalse
diff --git a/tests/CodeGen-Binding/Xamarin.Android.McwGen-Tests/Xamarin.Android.McwGen-Tests.csproj b/tests/CodeGen-Binding/Xamarin.Android.McwGen-Tests/Xamarin.Android.McwGen-Tests.csproj
index 4826e56b91a..0e59e81a532 100644
--- a/tests/CodeGen-Binding/Xamarin.Android.McwGen-Tests/Xamarin.Android.McwGen-Tests.csproj
+++ b/tests/CodeGen-Binding/Xamarin.Android.McwGen-Tests/Xamarin.Android.McwGen-Tests.csproj
@@ -39,7 +39,6 @@
..\..\..\bin\TestReleaseprompt4
- falsefalse
diff --git a/tests/CodeGen-MkBundle/Xamarin.Android.MakeBundle-Tests/Xamarin.Android.MakeBundle-Tests.csproj b/tests/CodeGen-MkBundle/Xamarin.Android.MakeBundle-Tests/Xamarin.Android.MakeBundle-Tests.csproj
index f3e8d2295db..e2fe9fbf182 100644
--- a/tests/CodeGen-MkBundle/Xamarin.Android.MakeBundle-Tests/Xamarin.Android.MakeBundle-Tests.csproj
+++ b/tests/CodeGen-MkBundle/Xamarin.Android.MakeBundle-Tests/Xamarin.Android.MakeBundle-Tests.csproj
@@ -42,8 +42,8 @@
4Nonefalse
- falsetrue
+ truetrue
@@ -53,8 +53,8 @@
prompt4false
- falsetrue
+ true
diff --git a/tests/EmbeddedDSOs/EmbeddedDSO/EmbeddedDSO.csproj b/tests/EmbeddedDSOs/EmbeddedDSO/EmbeddedDSO.csproj
index c871523a164..47a40b0d021 100644
--- a/tests/EmbeddedDSOs/EmbeddedDSO/EmbeddedDSO.csproj
+++ b/tests/EmbeddedDSOs/EmbeddedDSO/EmbeddedDSO.csproj
@@ -14,7 +14,6 @@
Properties\AndroidManifest.xmlResourcesAssets
- falsefalse
@@ -56,7 +55,6 @@
prompt4true
- false
diff --git a/tests/MSBuildDeviceIntegration/Tests/AotProfileTests.cs b/tests/MSBuildDeviceIntegration/Tests/AotProfileTests.cs
index 0b980f28f22..42dcfc2ce5c 100644
--- a/tests/MSBuildDeviceIntegration/Tests/AotProfileTests.cs
+++ b/tests/MSBuildDeviceIntegration/Tests/AotProfileTests.cs
@@ -30,6 +30,7 @@ public void BuildBasicApplicationAndAotProfileIt ()
var projDirectory = Path.Combine ("temp", TestName);
using (var b = CreateApkBuilder (projDirectory)) {
Assert.IsTrue (b.RunTarget (proj, "BuildAndStartAotProfiling"), "Run of BuildAndStartAotProfiling should have succeeded.");
+ WaitForAppBuiltForOlderAndroidWarning (proj.PackageName, Path.Combine (Root, b.ProjectDirectory, "oldsdk-logcat.log"));
System.Threading.Thread.Sleep (5000);
b.BuildLogFile = "build2.log";
Assert.IsTrue (b.RunTarget (proj, "FinishAotProfiling", doNotCleanupOnUpdate: true), "Run of FinishAotProfiling should have succeeded.");
diff --git a/tests/MSBuildDeviceIntegration/Tests/DebuggingTest.cs b/tests/MSBuildDeviceIntegration/Tests/DebuggingTest.cs
index 1f673d1db60..db01db52528 100755
--- a/tests/MSBuildDeviceIntegration/Tests/DebuggingTest.cs
+++ b/tests/MSBuildDeviceIntegration/Tests/DebuggingTest.cs
@@ -50,6 +50,7 @@ public void ApplicationRunsWithoutDebugger ([Values (false, true)] bool isReleas
var manifest = Path.Combine (Root, b.ProjectDirectory, proj.IntermediateOutputPath, "android", "AndroidManifest.xml");
AssertExtractNativeLibs (manifest, extractNativeLibs);
ClearAdbLogcat ();
+ b.BuildLogFile = "run.log";
if (CommercialBuildAvailable)
Assert.True (b.RunTarget (proj, "_Run"), "Project should have run.");
else
@@ -57,6 +58,7 @@ public void ApplicationRunsWithoutDebugger ([Values (false, true)] bool isReleas
Assert.True (WaitForActivityToStart (proj.PackageName, "MainActivity",
Path.Combine (Root, b.ProjectDirectory, "logcat.log"), 30), "Activity should have started.");
+ b.BuildLogFile = "uninstall.log";
Assert.True (b.Uninstall (proj), "Project should have uninstalled.");
}
}
@@ -102,6 +104,7 @@ public void ClassLibraryMainLauncherRuns ()
Assert.IsTrue (libBuilder.Build (lib), "library build should have succeeded.");
Assert.True (appBuilder.Install (app), "app should have installed.");
ClearAdbLogcat ();
+ appBuilder.BuildLogFile = "run.log";
if (CommercialBuildAvailable)
Assert.True (appBuilder.RunTarget (app, "_Run"), "Project should have run.");
else
@@ -115,37 +118,21 @@ public void ClassLibraryMainLauncherRuns ()
#pragma warning disable 414
static object [] DebuggerCustomAppTestCases = new object [] {
new object[] {
- /* useSharedRuntime */ false,
/* embedAssemblies */ true,
/* fastDevType */ "Assemblies",
/* activityStarts */ true,
},
new object[] {
- /* useSharedRuntime */ false,
/* embedAssemblies */ false,
/* fastDevType */ "Assemblies",
/* activityStarts */ true,
},
new object[] {
- /* useSharedRuntime */ true,
- /* embedAssemblies */ true,
- /* fastDevType */ "Assemblies",
- /* activityStarts */ true,
- },
- new object[] {
- /* useSharedRuntime */ true,
- /* embedAssemblies */ false,
- /* fastDevType */ "Assemblies",
- /* activityStarts */ true,
- },
- new object[] {
- /* useSharedRuntime */ true,
/* embedAssemblies */ true,
/* fastDevType */ "Assemblies:Dexes",
/* activityStarts */ true,
},
new object[] {
- /* useSharedRuntime */ true,
/* embedAssemblies */ false,
/* fastDevType */ "Assemblies:Dexes",
/* activityStarts */ false,
@@ -155,7 +142,7 @@ public void ClassLibraryMainLauncherRuns ()
[Test]
[TestCaseSource (nameof (DebuggerCustomAppTestCases))]
- public void CustomApplicationRunsWithDebuggerAndBreaks (bool useSharedRuntime, bool embedAssemblies, string fastDevType, bool activityStarts)
+ public void CustomApplicationRunsWithDebuggerAndBreaks (bool embedAssemblies, string fastDevType, bool activityStarts)
{
AssertCommercialBuild ();
AssertHasDevices ();
@@ -164,7 +151,6 @@ public void CustomApplicationRunsWithDebuggerAndBreaks (bool useSharedRuntime, b
AndroidFastDeploymentType = fastDevType,
};
proj.SetAndroidSupportedAbis ("armeabi-v7a", "x86");
- proj.SetProperty (KnownProperties.AndroidUseSharedRuntime, useSharedRuntime.ToString ());
proj.SetProperty ("EmbedAssembliesIntoApk", embedAssemblies.ToString ());
proj.SetDefaultTargetDevice ();
proj.Sources.Add (new BuildItem.Source ("MyApplication.cs") {
@@ -222,7 +208,8 @@ public override void OnCreate ()
};
options.EvaluationOptions.UseExternalTypeResolver = true;
ClearAdbLogcat ();
- Assert.True (b.RunTarget (proj, "_Run", parameters: new string [] {
+ b.BuildLogFile = "run.log";
+ Assert.True (b.RunTarget (proj, "_Run", doNotCleanupOnUpdate: true, parameters: new string [] {
$"AndroidSdbTargetPort={port}",
$"AndroidSdbHostPort={port}",
"AndroidAttachDebugger=True",
@@ -252,6 +239,7 @@ public override void OnCreate ()
WaitFor (2000);
int expected = 2;
Assert.AreEqual (expected, breakcountHitCount, $"Should have hit {expected} breakpoints. Only hit {breakcountHitCount}");
+ b.BuildLogFile = "uninstall.log";
Assert.True (b.Uninstall (proj), "Project should have uninstalled.");
session.Exit ();
}
@@ -260,45 +248,28 @@ public override void OnCreate ()
#pragma warning disable 414
static object [] DebuggerTestCases = new object [] {
new object[] {
- /* useSharedRuntime */ false,
/* embedAssemblies */ true,
/* fastDevType */ "Assemblies",
/* allowDeltaInstall */ false,
},
new object[] {
- /* useSharedRuntime */ false,
/* embedAssemblies */ false,
/* fastDevType */ "Assemblies",
/* allowDeltaInstall */ false,
},
new object[] {
- /* useSharedRuntime */ true,
- /* embedAssemblies */ true,
- /* fastDevType */ "Assemblies",
- /* allowDeltaInstall */ false,
- },
- new object[] {
- /* useSharedRuntime */ true,
/* embedAssemblies */ false,
/* fastDevType */ "Assemblies",
- /* allowDeltaInstall */ false,
- },
- new object[] {
- /* useSharedRuntime */ true,
- /* embedAssemblies */ true,
- /* fastDevType */ "Assemblies:Dexes",
- /* allowDeltaInstall */ false,
+ /* allowDeltaInstall */ true,
},
new object[] {
- /* useSharedRuntime */ true,
/* embedAssemblies */ false,
/* fastDevType */ "Assemblies:Dexes",
/* allowDeltaInstall */ false,
},
new object[] {
- /* useSharedRuntime */ true,
/* embedAssemblies */ false,
- /* fastDevType */ "Assemblies",
+ /* fastDevType */ "Assemblies:Dexes",
/* allowDeltaInstall */ true,
},
};
@@ -306,13 +277,12 @@ public override void OnCreate ()
[Test, Category ("SmokeTests")]
[TestCaseSource (nameof(DebuggerTestCases))]
- public void ApplicationRunsWithDebuggerAndBreaks (bool useSharedRuntime, bool embedAssemblies, string fastDevType, bool allowDeltaInstall)
+ public void ApplicationRunsWithDebuggerAndBreaks (bool embedAssemblies, string fastDevType, bool allowDeltaInstall)
{
AssertCommercialBuild ();
AssertHasDevices ();
var proj = new XamarinFormsAndroidApplicationProject () {
IsRelease = false,
- AndroidUseSharedRuntime = useSharedRuntime,
EmbedAssembliesIntoApk = embedAssemblies,
AndroidFastDeploymentType = fastDevType
};
@@ -354,7 +324,8 @@ public void ApplicationRunsWithDebuggerAndBreaks (bool useSharedRuntime, bool em
};
options.EvaluationOptions.UseExternalTypeResolver = true;
ClearAdbLogcat ();
- Assert.True (b.RunTarget (proj, "_Run", parameters: new string [] {
+ b.BuildLogFile = "run.log";
+ Assert.True (b.RunTarget (proj, "_Run", doNotCleanupOnUpdate: true, parameters: new string [] {
$"AndroidSdbTargetPort={port}",
$"AndroidSdbHostPort={port}",
"AndroidAttachDebugger=True",
@@ -388,6 +359,7 @@ public void ApplicationRunsWithDebuggerAndBreaks (bool useSharedRuntime, bool em
}
expected = 1;
Assert.AreEqual (expected, breakcountHitCount, $"Should have hit {expected} breakpoints. Only hit {breakcountHitCount}");
+ b.BuildLogFile = "uninstall.log";
Assert.True (b.Uninstall (proj), "Project should have uninstalled.");
session.Exit ();
}
diff --git a/tests/MSBuildDeviceIntegration/Tests/DeploymentTest.cs b/tests/MSBuildDeviceIntegration/Tests/DeploymentTest.cs
index 1af1cf3f261..e9aaae9f22c 100644
--- a/tests/MSBuildDeviceIntegration/Tests/DeploymentTest.cs
+++ b/tests/MSBuildDeviceIntegration/Tests/DeploymentTest.cs
@@ -228,10 +228,10 @@ public void CheckTimeZoneInfoIsCorrect (string timeZone)
ClearAdbLogcat ();
AdbStartActivity ($"{proj.PackageName}/{proj.JavaPackageName}.MainActivity");
Assert.IsTrue (WaitForActivityToStart (proj.PackageName, "MainActivity",
- Path.Combine (Root, builder.ProjectDirectory, "startup-logcat.log")), "Activity should have started");
+ Path.Combine (Root, builder.ProjectDirectory, $"startup-logcat-{timeZone.Replace ("/", "-")}.log")), "Activity should have started");
Assert.IsTrue (MonitorAdbLogcat ((l) => {
return l.Contains ($"TimeZoneInfo={timeZone}");
- }, Path.Combine (Root, builder.ProjectDirectory, "timezone-logcat.log")), $"TimeZone should have been {timeZone}");
+ }, Path.Combine (Root, builder.ProjectDirectory, $"timezone-logcat-{timeZone.Replace ("/", "-")}.log")), $"TimeZone should have been {timeZone}");
} finally {
if (!string.IsNullOrEmpty (currentTimeZone))
RunAdbCommand ($"shell su root setprop persist.sys.timezone \"{currentTimeZone}\"");
diff --git a/tests/MSBuildDeviceIntegration/Tests/InstallTests.cs b/tests/MSBuildDeviceIntegration/Tests/InstallTests.cs
index f800f57c529..268d4279236 100644
--- a/tests/MSBuildDeviceIntegration/Tests/InstallTests.cs
+++ b/tests/MSBuildDeviceIntegration/Tests/InstallTests.cs
@@ -27,14 +27,12 @@ static byte [] GetKeystore ()
string GetContentFromAllOverrideDirectories (string packageName, bool useRunAsCommand = true)
{
- var adbShellArgs = $"shell ls";
- if (useRunAsCommand)
- adbShellArgs = $"shell run-as {packageName} ls";
+ var adbShellArgs = $"shell run-as {packageName} ls";
var directorylist = string.Empty;
foreach (var dir in GetOverrideDirectoryPaths (packageName)) {
var listing = RunAdbCommand ($"{adbShellArgs} {dir}");
- if (!listing.Contains ("No such file or directory"))
+ if (!listing.Contains ("No such file or directory") && !listing.Contains ("Permission denied"))
directorylist += $"{listing} ";
}
return directorylist;
@@ -65,6 +63,7 @@ public void ReInstallIfUserUninstalled ([Values (false, true)] bool isRelease)
Assert.IsTrue (builder.Output.AreTargetsAllBuilt ("_Upload"), "_Upload should have built completely.");
Assert.AreEqual ($"package:{proj.PackageName}", RunAdbCommand ($"shell pm list packages {proj.PackageName}").Trim (),
$"{proj.PackageName} is not installed on the device.");
+ Assert.IsTrue (builder.Uninstall (proj), "unnstall should have succeeded.");
}
}
@@ -108,7 +107,9 @@ public void ChangeKeystoreRedeploy ()
AssertCommercialBuild ();
AssertHasDevices ();
- var proj = new XamarinAndroidApplicationProject ();
+ var proj = new XamarinAndroidApplicationProject () {
+ PackageName = "com.xamarin.keytest"
+ };
proj.SetAndroidSupportedAbis ("armeabi-v7a", "x86");
using (var builder = CreateApkBuilder ()) {
// Use the default debug.keystore XA generates
@@ -126,6 +127,7 @@ public void ChangeKeystoreRedeploy ()
proj.SetProperty ("AndroidSigningKeyAlias", "mykey");
Assert.IsTrue (builder.Install (proj), "second install should succeed.");
+ Assert.IsTrue (builder.Uninstall (proj), "unnstall should have succeeded.");
}
}
@@ -167,7 +169,7 @@ public void SwitchConfigurationsShouldRedeploy ()
directorylist = GetContentFromAllOverrideDirectories (proj.PackageName);
StringAssert.Contains ($"{proj.AssemblyName}", directorylist, $"{proj.AssemblyName} not found in fastdev directory.");
-
+
Assert.IsTrue (builder.Uninstall (proj));
Assert.AreNotEqual ($"package:{proj.PackageName}", RunAdbCommand ($"shell pm list packages {proj.PackageName}").Trim (),
$"{proj.PackageName} is installed on the device.");
@@ -185,7 +187,6 @@ public void InstallWithoutSharedRuntime ()
};
proj.SetProperty (proj.ReleaseProperties, "Optimize", false);
proj.SetProperty (proj.ReleaseProperties, "DebugType", "none");
- proj.SetProperty (proj.ReleaseProperties, "AndroidUseSharedRuntime", false);
proj.RemoveProperty (proj.ReleaseProperties, "EmbedAssembliesIntoApk");
var abis = new [] { "armeabi-v7a", "x86" };
proj.SetAndroidSupportedAbis (abis);
@@ -209,11 +210,11 @@ public void InstallWithoutSharedRuntime ()
//FIXME: https://github.com/xamarin/androidtools/issues/141
//Assert.AreEqual (0, RunAdbCommand ("shell pm list packages Mono.Android.DebugRuntime").Trim ().Length,
// "The Shared Runtime should not have been installed.");
- var directorylist = GetContentFromAllOverrideDirectories (proj.PackageName, false);
+ var directorylist = GetContentFromAllOverrideDirectories (proj.PackageName);
StringAssert.Contains ($"{proj.ProjectName}.dll", directorylist, $"{proj.ProjectName}.dll should exist in the .__override__ directory.");
StringAssert.Contains ($"System.dll", directorylist, $"System.dll should exist in the .__override__ directory.");
StringAssert.Contains ($"Mono.Android.dll", directorylist, $"Mono.Android.dll should exist in the .__override__ directory.");
-
+ Assert.IsTrue (builder.Uninstall (proj), "unnstall should have succeeded.");
}
}
@@ -226,7 +227,6 @@ public void InstallErrorCode ()
//Setup a situation where we get INSTALL_FAILED_NO_MATCHING_ABIS
var abi = "armeabi-v7a";
var proj = new XamarinAndroidApplicationProject {
- AndroidUseSharedRuntime = false,
EmbedAssembliesIntoApk = true,
};
proj.SetAndroidSupportedAbis (abi);
@@ -248,7 +248,6 @@ public void ToggleFastDev ()
AssertHasDevices ();
var proj = new XamarinAndroidApplicationProject {
- AndroidUseSharedRuntime = true,
EmbedAssembliesIntoApk = false,
OtherBuildItems = {
new BuildItem.NoActionResource ("UnnamedProject.dll.config") {
@@ -270,7 +269,6 @@ public void ToggleFastDev ()
}
//Now toggle FastDev to OFF
- proj.AndroidUseSharedRuntime = false;
proj.EmbedAssembliesIntoApk = true;
proj.SetAndroidSupportedAbis ("armeabi-v7a", "x86");
@@ -281,6 +279,7 @@ public void ToggleFastDev ()
//Deploy one last time to verify install still works without the .__override__ directory existing
Assert.IsTrue (builder.Install (proj), "Third install should have succeeded.");
+ Assert.IsTrue (builder.Uninstall (proj), "unnstall should have succeeded.");
}
}
@@ -318,7 +317,6 @@ public void BlankAdbTarget ()
var serial = GetAttachedDeviceSerial ();
var proj = new XamarinAndroidApplicationProject ();
- proj.SetProperty (proj.DebugProperties, "AndroidUseSharedRuntime", true);
proj.SetProperty (proj.DebugProperties, "EmbedAssembliesIntoApk", false);
using (var b = CreateApkBuilder (Path.Combine ("temp", TestName))) {
@@ -365,6 +363,10 @@ public void BlankAdbTarget ()
public void TestAndroidStoreKey (bool useApkSigner, bool isRelease, string packageFormat, string androidKeyStore, string password, string expected, bool shouldInstall)
{
AssertHasDevices ();
+ if (DeviceSdkVersion >= 30 && !useApkSigner && packageFormat == "apk") {
+ Assert.Ignore ($"Test Skipped. jarsigner and {packageFormat} does not work with API 30 and above");
+ return;
+ }
string path = Path.Combine ("temp", TestName.Replace (expected, expected.Replace ("-", "_")));
string storepassfile = Path.Combine (Root, path, "storepass.txt");
@@ -430,7 +432,6 @@ public void LocalizedAssemblies_ShouldBeFastDeployed ()
AssertHasDevices ();
var proj = new XamarinAndroidApplicationProject {
- AndroidUseSharedRuntime = true,
EmbedAssembliesIntoApk = false,
OtherBuildItems = {
new BuildItem ("EmbeddedResource", "Foo.resx") {
@@ -450,8 +451,9 @@ public void LocalizedAssemblies_ShouldBeFastDeployed ()
var overrideContents = string.Empty;
foreach (var dir in GetOverrideDirectoryPaths (proj.PackageName)) {
- overrideContents += RunAdbCommand ($"shell find {dir}");
+ overrideContents += RunAdbCommand ($"shell run-as {proj.PackageName} find {dir}");
}
+ builder.BuildLogFile = "uninstall.log";
builder.Uninstall (proj);
Assert.IsTrue (resourceFilesFromDisk.Any (), $"Unable to find any localized assemblies in {resourceFilesFromDisk}");
foreach (var res in resourceFilesFromDisk) {
@@ -488,7 +490,6 @@ public void IncrementalFastDeployment ()
};
var app = new XamarinFormsAndroidApplicationProject () {
- AndroidUseSharedRuntime = true,
EmbedAssembliesIntoApk = false,
References = {
new BuildItem ("ProjectReference", "..\\Library1\\Library1.csproj"),
diff --git a/tests/MSBuildDeviceIntegration/Tests/MonoAndroidExportTest.cs b/tests/MSBuildDeviceIntegration/Tests/MonoAndroidExportTest.cs
index 85789820e65..43c885bb0ee 100644
--- a/tests/MSBuildDeviceIntegration/Tests/MonoAndroidExportTest.cs
+++ b/tests/MSBuildDeviceIntegration/Tests/MonoAndroidExportTest.cs
@@ -17,37 +17,21 @@ public class MonoAndroidExportTest : DeviceTest {
#pragma warning disable 414
static object [] MonoAndroidExportTestCases = new object [] {
new object[] {
- /* useSharedRuntime */ false,
/* embedAssemblies */ true,
/* fastDevType */ "Assemblies",
/* activityStarts */ true,
},
new object[] {
- /* useSharedRuntime */ false,
/* embedAssemblies */ false,
/* fastDevType */ "Assemblies",
/* activityStarts */ true,
},
new object[] {
- /* useSharedRuntime */ true,
- /* embedAssemblies */ true,
- /* fastDevType */ "Assemblies",
- /* activityStarts */ true,
- },
- new object[] {
- /* useSharedRuntime */ true,
- /* embedAssemblies */ false,
- /* fastDevType */ "Assemblies",
- /* activityStarts */ true,
- },
- new object[] {
- /* useSharedRuntime */ true,
/* embedAssemblies */ true,
/* fastDevType */ "Assemblies:Dexes",
/* activityStarts */ true,
},
new object[] {
- /* useSharedRuntime */ true,
/* embedAssemblies */ false,
/* fastDevType */ "Assemblies:Dexes",
/* activityStarts */ true,
@@ -57,7 +41,7 @@ public class MonoAndroidExportTest : DeviceTest {
[Test]
[TestCaseSource (nameof (MonoAndroidExportTestCases))]
- public void MonoAndroidExportReferencedAppStarts (bool useSharedRuntime, bool embedAssemblies, string fastDevType, bool activityStarts)
+ public void MonoAndroidExportReferencedAppStarts (bool embedAssemblies, string fastDevType, bool activityStarts)
{
AssertCommercialBuild ();
AssertHasDevices ();
@@ -115,7 +99,6 @@ protected override void OnCreate (Bundle bundle)
}
}";
proj.SetAndroidSupportedAbis ("armeabi-v7a", "x86");
- proj.SetProperty (KnownProperties.AndroidUseSharedRuntime, useSharedRuntime.ToString ());
proj.SetProperty ("EmbedAssembliesIntoApk", embedAssemblies.ToString ());
proj.SetDefaultTargetDevice ();
using (var b = CreateApkBuilder (Path.Combine ("temp", TestName))) {
diff --git a/tests/MSBuildDeviceIntegration/Tests/PerformanceTest.cs b/tests/MSBuildDeviceIntegration/Tests/PerformanceTest.cs
index 0b1d5adcf9e..ec371a1886e 100644
--- a/tests/MSBuildDeviceIntegration/Tests/PerformanceTest.cs
+++ b/tests/MSBuildDeviceIntegration/Tests/PerformanceTest.cs
@@ -377,7 +377,9 @@ public void Install_CSharp_Change ()
AssertCommercialBuild (); // This test will fail without Fast Deployment
AssertHasDevices ();
- var proj = new XamarinAndroidApplicationProject ();
+ var proj = new XamarinAndroidApplicationProject () {
+ PackageName = "com.xamarin.install_csharp_change"
+ };
proj.MainActivity = proj.DefaultMainActivity;
using (var builder = CreateBuilderWithoutLogFile ()) {
builder.Install (proj);
diff --git a/tests/MSBuildDeviceIntegration/Tests/XASdkDeployTests.cs b/tests/MSBuildDeviceIntegration/Tests/XASdkDeployTests.cs
index 12d96f88c8c..bfa064a9c53 100644
--- a/tests/MSBuildDeviceIntegration/Tests/XASdkDeployTests.cs
+++ b/tests/MSBuildDeviceIntegration/Tests/XASdkDeployTests.cs
@@ -42,6 +42,7 @@ public void DotNetInstallAndRun ([Values (false, true)] bool isRelease, [Values
var dotnet = new DotNetCLI (proj, Path.Combine (fullProjDir, proj.ProjectFilePath));
Assert.IsTrue (dotnet.Run (), "`dotnet run` should succeed");
+ WaitForPermissionActivity (Path.Combine (Root, dotnet.ProjectDirectory, "permission-logcat.log"));
bool didLaunch = WaitForActivityToStart (proj.PackageName, "MainActivity",
Path.Combine (fullProjDir, "logcat.log"), 30);
RunAdbCommand ($"uninstall {proj.PackageName}");
@@ -57,6 +58,7 @@ public void DotNetDebug ()
XASdkProject proj;
proj = new XASdkProject ();
proj.SetRuntimeIdentifier (DeviceAbi);
+ string runtimeId = proj.GetProperty (KnownProperties.RuntimeIdentifier);
var relativeProjDir = Path.Combine ("temp", TestName);
var fullProjDir = Path.Combine (Root, relativeProjDir);
@@ -87,19 +89,20 @@ public void DotNetDebug ()
MaxConnectionAttempts = 10,
};
var startInfo = new SoftDebuggerStartInfo (args) {
- WorkingDirectory = Path.Combine (dotnet.ProjectDirectory, proj.IntermediateOutputPath, "android", "assets"),
+ WorkingDirectory = Path.Combine (dotnet.ProjectDirectory, proj.IntermediateOutputPath, runtimeId, "android", "assets"),
};
var options = new DebuggerSessionOptions () {
EvaluationOptions = EvaluationOptions.DefaultOptions,
};
options.EvaluationOptions.UseExternalTypeResolver = true;
ClearAdbLogcat ();
+ dotnet.BuildLogFile = Path.Combine (Root, dotnet.ProjectDirectory, "run.log");
Assert.True (dotnet.Build ("Run", new string [] {
$"AndroidSdbTargetPort={port}",
$"AndroidSdbHostPort={port}",
"AndroidAttachDebugger=True",
}), "Project should have run.");
-
+ WaitForPermissionActivity (Path.Combine (Root, dotnet.ProjectDirectory, "permission-logcat.log"));
Assert.IsTrue (WaitForDebuggerToStart (Path.Combine (Root, dotnet.ProjectDirectory, "logcat.log")), "Activity should have started");
// we need to give a bit of time for the debug server to start up.
WaitFor (2000);
diff --git a/tests/ResolveImports/Xamarin.Android.BindingResolveImportLib1/Xamarin.Android.BindingResolveImportLib1.csproj b/tests/ResolveImports/Xamarin.Android.BindingResolveImportLib1/Xamarin.Android.BindingResolveImportLib1.csproj
index c2988ff127b..75a51625037 100644
--- a/tests/ResolveImports/Xamarin.Android.BindingResolveImportLib1/Xamarin.Android.BindingResolveImportLib1.csproj
+++ b/tests/ResolveImports/Xamarin.Android.BindingResolveImportLib1/Xamarin.Android.BindingResolveImportLib1.csproj
@@ -34,7 +34,6 @@
bin\Releaseprompt4
- falsefalse
diff --git a/tests/ResolveImports/Xamarin.Android.BindingResolveImportLib2/Xamarin.Android.BindingResolveImportLib2.csproj b/tests/ResolveImports/Xamarin.Android.BindingResolveImportLib2/Xamarin.Android.BindingResolveImportLib2.csproj
index 1a74d556709..65db5a18ba2 100644
--- a/tests/ResolveImports/Xamarin.Android.BindingResolveImportLib2/Xamarin.Android.BindingResolveImportLib2.csproj
+++ b/tests/ResolveImports/Xamarin.Android.BindingResolveImportLib2/Xamarin.Android.BindingResolveImportLib2.csproj
@@ -32,7 +32,6 @@
bin\Releaseprompt4
- falsefalse
diff --git a/tests/ResolveImports/Xamarin.Android.BindingResolveImportLib3/Xamarin.Android.BindingResolveImportLib3.csproj b/tests/ResolveImports/Xamarin.Android.BindingResolveImportLib3/Xamarin.Android.BindingResolveImportLib3.csproj
index 86fa551e843..267df2641e9 100644
--- a/tests/ResolveImports/Xamarin.Android.BindingResolveImportLib3/Xamarin.Android.BindingResolveImportLib3.csproj
+++ b/tests/ResolveImports/Xamarin.Android.BindingResolveImportLib3/Xamarin.Android.BindingResolveImportLib3.csproj
@@ -34,7 +34,6 @@
bin\Releaseprompt4
- falsefalse
diff --git a/tests/ResolveImports/Xamarin.Android.BindingResolveImportLib4/Xamarin.Android.BindingResolveImportLib4.csproj b/tests/ResolveImports/Xamarin.Android.BindingResolveImportLib4/Xamarin.Android.BindingResolveImportLib4.csproj
index 5e342c611d1..46b9a1cbc8a 100644
--- a/tests/ResolveImports/Xamarin.Android.BindingResolveImportLib4/Xamarin.Android.BindingResolveImportLib4.csproj
+++ b/tests/ResolveImports/Xamarin.Android.BindingResolveImportLib4/Xamarin.Android.BindingResolveImportLib4.csproj
@@ -32,7 +32,6 @@
bin\Releaseprompt4
- falsefalse
diff --git a/tests/ResolveImports/Xamarin.Android.BindingResolveImports-Tests/Xamarin.Android.BindingResolveImports-Tests.csproj b/tests/ResolveImports/Xamarin.Android.BindingResolveImports-Tests/Xamarin.Android.BindingResolveImports-Tests.csproj
index 7409a8f24b5..16b7f5303dc 100644
--- a/tests/ResolveImports/Xamarin.Android.BindingResolveImports-Tests/Xamarin.Android.BindingResolveImports-Tests.csproj
+++ b/tests/ResolveImports/Xamarin.Android.BindingResolveImports-Tests/Xamarin.Android.BindingResolveImports-Tests.csproj
@@ -34,7 +34,6 @@
truebin\Release4
- falsefalse
diff --git a/tests/Runtime-AppBundle/Mono.Android-TestsAppBundle.csproj b/tests/Runtime-AppBundle/Mono.Android-TestsAppBundle.csproj
index 8bf77175a1c..01894bf7e64 100644
--- a/tests/Runtime-AppBundle/Mono.Android-TestsAppBundle.csproj
+++ b/tests/Runtime-AppBundle/Mono.Android-TestsAppBundle.csproj
@@ -17,7 +17,6 @@
Mono.Android-TestsAppBundleProperties\AndroidManifest.xmlarmeabi-v7a;x86
- FalseAlld8aab
@@ -137,5 +136,5 @@
-
+
diff --git a/tests/Runtime-MultiDex/Mono.Android-TestsMultiDex.csproj b/tests/Runtime-MultiDex/Mono.Android-TestsMultiDex.csproj
index 75a4c09266f..f1eb37a4136 100644
--- a/tests/Runtime-MultiDex/Mono.Android-TestsMultiDex.csproj
+++ b/tests/Runtime-MultiDex/Mono.Android-TestsMultiDex.csproj
@@ -17,7 +17,6 @@
Mono.Android-TestsMultiDexProperties\AndroidManifest.xmlarmeabi-v7a;x86
- FalseAlltrued8
@@ -116,5 +115,5 @@
-
+
diff --git a/tests/TestRunner.Core/TestRunner.Core.csproj b/tests/TestRunner.Core/TestRunner.Core.csproj
index 6e0b2cdb5a5..5e05a4e9ea3 100644
--- a/tests/TestRunner.Core/TestRunner.Core.csproj
+++ b/tests/TestRunner.Core/TestRunner.Core.csproj
@@ -33,7 +33,6 @@
prompt4true
- false
diff --git a/tests/TestRunner.NUnit/TestRunner.NUnit.csproj b/tests/TestRunner.NUnit/TestRunner.NUnit.csproj
index e85d234a57d..8aa023135b5 100644
--- a/tests/TestRunner.NUnit/TestRunner.NUnit.csproj
+++ b/tests/TestRunner.NUnit/TestRunner.NUnit.csproj
@@ -33,7 +33,6 @@
prompt4true
- false
diff --git a/tests/TestRunner.xUnit/TestRunner.xUnit.csproj b/tests/TestRunner.xUnit/TestRunner.xUnit.csproj
index 9677c352716..9d41fc947c5 100644
--- a/tests/TestRunner.xUnit/TestRunner.xUnit.csproj
+++ b/tests/TestRunner.xUnit/TestRunner.xUnit.csproj
@@ -33,7 +33,6 @@
prompt4true
- false
diff --git a/tests/Xamarin.Forms-Performance-Integration/Droid/Xamarin.Forms.Performance.Integration.Droid.csproj b/tests/Xamarin.Forms-Performance-Integration/Droid/Xamarin.Forms.Performance.Integration.Droid.csproj
index 97ed10728eb..03f9fcc6e6a 100644
--- a/tests/Xamarin.Forms-Performance-Integration/Droid/Xamarin.Forms.Performance.Integration.Droid.csproj
+++ b/tests/Xamarin.Forms-Performance-Integration/Droid/Xamarin.Forms.Performance.Integration.Droid.csproj
@@ -41,7 +41,6 @@
prompt4true
- falser8
diff --git a/tests/locales/LibraryResources/LibraryResources.csproj b/tests/locales/LibraryResources/LibraryResources.csproj
index ef91d4c19b5..2b3069e9ad4 100644
--- a/tests/locales/LibraryResources/LibraryResources.csproj
+++ b/tests/locales/LibraryResources/LibraryResources.csproj
@@ -34,7 +34,6 @@
..\..\..\bin\TestReleaseprompt4
- falsefalse
diff --git a/tests/locales/Xamarin.Android.Locale-Tests/Xamarin.Android.Locale-Tests.csproj b/tests/locales/Xamarin.Android.Locale-Tests/Xamarin.Android.Locale-Tests.csproj
index c352dcc679e..3507d21518e 100644
--- a/tests/locales/Xamarin.Android.Locale-Tests/Xamarin.Android.Locale-Tests.csproj
+++ b/tests/locales/Xamarin.Android.Locale-Tests/Xamarin.Android.Locale-Tests.csproj
@@ -17,7 +17,6 @@
Xamarin.Android.Locale-TestsProperties\AndroidManifest.xmlarmeabi-v7a;x86
- False