Skip to content

Commit

Permalink
[Xamarim.Android.Build.Tasks] Add support for new InstantRun
Browse files Browse the repository at this point in the history
This commit does a couple of things.

1) It reworks the monodroid-glue to copy any .so file it finds
in the .__override__ directory over to the local app directory.
This should allow us to fast deploy native libraries. Which means
we no longer need to re-build the apk if a native library changes.

2) Replaces the StubApplication with a new MultiDexLoader
ContentProvider. This provider is reposible for doing all the things
the previous StubApplication used to do. But because it is not
derived from an Application it means we can now support custom
Application types for our debug builds.
  • Loading branch information
dellis1972 committed Sep 18, 2018
1 parent 95ca102 commit 395d5ee
Show file tree
Hide file tree
Showing 43 changed files with 1,824 additions and 71 deletions.
1 change: 1 addition & 0 deletions build-tools/scripts/RunTests.targets
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<_ApkTestProject Include="$(_TopDir)\tests\BCL-Tests\Xamarin.Android.Bcl-Tests\Xamarin.Android.Bcl-Tests.csproj" />
<_ApkTestProject Include="$(_TopDir)\tests\Xamarin.Forms-Performance-Integration\Droid\Xamarin.Forms.Performance.Integration.Droid.csproj" />
<_ApkTestProject Include="$(_TopDir)\tests\EmbeddedDSOs\EmbeddedDSO\EmbeddedDSO.csproj" />
<_ApkTestProject Include="$(_TopDir)\tests\Runtime-MultiDex\Mono.Android-TestsMultiDex.csproj" />
<_ApkTestProjectAot Include="$(_TopDir)\src\Mono.Android\Test\Mono.Android-Tests.csproj" />
<_ApkTestProjectBundle Include="$(_TopDir)\src\Mono.Android\Test\Mono.Android-Tests.csproj" />
</ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions build-tools/scripts/TestApks.targets
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
<Exec
Condition=" '$(HostOS)' != 'Windows' And '$(_EmuTarget)' != '' "
ContinueOnError="WarnAndContinue"
IgnoreStandardErrorWarningFormat="true"
Command="kill -KILL $(_EmuPid)"
/>
</Target>
Expand Down
45 changes: 45 additions & 0 deletions src/Mono.Android/Test/Mono.Android-Test.Shared.projitems
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
<HasSharedItems>true</HasSharedItems>
<SharedGUID>{0AB4956E-6FB9-4DA0-9D49-AB65A3FF403A}</SharedGUID>
</PropertyGroup>
<PropertyGroup Label="Configuration">
<Import_RootNamespace>Mono.Android-Test.Shared</Import_RootNamespace>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)\Resources\Resource.designer.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\Properties\AssemblyInfo.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\Android.App\ApplicationTest.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\Android.Content\IntentTest.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\Android.Runtime\CharSequenceTest.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\Android.Runtime\JavaCollectionTest.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\Android.Runtime\JnienvArrayMarshaling.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\Android.Runtime\XmlReaderPullParserTest.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\Android.Runtime\XmlReaderResourceParserTest.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\Android.Widget\AdapterTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\Java.Interop\JavaConvertTest.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\Java.Lang\ObjectArrayMarshaling.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\Java.Lang\ObjectTest.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\Java.Interop\JnienvTest.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\System\AppDomainTest.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\System\AssemblyInformationalVersionAttributeTest.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\System\ExceptionTest.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\System\TimeZoneTest.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\System.IO\DriveInfoTest.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\System.IO.Compression\GZipStreamTest.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\System.Net\ProxyTest.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\System.Net\SslTest.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\System.Net\NetworkInterfaces.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\System.Threading\InterlockedTest.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\Java.Interop\JavaObjectExtensionsTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\Xamarin.Android.Net\AndroidClientHandlerTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\Xamarin.Android.Net\HttpClientIntegrationTests.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\Xamarin.Android.RuntimeTests\MainActivity.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\Xamarin.Android.RuntimeTests\MyIntent.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\Xamarin.Android.RuntimeTests\NonJavaObject.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\Xamarin.Android.RuntimeTests\TestInstrumentation.cs" />
<Compile Include="$(MSBuildThisFileDirectory)\Android.OS\BundleTest.cs" />
</ItemGroup>
</Project>
11 changes: 11 additions & 0 deletions src/Mono.Android/Test/Mono.Android-Test.Shared.shproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{0AB4956E-6FB9-4DA0-9D49-AB65A3FF403A}</ProjectGuid>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" />
<Import Project="Mono.Android-Test.Shared.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" />
</Project>
1 change: 1 addition & 0 deletions src/Mono.Android/Test/Mono.Android-Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<TargetFrameworkVersion>v8.1</TargetFrameworkVersion>
<AndroidUseLatestPlatformSdk>true</AndroidUseLatestPlatformSdk>
</PropertyGroup>
<Import Project="Mono.Android-Test.Shared.projitems" Label="Shared" Condition="Exists('Mono.Android-Test.Shared.projitems')" />
<Import Project="..\..\..\Configuration.props" />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down
Loading

0 comments on commit 395d5ee

Please sign in to comment.