From 5ed42b15d94af0575fbf74f15cff1572653e93c2 Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Wed, 5 Jun 2024 16:21:40 -0400 Subject: [PATCH] Lots of incremental build and multitargeting fixes --- .github/workflows/build.yml | 14 ++- .gitignore | 2 +- README.md | 2 +- build/nuget.png | Bin 0 -> 5913 bytes eng/Microsoft.Maui.BindingExtensions.targets | 12 --- ....Maui.BindingExtensions.Build.Tasks.csproj | 14 --- .../nuget.proj | 44 --------- .../Facebook.Android.Binding.csproj | 2 +- .../Facebook.MaciOS.Binding.csproj | 2 +- .../Firebase.MaciOS.Binding.csproj | 2 +- .../GoogleCast.Binding.csproj | 3 +- nuget.config | 2 +- .../BindingToolTaskTests.cs | 0 ...oolkit.Maui.BindingExtensions.Tests.csproj | 0 .../MockBuildEngine.cs | 0 ...ommunityToolkit.Maui.BindingExtensions.sln | 4 +- ...unityToolkit.Maui.BindingExtensions.csproj | 50 ++++++++++ .../MSBuildExtensions.cs | 0 .../Tasks/BindingToolTask.cs | 0 .../Tasks/Gradle.cs | 0 .../Tasks/Sharpie.cs | 0 .../Tasks/XcodeBuild.cs | 0 .../targets}/Common.android.targets | 26 +++-- .../targets}/Common.macios.targets | 93 ++++++++++-------- .../targets/Common.props | 12 +++ ...aui.BindingExtensions.multitargeting.props | 8 ++ ...nityToolkit.Maui.BindingExtensions.targets | 9 ++ {eng => src}/Directory.Build.props | 0 28 files changed, 169 insertions(+), 132 deletions(-) create mode 100644 build/nuget.png delete mode 100644 eng/Microsoft.Maui.BindingExtensions.targets delete mode 100644 eng/src/Microsoft.Maui.BindingExtensions.Build.Tasks/Microsoft.Maui.BindingExtensions.Build.Tasks.csproj delete mode 100644 eng/src/Microsoft.Maui.BindingExtensions.Build.Tasks/nuget.proj rename {eng/test/Microsoft.Maui.BindingExtensions.Build.Tests => src/CommunityToolkit.Maui.BindingExtensions.Tests}/BindingToolTaskTests.cs (100%) rename eng/test/Microsoft.Maui.BindingExtensions.Build.Tests/Microsoft.Maui.BindingExtensions.Build.Tests.csproj => src/CommunityToolkit.Maui.BindingExtensions.Tests/CommunityToolkit.Maui.BindingExtensions.Tests.csproj (100%) rename {eng/test/Microsoft.Maui.BindingExtensions.Build.Tests => src/CommunityToolkit.Maui.BindingExtensions.Tests}/MockBuildEngine.cs (100%) rename eng/Microsoft.Maui.BindingExtensions.Build.Tasks.sln => src/CommunityToolkit.Maui.BindingExtensions.sln (72%) create mode 100644 src/CommunityToolkit.Maui.BindingExtensions/CommunityToolkit.Maui.BindingExtensions.csproj rename {eng/src/Microsoft.Maui.BindingExtensions.Build.Tasks => src/CommunityToolkit.Maui.BindingExtensions}/MSBuildExtensions.cs (100%) rename {eng/src/Microsoft.Maui.BindingExtensions.Build.Tasks => src/CommunityToolkit.Maui.BindingExtensions}/Tasks/BindingToolTask.cs (100%) rename {eng/src/Microsoft.Maui.BindingExtensions.Build.Tasks => src/CommunityToolkit.Maui.BindingExtensions}/Tasks/Gradle.cs (100%) rename {eng/src/Microsoft.Maui.BindingExtensions.Build.Tasks => src/CommunityToolkit.Maui.BindingExtensions}/Tasks/Sharpie.cs (100%) rename {eng/src/Microsoft.Maui.BindingExtensions.Build.Tasks => src/CommunityToolkit.Maui.BindingExtensions}/Tasks/XcodeBuild.cs (100%) rename {eng => src/CommunityToolkit.Maui.BindingExtensions/targets}/Common.android.targets (69%) rename {eng => src/CommunityToolkit.Maui.BindingExtensions/targets}/Common.macios.targets (50%) create mode 100644 src/CommunityToolkit.Maui.BindingExtensions/targets/Common.props create mode 100644 src/CommunityToolkit.Maui.BindingExtensions/targets/CommunityToolkit.Maui.BindingExtensions.multitargeting.props create mode 100644 src/CommunityToolkit.Maui.BindingExtensions/targets/CommunityToolkit.Maui.BindingExtensions.targets rename {eng => src}/Directory.Build.props (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 415a27a..6d9b80b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,23 +39,27 @@ jobs: run: mkdir -p ${{ runner.temp }}/logs/ - name: Build and test build tasks - working-directory: ./eng + working-directory: ./src run: >- - dotnet test Microsoft.Maui.BindingExtensions.Build.Tasks.sln + dotnet test CommunityToolkit.Maui.BindingExtensions.sln --logger trx --results-directory ${{ runner.temp }}/logs/TestResults-build-tasks -bl:${{ runner.temp }}/logs/build-tasks.binlog + - name: Pack build tasks + working-directory: ./src/CommunityToolkit.Maui.BindingExtensions + run: dotnet pack CommunityToolkit.Maui.BindingExtensions.csproj -bl:${{ runner.temp }}/logs/build-tasks-pack.binlog + - name: Build facebook working-directory: ./facebook - run: dotnet build -m:1 -bl:${{ runner.temp }}/logs/facebook.binlog + run: dotnet build -bl:${{ runner.temp }}/logs/facebook.binlog - name: Build firebase working-directory: ./firebase/macios - run: dotnet build -m:1 -bl:${{ runner.temp }}/logs/firebase-macios.binlog + run: dotnet build -bl:${{ runner.temp }}/logs/firebase-macios.binlog - name: Build googlecast working-directory: ./googlecast/macios - run: dotnet build -m:1 -bl:${{ runner.temp }}/logs/googlecast-macios.binlog + run: dotnet build -bl:${{ runner.temp }}/logs/googlecast-macios.binlog - name: Upload logs uses: actions/upload-artifact@v4 diff --git a/.gitignore b/.gitignore index 42e658b..5680166 100644 --- a/.gitignore +++ b/.gitignore @@ -403,7 +403,7 @@ FodyWeavers.xsd xcuserdata/ -build/ +**/native/build/ .build/ *.xcframework Pods/ diff --git a/README.md b/README.md index a21a706..bc6099c 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ The goal is to have bindings and samples building 100% through normal MSBuild in Each .NET Binding project contains some additional MSBuild logic to help obtain and build the native SDK dependencies along with the native slim binding project. In some cases, the target may also download native SDKs if they are not already present. In this way, the expected native artifacts are available in the expected working directories. -In the [```eng/```](/eng/) folder you will find a solution with custom build tasks/targets to help with this. These build extensions are available in a Microsoft.Maui.BindingExtensions NuGet package that the binding projects reference. +In the [```src/```](/src/) folder you will find a solution with custom build tasks/targets to help with this. These build extensions are available in a CommunityToolkit.Maui.BindingExtensions NuGet package that the binding projects reference. Android binding projects generate the API definition automatically taking into account any optional manual modifications like those implemented via the [```Metadata.xml```](https://learn.microsoft.com/xamarin/android/platform/binding-java-library/customizing-bindings/java-bindings-metadata#metadataxml-transform-file) transform file. diff --git a/build/nuget.png b/build/nuget.png new file mode 100644 index 0000000000000000000000000000000000000000..27314ff2d7cca2f04b299988e5b201b15858c22d GIT binary patch literal 5913 zcmV+!7v|`RP)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91YM=uE1ONa40RR91TmS$70RPU_kN^M{gGod|RCodHom-D3*Hy>s^mMmp zJf87od`*n)u@Z8bMc2`{Q<(Z%yGj*rSU=lLmJ1&($OE}z{eqUqDeb=l3Rm~+?2%nregT( zVRhm6f9(s;{l#eO43Wt54E=?xuYU3CpI2?atVz^88Ud%xqA3keatl)+$cTnG1SGN% z=p`P+>_PBaBU-=K`bOglp`fAf1~O6Wk8ZtxV?If$Kf zbo6H`&mL3)hyn|76M`O*aZ`ErayMl|g@-0mO<(-L6GX3CPofEHJB!9342tO46DT1r#pwxU2FQbHdrIm^IW#k|A|M zKgNhO8vf#HjMf+`OB{r;?ytoWjLBrkYI?AL@n;0C>v~$(Rb7X=PPLZ%a&X4u_?c;! z91nZZpj^3>je;}c$VrshR7iEPBcBI z5j&p-sXOfyXpyk{X%Gtx{Kv0RN-CBn3)8ROLCYq6U-)-)eNPt+JC!qEb{7xtDg~W7 z33$_E_w&|AlTP)`?_742lFFeiH5DNmLStysJG#E5>pfkkcJ9me$)oj#Q_U|OO^E}+ z&r_Pj`0+aWe2M`5)~6&X3CA8gi6;GBL!*?qJ7jp)S#RTy6F~CB z94|hG+t|1VvggpKT$FxDk4?J=$()u6znSuk$_+*9&UT#nGm7*waU~l^Nj{j)Htpr! zV$-+RJufOZZn>2YF1dJV{NAts%Nwfjn+p6{AJaTk!SmrNPB8LiA<*C@KODtv;`^Z- zvdU%B$@eQ-7&6UA$~D@YeApku$PZ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zsqDr~ v1!xKvJBe$pNt*A*t^&IX>?-j8u>$`Gpe?mBq~Uxo00000NkvXXu0mjfPZ66N literal 0 HcmV?d00001 diff --git a/eng/Microsoft.Maui.BindingExtensions.targets b/eng/Microsoft.Maui.BindingExtensions.targets deleted file mode 100644 index f9804a0..0000000 --- a/eng/Microsoft.Maui.BindingExtensions.targets +++ /dev/null @@ -1,12 +0,0 @@ - - - - - Microsoft.Maui.BindingExtensions.Build.Tasks.dll - $(USERPROFILE) - - - - - - diff --git a/eng/src/Microsoft.Maui.BindingExtensions.Build.Tasks/Microsoft.Maui.BindingExtensions.Build.Tasks.csproj b/eng/src/Microsoft.Maui.BindingExtensions.Build.Tasks/Microsoft.Maui.BindingExtensions.Build.Tasks.csproj deleted file mode 100644 index 527bd05..0000000 --- a/eng/src/Microsoft.Maui.BindingExtensions.Build.Tasks/Microsoft.Maui.BindingExtensions.Build.Tasks.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - netstandard2.0 - enable - enable - - - - - - - - diff --git a/eng/src/Microsoft.Maui.BindingExtensions.Build.Tasks/nuget.proj b/eng/src/Microsoft.Maui.BindingExtensions.Build.Tasks/nuget.proj deleted file mode 100644 index b16f308..0000000 --- a/eng/src/Microsoft.Maui.BindingExtensions.Build.Tasks/nuget.proj +++ /dev/null @@ -1,44 +0,0 @@ - - - - - netstandard2.0 - false - false - true - - - - Microsoft.Maui.BindingExtensions - Build tasks and extensions for .NET MAUI, .NET for Android, and .NET for iOS binding projects - 0.0.1 - - - - - _GetPackItems; - $(BeforePack); - - - - - - - - - - <_PackageFiles Include="$(MSBuildThisFileDirectory)../../Microsoft.Maui.BindingExtensions.targets" PackagePath="build" /> - <_PackageFiles Include="$(MSBuildThisFileDirectory)../../Common.android.targets" PackagePath="build" /> - <_PackageFiles Include="$(MSBuildThisFileDirectory)../../Common.macios.targets" PackagePath="build" /> - <_PackageFiles Include="$(MSBuildThisFileDirectory)/bin/$(Configuration)/netstandard2.0/Microsoft.Maui.BindingExtensions.Build.Tasks.dll" PackagePath="build" /> - - - - diff --git a/facebook/android/Facebook.Android.Binding/Facebook.Android.Binding.csproj b/facebook/android/Facebook.Android.Binding/Facebook.Android.Binding.csproj index 0456c90..9954561 100644 --- a/facebook/android/Facebook.Android.Binding/Facebook.Android.Binding.csproj +++ b/facebook/android/Facebook.Android.Binding/Facebook.Android.Binding.csproj @@ -9,7 +9,7 @@ - + diff --git a/facebook/macios/Facebook.MaciOS.Binding/Facebook.MaciOS.Binding.csproj b/facebook/macios/Facebook.MaciOS.Binding/Facebook.MaciOS.Binding.csproj index 1b366c9..8bd4ca1 100644 --- a/facebook/macios/Facebook.MaciOS.Binding/Facebook.MaciOS.Binding.csproj +++ b/facebook/macios/Facebook.MaciOS.Binding/Facebook.MaciOS.Binding.csproj @@ -7,7 +7,7 @@ - + diff --git a/firebase/macios/Firebase.MaciOS.Binding/Firebase.MaciOS.Binding.csproj b/firebase/macios/Firebase.MaciOS.Binding/Firebase.MaciOS.Binding.csproj index 908b8cd..b74b95b 100644 --- a/firebase/macios/Firebase.MaciOS.Binding/Firebase.MaciOS.Binding.csproj +++ b/firebase/macios/Firebase.MaciOS.Binding/Firebase.MaciOS.Binding.csproj @@ -8,7 +8,7 @@ - + diff --git a/googlecast/macios/GoogleCast.Binding/GoogleCast.Binding.csproj b/googlecast/macios/GoogleCast.Binding/GoogleCast.Binding.csproj index 7a481b7..d18b6a6 100644 --- a/googlecast/macios/GoogleCast.Binding/GoogleCast.Binding.csproj +++ b/googlecast/macios/GoogleCast.Binding/GoogleCast.Binding.csproj @@ -5,12 +5,11 @@ true true - False $(BuildXcodeProjectsDependsOnTargets);NativeDependencies - + diff --git a/nuget.config b/nuget.config index 7d2caa6..5445d10 100644 --- a/nuget.config +++ b/nuget.config @@ -1,6 +1,6 @@ - + diff --git a/eng/test/Microsoft.Maui.BindingExtensions.Build.Tests/BindingToolTaskTests.cs b/src/CommunityToolkit.Maui.BindingExtensions.Tests/BindingToolTaskTests.cs similarity index 100% rename from eng/test/Microsoft.Maui.BindingExtensions.Build.Tests/BindingToolTaskTests.cs rename to src/CommunityToolkit.Maui.BindingExtensions.Tests/BindingToolTaskTests.cs diff --git a/eng/test/Microsoft.Maui.BindingExtensions.Build.Tests/Microsoft.Maui.BindingExtensions.Build.Tests.csproj b/src/CommunityToolkit.Maui.BindingExtensions.Tests/CommunityToolkit.Maui.BindingExtensions.Tests.csproj similarity index 100% rename from eng/test/Microsoft.Maui.BindingExtensions.Build.Tests/Microsoft.Maui.BindingExtensions.Build.Tests.csproj rename to src/CommunityToolkit.Maui.BindingExtensions.Tests/CommunityToolkit.Maui.BindingExtensions.Tests.csproj diff --git a/eng/test/Microsoft.Maui.BindingExtensions.Build.Tests/MockBuildEngine.cs b/src/CommunityToolkit.Maui.BindingExtensions.Tests/MockBuildEngine.cs similarity index 100% rename from eng/test/Microsoft.Maui.BindingExtensions.Build.Tests/MockBuildEngine.cs rename to src/CommunityToolkit.Maui.BindingExtensions.Tests/MockBuildEngine.cs diff --git a/eng/Microsoft.Maui.BindingExtensions.Build.Tasks.sln b/src/CommunityToolkit.Maui.BindingExtensions.sln similarity index 72% rename from eng/Microsoft.Maui.BindingExtensions.Build.Tasks.sln rename to src/CommunityToolkit.Maui.BindingExtensions.sln index 029cc15..011b359 100644 --- a/eng/Microsoft.Maui.BindingExtensions.Build.Tasks.sln +++ b/src/CommunityToolkit.Maui.BindingExtensions.sln @@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.11.34809.278 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Maui.BindingExtensions.Build.Tasks", "src\Microsoft.Maui.BindingExtensions.Build.Tasks\Microsoft.Maui.BindingExtensions.Build.Tasks.csproj", "{D1497B0B-A62D-49AD-833B-EFE4F87B1BEE}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CommunityToolkit.Maui.BindingExtensions", "CommunityToolkit.Maui.BindingExtensions\CommunityToolkit.Maui.BindingExtensions.csproj", "{D1497B0B-A62D-49AD-833B-EFE4F87B1BEE}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Maui.BindingExtensions.Build.Tests", "test\Microsoft.Maui.BindingExtensions.Build.Tests\Microsoft.Maui.BindingExtensions.Build.Tests.csproj", "{7BF30708-BC47-4379-8DC0-E7093AC2FED6}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CommunityToolkit.Maui.BindingExtensions.Tests", "CommunityToolkit.Maui.BindingExtensions.Tests\CommunityToolkit.Maui.BindingExtensions.Tests.csproj", "{7BF30708-BC47-4379-8DC0-E7093AC2FED6}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/src/CommunityToolkit.Maui.BindingExtensions/CommunityToolkit.Maui.BindingExtensions.csproj b/src/CommunityToolkit.Maui.BindingExtensions/CommunityToolkit.Maui.BindingExtensions.csproj new file mode 100644 index 0000000..99b256a --- /dev/null +++ b/src/CommunityToolkit.Maui.BindingExtensions/CommunityToolkit.Maui.BindingExtensions.csproj @@ -0,0 +1,50 @@ + + + + netstandard2.0 + enable + enable + + + + CommunityToolkit.Maui.BindingExtensions + Toolkit with build tasks and extensions that support .NET MAUI slim binding projects + Microsoft + Microsoft + © Microsoft Corporation. All rights reserved. + MIT + https://github.com/Redth/DotNet.Platform.SlimBindings + https://github.com/Redth/DotNet.Platform.SlimBindings + CommunityToolkit.Maui.BindingExtensions + CommunityToolkit.Maui.BindingExtensions is a set of build tasks and extensions for .NET MAUI, .NET for Android, and .NET for iOS binding projects + nuget.png + $(AssemblyName) ($(TargetFramework)) + 1.0.0.0 + 1.0.0.0 + 0.0.1-pre1 + $(Version)$(VersionSuffix) + true + net,maui,netmaui,toolkit,kit,communitytoolkit,netmauitoolkit,mauicommunitytoolkit,slimbinding,binding + README.md + false + true + + + + + + + + + + + + + + + + + + + + diff --git a/eng/src/Microsoft.Maui.BindingExtensions.Build.Tasks/MSBuildExtensions.cs b/src/CommunityToolkit.Maui.BindingExtensions/MSBuildExtensions.cs similarity index 100% rename from eng/src/Microsoft.Maui.BindingExtensions.Build.Tasks/MSBuildExtensions.cs rename to src/CommunityToolkit.Maui.BindingExtensions/MSBuildExtensions.cs diff --git a/eng/src/Microsoft.Maui.BindingExtensions.Build.Tasks/Tasks/BindingToolTask.cs b/src/CommunityToolkit.Maui.BindingExtensions/Tasks/BindingToolTask.cs similarity index 100% rename from eng/src/Microsoft.Maui.BindingExtensions.Build.Tasks/Tasks/BindingToolTask.cs rename to src/CommunityToolkit.Maui.BindingExtensions/Tasks/BindingToolTask.cs diff --git a/eng/src/Microsoft.Maui.BindingExtensions.Build.Tasks/Tasks/Gradle.cs b/src/CommunityToolkit.Maui.BindingExtensions/Tasks/Gradle.cs similarity index 100% rename from eng/src/Microsoft.Maui.BindingExtensions.Build.Tasks/Tasks/Gradle.cs rename to src/CommunityToolkit.Maui.BindingExtensions/Tasks/Gradle.cs diff --git a/eng/src/Microsoft.Maui.BindingExtensions.Build.Tasks/Tasks/Sharpie.cs b/src/CommunityToolkit.Maui.BindingExtensions/Tasks/Sharpie.cs similarity index 100% rename from eng/src/Microsoft.Maui.BindingExtensions.Build.Tasks/Tasks/Sharpie.cs rename to src/CommunityToolkit.Maui.BindingExtensions/Tasks/Sharpie.cs diff --git a/eng/src/Microsoft.Maui.BindingExtensions.Build.Tasks/Tasks/XcodeBuild.cs b/src/CommunityToolkit.Maui.BindingExtensions/Tasks/XcodeBuild.cs similarity index 100% rename from eng/src/Microsoft.Maui.BindingExtensions.Build.Tasks/Tasks/XcodeBuild.cs rename to src/CommunityToolkit.Maui.BindingExtensions/Tasks/XcodeBuild.cs diff --git a/eng/Common.android.targets b/src/CommunityToolkit.Maui.BindingExtensions/targets/Common.android.targets similarity index 69% rename from eng/Common.android.targets rename to src/CommunityToolkit.Maui.BindingExtensions/targets/Common.android.targets index 11cea60..0917b91 100644 --- a/eng/Common.android.targets +++ b/src/CommunityToolkit.Maui.BindingExtensions/targets/Common.android.targets @@ -4,7 +4,6 @@ - true Release @@ -16,23 +15,36 @@ + + <_BuildGradleProjectsBeforeTargets Condition=" '$(IsRunningOuterBuild)' == 'true' "> + DispatchToInnerBuilds; + + <_BuildGradleProjectsDependsOn Condition=" '$(IsRunningOuterBuild)' != 'true' "> + _ResolveMonoAndroidSdks; + + + + + <_GradleInputs Include="$(MSBuildProjectFullPath)" /> <_GradleInputs Include="%(GradleProjectReference.FullPath)/**/*.java" /> <_GradleInputs Include="%(GradleProjectReference.FullPath)/**/*.gradle" /> <_GradleInputs Include="%(GradleProjectReference.FullPath)/**/*.xml" /> <_GradleInputs Include="%(GradleProjectReference.FullPath)/**/*.properties"/> <_GradleInputs Remove="%(GradleProjectReference.FullPath)/%(GradleProjectReference.ModuleName)/build/**/*" /> + <_GradleOutputs Include="@(GradleProjectReference->'%(FullPath)/%(ModuleName)/build/outputs/aar/%(ModuleName)-$(GradleProjectConfiguration).aar')" /> - + Outputs="@(_GradleOutputs)" > + + - + %(GradleProjectReference.Bind) %(GradleProjectReference.Pack) %(GradleProjectReference.Visible) diff --git a/eng/Common.macios.targets b/src/CommunityToolkit.Maui.BindingExtensions/targets/Common.macios.targets similarity index 50% rename from eng/Common.macios.targets rename to src/CommunityToolkit.Maui.BindingExtensions/targets/Common.macios.targets index a6a3b84..03aa1f6 100644 --- a/eng/Common.macios.targets +++ b/src/CommunityToolkit.Maui.BindingExtensions/targets/Common.macios.targets @@ -5,85 +5,91 @@ - true Release - true - true - true + true + true + true + false <_XcArchiveExtraArgs>$(_XcArchiveExtraArgs) ENABLE_BITCODE=NO SKIP_INSTALL=NO SWIFT_INSTALL_OBJC_HEADER=YES BUILD_LIBRARY_FOR_DISTRIBUTION=YES <_XcArchiveExtraArgs>$(_XcArchiveExtraArgs) OTHER_LDFLAGS="-ObjC" OTHER_SWIFT_FLAGS="-no-verify-emitted-module-interface" OBJC_CFLAGS="-fno-objc-msgsend-selector-stubs -ObjC" - - <_GenerateBindingsDependsOn> - _BuildXcodeProjects; - _SharpieBindXcodeProjects; - $(_GenerateBindingsDependsOn); - - - Framework true + %(RootDir)%(Directory)build/%(Filename)/ios.xcarchive + %(RootDir)%(Directory)build/%(Filename)/iossimulator.xcarchive + %(RootDir)%(Directory)build/%(Filename)/maccatalyst.xcarchive - + + <_BuildXcodeProjectsBeforeTargets> + BeforeBuild; + + <_BuildXcodeProjectsBeforeTargets Condition=" '$(IsRunningOuterBuild)' == 'true' "> + DispatchToInnerBuilds; + + + + - <_XcbInputs Include="@(XcodeProjectReference->'%(RootDir)%(Directory)**/*.swift')" /> - <_XcbInputs Include="@(XcodeProjectReference->'%(RootDir)%(Directory)**/*.h')" /> - <_XcbInputs Include="@(XcodeProjectReference->'%(RootDir)%(Directory)**/*.pbxproj')" /> - <_XcbInputs Include="@(XcodeProjectReference->'%(RootDir)%(Directory)**/*.xcworkspace')"/> - <_XcbInputs Remove="@(XcodeProjectReference->'%(RootDir)%(Directory)build/**/*')" /> + <_XcbInputs Include="$(MSBuildProjectFullPath)" /> + <_XcbInputs Include="%(XcodeProjectReference.RootDir)%(XcodeProjectReference.Directory)**/*.swift" /> + <_XcbInputs Include="%(XcodeProjectReference.RootDir)%(XcodeProjectReference.Directory)**/*.h" /> + <_XcbInputs Include="%(XcodeProjectReference.RootDir)%(XcodeProjectReference.Directory)**/*.pbxproj" /> + <_XcbInputs Include="%(XcodeProjectReference.RootDir)%(XcodeProjectReference.Directory)**/*.xcworkspace"/> + <_XcbInputs Remove="%(XcodeProjectReference.RootDir)%(XcodeProjectReference.Directory)build/**/*')" /> + Outputs="@(XcodeProjectReference->'%(RootDir)%(Directory)build/%(Filename)/BuildXcodeFramework.stamp')" > + + <_CreateXcFxArgs Include="-create-xcframework" /> - <_CreateXcFxArgs Condition=" '$(XcodeBuildiOS)' == 'true' " Include="@(XcodeProjectReference->'-archive %(RootDir)%(Directory)build/%(SchemeName)-ios.xcarchive')" /> - <_CreateXcFxArgs Condition=" '$(XcodeBuildiOS)' == 'true' " Include="-framework %(XcodeProjectReference.SchemeName).framework" /> - <_CreateXcFxArgs Condition=" '$(XcodeBuildiOSSimulator)' == 'true' " Include="@(XcodeProjectReference->'-archive %(RootDir)%(Directory)build/%(SchemeName)-iossimulator.xcarchive')" /> - <_CreateXcFxArgs Condition=" '$(XcodeBuildiOSSimulator)' == 'true' " Include="-framework %(XcodeProjectReference.SchemeName).framework" /> - <_CreateXcFxArgs Condition=" '$(XcodeBuildMacCatalyst)' == 'true' " Include="@(XcodeProjectReference->'-archive %(RootDir)%(Directory)build/%(SchemeName)-maccatalyst.xcarchive')" /> - <_CreateXcFxArgs Condition=" '$(XcodeBuildMacCatalyst)' == 'true' " Include="-framework %(XcodeProjectReference.SchemeName).framework" /> - <_CreateXcFxArgs Include="@(XcodeProjectReference->'-output %(RootDir)%(Directory)build/%(SchemeName).xcframework')" /> + <_CreateXcFxArgs Condition=" '$(XcodeBuildiOS)' == 'true' " + Include="@(XcodeProjectReference->'-archive %(XCArchiveiOS) -framework %(SchemeName).framework')" /> + <_CreateXcFxArgs Condition=" '$(XcodeBuildiOSSimulator)' == 'true' " + Include="@(XcodeProjectReference->'-archive %(XCArchiveiOSSimulator) -framework %(SchemeName).framework')" /> + <_CreateXcFxArgs Condition=" '$(XcodeBuildMacCatalyst)' == 'true' " + Include="@(XcodeProjectReference->'-archive %(XCArchiveiOSSimulator) -framework %(SchemeName).framework')" /> + <_CreateXcFxArgs Include="@(XcodeProjectReference->'-output %(RootDir)%(Directory)build/%(Filename)/%(SchemeName).xcframework')" /> - - - + %(XcodeProjectReference.Kind) %(XcodeProjectReference.SmartLink) @@ -91,25 +97,32 @@ + - <_SharpieInputs Include="@(XcodeProjectReference->'%(RootDir)%(Directory)build/%(SchemeName)-ios.xcarchive/Products/Library/Frameworks/%(SchemeName).framework')" /> + <_SharpieInputs Condition=" '$(XcodeBuildiOS)' == 'true' " + Include="%(XcodeProjectReference.XCArchiveiOS)/**/*.*" /> + <_SharpieInputs Condition=" '$(XcodeBuildiOS)' != 'true' and '$(XcodeBuildMacCatalyst)' == 'true' " + Include="%(XcodeProjectReference.XCArchiveMacCatalyst)/**/*.*" /> - + - <_ObjSharpieArgs Include="@(XcodeProjectReference->'--output=%(RootDir)%(Directory)build/sharpie')" /> - <_ObjSharpieArgs Include="--namespace=%(XcodeProjectReference.SharpieNamespace)" /> - <_ObjSharpieArgs Include="@(XcodeProjectReference->'--framework %(RootDir)%(Directory)build/%(SchemeName)-ios.xcarchive/Products/Library/Frameworks/%(SchemeName).framework')" /> + <_ObjSharpieArgs Include="@(XcodeProjectReference->'--output=%(RootDir)%(Directory)build/sharpie --namespace=%(SharpieNamespace)')" /> + <_ObjSharpieArgs Condition=" '$(XcodeBuildiOS)' == 'true' " + Include="@(XcodeProjectReference->'--framework %(XCArchiveiOS)/Products/Library/Frameworks/%(SchemeName).framework')" /> + <_ObjSharpieArgs Condition=" '$(XcodeBuildiOS)' != 'true' and '$(XcodeBuildMacCatalyst)' == 'true' " + Include="@(XcodeProjectReference->'--framework %(XCArchiveMacCatalyst)/Products/Library/Frameworks/%(SchemeName).framework')" /> diff --git a/src/CommunityToolkit.Maui.BindingExtensions/targets/Common.props b/src/CommunityToolkit.Maui.BindingExtensions/targets/Common.props new file mode 100644 index 0000000..88507f7 --- /dev/null +++ b/src/CommunityToolkit.Maui.BindingExtensions/targets/Common.props @@ -0,0 +1,12 @@ + + + + + false + false + true + CommunityToolkit.Maui.BindingExtensions.dll + $(USERPROFILE) + + + diff --git a/src/CommunityToolkit.Maui.BindingExtensions/targets/CommunityToolkit.Maui.BindingExtensions.multitargeting.props b/src/CommunityToolkit.Maui.BindingExtensions/targets/CommunityToolkit.Maui.BindingExtensions.multitargeting.props new file mode 100644 index 0000000..d0dcc4b --- /dev/null +++ b/src/CommunityToolkit.Maui.BindingExtensions/targets/CommunityToolkit.Maui.BindingExtensions.multitargeting.props @@ -0,0 +1,8 @@ + + + + + true + + + diff --git a/src/CommunityToolkit.Maui.BindingExtensions/targets/CommunityToolkit.Maui.BindingExtensions.targets b/src/CommunityToolkit.Maui.BindingExtensions/targets/CommunityToolkit.Maui.BindingExtensions.targets new file mode 100644 index 0000000..ebb1a02 --- /dev/null +++ b/src/CommunityToolkit.Maui.BindingExtensions/targets/CommunityToolkit.Maui.BindingExtensions.targets @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/eng/Directory.Build.props b/src/Directory.Build.props similarity index 100% rename from eng/Directory.Build.props rename to src/Directory.Build.props