Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Commit 178f42c

Browse files
authored
Merge pull request #174 from xamarin/multidex
Add bindings for MultiDex
2 parents d8a9412 + 7209b33 commit 178f42c

File tree

8 files changed

+43
-0
lines changed

8 files changed

+43
-0
lines changed

config.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,13 @@
337337
"nugetId" : "Xamarin.AndroidX.MediaRouter",
338338
"dependencyOnly" : false
339339
}
340+
,{
341+
"groupId" : "androidx.multidex",
342+
"artifactId" : "multidex",
343+
"version" : "2.0.1",
344+
"nugetId" : "Xamarin.AndroidX.MultiDex",
345+
"dependencyOnly" : false
346+
}
340347
,{
341348
"groupId" : "androidx.palette",
342349
"artifactId" : "palette",

source/AndroidXTargets.cshtml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@
3131

3232
<ItemGroup>
3333
@foreach (var art in @Model.MavenArtifacts) {
34+
if ($"{art.MavenGroupId}.{art.MavenArtifactId}" == "androidx.multidex.multidex") {
35+
// multidex is a special case that only includes the aar conditionally
36+
continue;
37+
}
38+
3439
if (art.MavenArtifactPackaging == "aar") {
3540
<AndroidAarLibrary Include="$(MSBuildThisFileDirectory)..\aar\@(art.MavenGroupId).@(art.MavenArtifactId).aar">
3641
<AndroidXSkipAndroidXMigration>true</AndroidXSkipAndroidXMigration>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
4+
<PropertyGroup Condition="'$(AndroidEnableMultiDex)' == 'true'">
5+
<AndroidApplicationJavaClass Condition="'$(AndroidApplicationJavaClass)' == ''">androidx.multidex.MultiDexApplication</AndroidApplicationJavaClass>
6+
</PropertyGroup>
7+
8+
<ItemGroup Condition="'$(AndroidEnableMultiDex)' == 'true'">
9+
<AndroidAarLibrary Include="$(MSBuildThisFileDirectory)..\aar\androidx.multidex.multidex.aar">
10+
<AndroidXSkipAndroidXMigration>true</AndroidXSkipAndroidXMigration>
11+
</AndroidAarLibrary>
12+
</ItemGroup>
13+
14+
<Target Name="_AndroidXRemoveBundledMultidexArtifacts"
15+
AfterTargets="_AddMultiDexDependencyJars"
16+
Condition="'$(AndroidEnableMultiDex)' == 'true'">
17+
18+
<ItemGroup>
19+
<AndroidJavaLibrary Remove="$(MonoAndroidToolsDirectory)\android-support-multidex.jar" />
20+
</ItemGroup>
21+
22+
</Target>
23+
24+
</Project>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<enum-field-mappings></enum-field-mappings>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<enum-method-mappings></enum-method-mappings>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<metadata></metadata>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<metadata></metadata>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<metadata>
2+
<remove-node path="/api/package[@name='androidx.multidex']" />
3+
</metadata>

0 commit comments

Comments
 (0)