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

Commit 87dba47

Browse files
committed
Merge branch 'AndroidX' of github.com:xamarin/AndroidSupportComponents into AndroidX
2 parents d62f7b8 + eed97b1 commit 87dba47

23 files changed

+917
-346
lines changed

External-Dependency-Info.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ material are set forth below. Microsoft reserves all other rights not
88
expressly granted, whether by implication, estoppel or otherwise.
99

1010
#########################################################
11-
# Google Android Support libraries and Constraint Layout
11+
# Google AndroidX libraries and Constraint Layout
1212
# https://maven.google.com/
1313
#########################################################
1414

config.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"slnFile" : "generated/AndroidX.sln",
44
"additionalProjects":
55
[
6-
"source/buildtasks/support-annotations/Support-Annotations-BuildTasks.csproj",
7-
"source/buildtasks/support-annotations-tests/Support-Annotations-BuildTasks-Tests.csproj",
8-
"source/buildtasks/support-vector-drawable/Support-Vector-Drawable-BuildTasks.csproj"
6+
"source/buildtasks/annotation/Annotation-BuildTasks.csproj",
7+
"source/buildtasks/annotation-tests/Annotation-BuildTasks-Tests.csproj",
8+
"source/buildtasks/vectordrawable/VectorDrawable-BuildTasks.csproj"
99
],
1010
"templates" : [
1111
{

source/AndroidXProject.cshtml

Lines changed: 8 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020

2121
<PropertyGroup>
2222
<PackageId>@(Model.NuGetPackageId)</PackageId>
23-
<Title>Xamarin AndroidX Library - @(Model.Name)</Title>
24-
<Summary>Xamarin.AndroidX bindings for AndroidX Library - @(Model.Name)</Summary>
25-
<Description>Xamarin.AndroidX bindings for AndroidX Library - @(Model.Name)</Description>
26-
<PackageTags>Xamarin AndroidX Xamarin.AndroidX Library</PackageTags>
23+
<Title>Xamarin AndroidX - @(Model.Name)</Title>
24+
<Summary>Xamarin.Android bindings for AndroidX - @(Model.Name)</Summary>
25+
<Description>Xamarin.Android bindings for AndroidX - @(Model.Name)</Description>
26+
<PackageTags>Xamarin AndroidX Xamarin.AndroidX Support Google @(Model.Name)</PackageTags>
2727
<Authors>Microsoft</Authors>
2828
<Owners>Microsoft</Owners>
2929
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
@@ -144,55 +144,21 @@
144144
}
145145
</ItemGroup>
146146

147-
@if (@Model.NuGetPackageId == "Xamarin.AndroidX.Annotation")
147+
@if (false && @Model.NuGetPackageId == "Xamarin.AndroidX.Annotation")
148148
{
149+
// Disabled as this build task doesn't really do anything anymore but we may use it again in the future
149150
<ItemGroup>
150-
<None Include="..\..\source\buildtasks\support-annotations\bin\$(Configuration)\Xamarin.Android.Support.BuildTasks.dll" Pack="True" PackagePath="build\$(TargetFramework)" />
151+
<None Include="..\..\source\buildtasks\annotation\bin\$(Configuration)\Xamarin.AndroidX.Annotation.BuildTasks.dll" Pack="True" PackagePath="build\$(TargetFramework)" />
151152
</ItemGroup>
152153
}
153154

154155
@if (@Model.NuGetPackageId == "Xamarin.AndroidX.VectorDrawable")
155156
{
156157
<ItemGroup>
157-
<None Include="..\..\source\buildtasks\support-vector-drawable\bin\$(Configuration)\Xamarin.Android.Support.Tasks.VectorDrawable.dll" Pack="True" PackagePath="build\$(TargetFramework)" />
158+
<None Include="..\..\source\buildtasks\vectordrawable\bin\$(Configuration)\Xamarin.AndroidX.VectorDrawable.BuildTasks.dll" Pack="True" PackagePath="build\$(TargetFramework)" />
158159
</ItemGroup>
159160
}
160161

161-
@if (@Model.NuGetPackageId == "Xamarin.Android.Support.v4")
162-
{
163-
<Target Name="AndroidSupportLibrariesTypeForwardersGenerationWithGenAPI">
164-
<Message Text="AndroidSupportLibrariesTypeForwardersGenerationWithGenAPI" ></Message>
165-
<PropertyGroup>
166-
<GenAPIPath>$(MSBuildProjectDirectory)/../../tools/microsoft.dotnet.buildtools.genapi.1.0.0-beta-00081/Microsoft.DotNet.BuildTools.GenAPI/tools/GenAPI.exe</GenAPIPath>
167-
</PropertyGroup>
168-
169-
<ItemGroup>
170-
@foreach (var dep in @Model.NuGetDependencies)
171-
{
172-
if (dep.IsProjectReference)
173-
{
174-
<GenAPIItemBase
175-
Include="../../generated/@(dep.MavenArtifact.MavenGroupId).@(dep.MavenArtifact.MavenArtifactId)/"
176-
>
177-
<GenAPIAssembly>"$(IntermediateOutputPath)/@(dep.NuGetPackageId).dll"</GenAPIAssembly>
178-
<GenAPICSCode>./Additions/@(dep.NuGetPackageId).cs</GenAPICSCode>
179-
</GenAPIItemBase>
180-
}
181-
}
182-
</ItemGroup>
183-
184-
<Message Text=" GenAPIItemBase = %(GenAPIItemBase.Identity) %0A %(GenAPIItemBase.GenAPICSCode) %0A %(GenAPIItemBase.GenAPIAssembly)"></Message>
185-
<!--
186-
// For some reason GenAPI.exe can't handle absolute paths on mac/unix properly, so always make them relative
187-
// GenAPI.exe -libPath:$(MONOANDROID) -out:Some.generated.cs -w:TypeForwards ./relative/path/to/Assembly.dll
188-
-->
189-
<MakeDir Directories="./Additions" />
190-
<Exec
191-
Command="mono $(GenAPIPath) -libPath:$(MONOANDROID) -out:%(GenAPIItemBase.GenAPICSCode) -w:TypeForwards %(GenAPIItemBase.Identity)/%(GenAPIItemBase.GenAPIAssembly) "
192-
/>
193-
</Target>
194-
}
195-
196162
<ItemGroup>
197163
<PackageReference Include="MSBuild.Sdk.Extras" Version="1.4.0" PrivateAssets="All" />
198164
</ItemGroup>
Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
@using System.Linq
2+
<Project Sdk="Microsoft.NET.Sdk">
3+
<PropertyGroup>
4+
<TargetFrameworks>MonoAndroid90</TargetFrameworks>
5+
<IsBindingProject>true</IsBindingProject>
6+
@if (!string.IsNullOrEmpty(Model.AssemblyName)) {
7+
<AssemblyName>@(Model.AssemblyName)</AssemblyName>
8+
} else {
9+
<AssemblyName>@(Model.NuGetPackageId)</AssemblyName>
10+
}
11+
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
12+
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
13+
<AndroidUseLatestPlatformSdk>False</AndroidUseLatestPlatformSdk>
14+
<AndroidUseIntermediateDesignerFile>True</AndroidUseIntermediateDesignerFile>
15+
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
16+
<RootNamespace>@(Model.NuGetPackageId.Replace("Xamarin.", ""))</RootNamespace>
17+
<AndroidDexTool>d8</AndroidDexTool>
18+
<AndroidEnableDesugar>true</AndroidEnableDesugar>
19+
</PropertyGroup>
20+
21+
<PropertyGroup>
22+
<PackageId>@(Model.NuGetPackageId)</PackageId>
23+
<Title>Xamarin AndroidX - @(Model.Name)</Title>
24+
<Summary>Xamarin.Android bindings for AndroidX - @(Model.Name)</Summary>
25+
<Description>Xamarin.Android bindings for AndroidX - @(Model.Name)</Description>
26+
<PackageTags>Xamarin AndroidX Xamarin.AndroidX Support Google @(Model.Name)</PackageTags>
27+
<Authors>Microsoft</Authors>
28+
<Owners>Microsoft</Owners>
29+
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
30+
<PackageProjectUrl>https://go.microsoft.com/fwlink/?linkid=865352</PackageProjectUrl>
31+
<PackageLicenseUrl>https://go.microsoft.com/fwlink/?linkid=865381</PackageLicenseUrl>
32+
<PackageIconUrl>https://raw.githubusercontent.com/xamarin/AndroidSupportComponents/master/icons/@(Model.Name)_128x128.png</PackageIconUrl>
33+
<PackageVersion>@(Model.NuGetVersion)</PackageVersion>
34+
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
35+
</PropertyGroup>
36+
37+
<PropertyGroup>
38+
<AndroidClassParser>class-parse</AndroidClassParser>
39+
<AndroidCodegenTarget>XAJavaInterop1</AndroidCodegenTarget>
40+
</PropertyGroup>
41+
42+
<ItemGroup>
43+
@foreach (var art in @Model.MavenArtifacts) {
44+
<TransformFile Include="..\..\externals\@(art.MavenGroupId)\@(art.MavenArtifactId)-paramnames.xml" Condition="Exists('..\..\..\externals\@(art.MavenGroupId)\@(art.MavenArtifactId)-paramnames.xml')" />
45+
}
46+
</ItemGroup>
47+
48+
@*<ItemGroup>
49+
@foreach (var art in @Model.MavenArtifacts) {
50+
<JavaSourceJar Include="..\..\externals\@(art.MavenGroupId)\@(art.MavenArtifactId)-sources.jar" Condition="Exists('..\..\..\externals\@(art.MavenGroupId)\@(art.MavenArtifactId)-sources.jar')" />
51+
}
52+
</ItemGroup>*@
53+
54+
55+
<ItemGroup>
56+
@foreach (var art in @Model.MavenArtifacts) {
57+
<_AndroidDocumentationPath Include="..\..\externals\@(art.MavenGroupId)\@(art.MavenArtifactId)-paramnames.txt" Condition="Exists('..\..\..\externals\@(art.MavenGroupId)\@(art.MavenArtifactId)-paramnames.txt')" />
58+
}
59+
</ItemGroup>
60+
61+
<ItemGroup>
62+
<None Include="@(Model.NuGetPackageId).targets" Pack="True" PackagePath="build\$(TargetFramework)" />
63+
</ItemGroup>
64+
65+
@if (@Model.MavenArtifacts.Count > 0) {
66+
<ItemGroup>
67+
@foreach (var art in @Model.MavenArtifacts) {
68+
if (art.ProguardFile != null) {
69+
<None Include="..\..\@(art.ProguardFile)" Pack="True" PackagePath="proguard\" />
70+
}
71+
}
72+
</ItemGroup>
73+
}
74+
75+
<ItemGroup>
76+
<Folder Include="Additions\" />
77+
<Folder Include="Jars\" />
78+
<Folder Include="Transforms\" />
79+
</ItemGroup>
80+
<ItemGroup>
81+
<Compile Include="..\..\source\AssemblyInfo.cs" />
82+
<Compile Include="..\..\source\@(Model.MavenGroupId)\@(Model.Name)\additions\*.cs">
83+
<Link>Additions/%(RecursiveDir)/%(Filename)%(Extension)</Link>
84+
</Compile>
85+
</ItemGroup>
86+
87+
<ItemGroup>
88+
<TransformFile Include="..\..\source\Metadata.common.xml" >
89+
<Link>Transforms/Metadata.common.xml</Link>
90+
</TransformFile>
91+
<TransformFile Include="..\..\source\@(Model.MavenGroupId)\@(Model.Name)\transforms\*.xml">
92+
<Link>Transforms/%(RecursiveDir)/%(Filename)%(Extension)</Link>
93+
</TransformFile>
94+
</ItemGroup>
95+
96+
<ItemGroup>
97+
@foreach (var art in @Model.MavenArtifacts) {
98+
if (art.MavenArtifactPackaging == "aar") {
99+
<None Include="..\..\externals\@(art.MavenGroupId)\@(art.MavenArtifactId).aar" Pack="True" PackagePath="aar\" />
100+
}
101+
}
102+
</ItemGroup>
103+
104+
105+
@if (@Model.MavenArtifacts.Count > 0) {
106+
<ItemGroup>
107+
@foreach (var art in @Model.MavenArtifacts) {
108+
if (art.MavenArtifactPackaging == "aar") {
109+
<InputJar Include="..\..\externals\@(art.MavenGroupId)\@(art.MavenArtifactId)\classes.jar" />
110+
<!-- For those artifacts with lib/ folder -->
111+
<InputJar
112+
Condition="Exists('..\..\externals\@(art.MavenGroupId)\@(art.MavenArtifactId)\libs\')"
113+
Include="..\..\externals\@(art.MavenGroupId)\@(art.MavenArtifactId)\libs\*.jar"
114+
/>
115+
} else {
116+
<EmbeddedJar Include="..\..\externals\@(art.MavenGroupId)\@(art.MavenArtifactId).jar" />
117+
}
118+
}
119+
</ItemGroup>
120+
}
121+
122+
<ItemGroup>
123+
<!-- ProjectReference -->
124+
@foreach (var dep in @Model.NuGetDependencies) {
125+
if (dep.IsProjectReference) {
126+
<ProjectReference Include="..\..\generated\@(dep.MavenArtifact.MavenGroupId).@(dep.MavenArtifact.MavenArtifactId)\@(dep.MavenArtifact.MavenGroupId).@(dep.MavenArtifact.MavenArtifactId).csproj" PrivateAssets="none" />
127+
128+
}
129+
}
130+
<!-- some additional fixes -->
131+
@if (@Model.NuGetPackageId == "Xamarin.AndroidX.Transition")
132+
{
133+
<ProjectReference Include="..\androidx.fragment.fragment\androidx.fragment.fragment.csproj" PrivateAssets="none" />
134+
}
135+
</ItemGroup>
136+
137+
138+
<ItemGroup>
139+
<!-- PackageReference -->
140+
@foreach (var dep in @Model.NuGetDependencies) {
141+
if (!dep.IsProjectReference) {
142+
<PackageReference Include="@(dep.NuGetPackageId)" Version="@(dep.NuGetVersion)" />
143+
}
144+
}
145+
</ItemGroup>
146+
147+
<<<<<<< HEAD
148+
@if (@Model.NuGetPackageId == "Xamarin.AndroidX.Annotation")
149+
=======
150+
@if (1==2 && @Model.NuGetPackageId == "Xamarin.AndroidX.Annotation")
151+
>>>>>>> eed97b15ea9c03d877ea19410f013da88257696c
152+
{
153+
// Disabled as this build task doesn't really do anything anymore but we may use it again in the future
154+
<ItemGroup>
155+
<None Include="..\..\source\buildtasks\annotation\bin\$(Configuration)\Xamarin.AndroidX.Annotation.BuildTasks.dll" Pack="True" PackagePath="build\$(TargetFramework)" />
156+
</ItemGroup>
157+
}
158+
159+
@if (@Model.NuGetPackageId == "Xamarin.AndroidX.VectorDrawable")
160+
{
161+
<ItemGroup>
162+
<None Include="..\..\source\buildtasks\vectordrawable\bin\$(Configuration)\Xamarin.AndroidX.VectorDrawable.BuildTasks.dll" Pack="True" PackagePath="build\$(TargetFramework)" />
163+
</ItemGroup>
164+
}
165+
166+
<ItemGroup>
167+
<PackageReference Include="MSBuild.Sdk.Extras" Version="1.4.0" PrivateAssets="All" />
168+
</ItemGroup>
169+
170+
<Import Project="$(MSBuildSDKExtrasTargets)" Condition="Exists('$(MSBuildSDKExtrasTargets)')" />
171+
172+
</Project>

0 commit comments

Comments
 (0)