Skip to content

Commit

Permalink
Rename CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjcollins authored Jun 25, 2024
1 parent 3fc3765 commit 6956d73
Show file tree
Hide file tree
Showing 26 changed files with 320 additions and 320 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,24 @@ jobs:
run: mkdir -p ${{ runner.temp }}/logs/

- name: Create local nupkg dir
run: mkdir -p ./src/CommunityToolkit.Maui.BindingExtensions/bin/Release
run: mkdir -p ./src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/bin/Release

- name: Build and test build tasks
working-directory: ./src
run: >-
dotnet test CommunityToolkit.Maui.BindingExtensions.sln
dotnet test CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.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
working-directory: ./src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks
run: dotnet pack CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks.csproj -bl:${{ runner.temp }}/logs/build-tasks-pack.binlog

- name: Upload nupkg
uses: actions/upload-artifact@v4
with:
name: nupkg
path: ./src/CommunityToolkit.Maui.BindingExtensions/bin/Release/*.nupkg
path: ./src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/bin/Release/*.nupkg

- name: Build facebook
working-directory: ./facebook
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PropertyGroup>
<LangVersion>latest</LangVersion>
<MSBuildPackageVersion>17.9.5</MSBuildPackageVersion>
<BindingExtPackageVersion>0.0.1-pre7</BindingExtPackageVersion>
<NLIPackageVersion>0.0.1-pre1</NLIPackageVersion>
</PropertyGroup>

</Project>
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,32 +99,32 @@ Install prerequisites:
## Building

The binding build process is extended to obtain and build native SDK dependencies by adding the `CommunityToolkit.Maui.BindingExtensions` NuGet package to your binding project:
The binding build process is extended to obtain and build native SDK dependencies by adding the `CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks` NuGet package to your binding project:

```xml
<ItemGroup>
<PackageReference Include="CommunityToolkit.Maui.BindingExtensions" Version="0.0.1-pre1" />
<PackageReference Include="CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks" Version="0.0.1-pre1" />
</ItemGroup>
```

Android binding projects will also add a `@(GradleProjectReference)` item that points to the root folder that contains their gradle project:
Android binding projects will also add a `@(NLIGradleProjectReference)` item that points to the root folder that contains their gradle project:

```xml
<ItemGroup>
<GradleProjectReference Include="../native" >
<NLIGradleProjectReference Include="../native" >
<ModuleName>mauifacebook</ModuleName>
</GradleProjectReference>
</NLIGradleProjectReference>
</ItemGroup>
```

iOS binding projects will also add a `@(XcodeProjectReference)` item that points to their Xcode project:
iOS binding projects will also add a `@(NLIXcodeProjectReference)` item that points to their Xcode project:

```xml
<XcodeProjectReference Include="../native/MauiFacebook.xcodeproj">
<NLIXcodeProjectReference Include="../native/MauiFacebook.xcodeproj">
<SchemeName>MauiFacebook</SchemeName>
<SharpieNamespace>Facebook</SharpieNamespace>
<SharpieBind>true</SharpieBind>
</XcodeProjectReference>
</NLIXcodeProjectReference>
```

In the [```src/```](/src/) folder you will find the sources for the NuGet and these custom build tasks/targets.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CommunityToolkit.Maui.BindingExtensions" Version="$(BindingExtPackageVersion)" />
<PackageReference Include="CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks" Version="$(NLIPackageVersion)" />
</ItemGroup>

<ItemGroup>
<GradleProjectReference Include="../native" >
<NLIGradleProjectReference Include="../native" >
<ModuleName>mauifacebook</ModuleName>
<!-- Metadata applicable to @(AndroidLibrary) will be used if set, otherwise the following defaults will be used:
<Bind>true</Bind>
<Pack>true</Pack>
-->
</GradleProjectReference>
</NLIGradleProjectReference>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CommunityToolkit.Maui.BindingExtensions" Version="$(BindingExtPackageVersion)" />
<PackageReference Include="CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks" Version="$(NLIPackageVersion)" />
</ItemGroup>

<ItemGroup>
<ObjcBindingApiDefinition Include="ApiDefinitions.cs"/>
<XcodeProjectReference Include="../native/MauiFacebook.xcodeproj">
<NLIXcodeProjectReference Include="../native/MauiFacebook.xcodeproj">
<SchemeName>MauiFacebook</SchemeName>
<SharpieNamespace>Facebook</SharpieNamespace>
<SharpieBind>true</SharpieBind>
<!-- Metadata applicable to @(NativeReference) will be used if set, otherwise the following defaults will be used:
<Kind>Framework</Kind>
<SmartLink>true</SmartLink>
-->
</XcodeProjectReference>
</NLIXcodeProjectReference>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CommunityToolkit.Maui.BindingExtensions" Version="$(BindingExtPackageVersion)" />
<PackageReference Include="CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks" Version="$(NLIPackageVersion)" />
</ItemGroup>

<ItemGroup>
<ObjcBindingApiDefinition Include="ApiDefinitions.cs" />
<XcodeProjectReference Include="../native/MauiFirebase.xcodeproj">
<NLIXcodeProjectReference Include="../native/MauiFirebase.xcodeproj">
<SchemeName>MauiFirebase</SchemeName>
<SharpieNamespace>Firebase</SharpieNamespace>
<SharpieBind>true</SharpieBind>
<!-- Metadata applicable to @(NativeReference) will be used if set, otherwise the following defaults will be used:
<Kind>Framework</Kind>
<SmartLink>true</SmartLink>
-->
</XcodeProjectReference>
</NLIXcodeProjectReference>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CommunityToolkit.Maui.BindingExtensions" Version="$(BindingExtPackageVersion)" />
<PackageReference Include="CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks" Version="$(NLIPackageVersion)" />
</ItemGroup>

<ItemGroup>
<ObjcBindingApiDefinition Include="ApiDefinitions.cs" />
<XcodeProjectReference Include="../native/MauiGoogleCast.xcodeproj">
<NLIXcodeProjectReference Include="../native/MauiGoogleCast.xcodeproj">
<SchemeName>MauiGoogleCast</SchemeName>
<SharpieNamespace>GoogleCast</SharpieNamespace>
<SharpieBind>false</SharpieBind>
<!-- Metadata applicable to @(NativeReference) will be used if set, otherwise the following defaults will be used:
<Kind>Framework</Kind>
<SmartLink>true</SmartLink>
-->
</XcodeProjectReference>
</NLIXcodeProjectReference>
</ItemGroup>

<Target Name="NativeDependencies">
Expand Down
4 changes: 2 additions & 2 deletions nuget.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="maui-binding-extensions" value="https://pkgs.dev.azure.com/xamarin/public/_packaging/maui-binding-extensions/nuget/v3/index.json" />
<!--add key="local" value="src/CommunityToolkit.Maui.BindingExtensions/bin/Release/" /-->
<add key="maui-nativelibraryinterop" value="https://pkgs.dev.azure.com/xamarin/public/_packaging/maui-nativelibraryinterop/nuget/v3/index.json" />
<!--add key="local" value="src/CommunityToolkit.Maui.NativeLibraryInterop.BuildTasks/bin/Release/" /-->
</packageSources>
</configuration>

This file was deleted.

Loading

0 comments on commit 6956d73

Please sign in to comment.