Skip to content

Commit

Permalink
Integrated cake build system, switch sdk style project file for Andro…
Browse files Browse the repository at this point in the history
…id and iOS
  • Loading branch information
ryancheung committed Mar 18, 2020
1 parent d037383 commit 1f58393
Show file tree
Hide file tree
Showing 20 changed files with 666 additions and 200 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -373,3 +373,7 @@ Temporary Items

# Project
.vscode

# Cake
tools/**
!tools/packages.config
23 changes: 23 additions & 0 deletions FreeTypeSharp.Android/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<Project>

<PropertyGroup>
<ProjectPlatform>Android</ProjectPlatform>
<BaseIntermediateOutputPath>obj\$(ProjectPlatform)</BaseIntermediateOutputPath>
<BaseOutputPath>..\Artifacts\$(ProjectPlatform)</BaseOutputPath>
<RootNamespace>FreeTypeSharp</RootNamespace>
<AssemblyName>FreeTypeSharp.$(ProjectPlatform)</AssemblyName>
<PackageId>FreeTypeSharp.$(ProjectPlatform)</PackageId>
<PackageProjectUrl>https://github.com/ryancheung/FreeTypeSharp</PackageProjectUrl>
<RepositoryUrl>https://github.com/ryancheung/FreeTypeSharp</RepositoryUrl>
<Authors>ryancheung</Authors>
<Copyright>Copyright (c) 2020 ryancheung</Copyright>
<Title>FreeTypeSharp.$(ProjectPlatform)</Title>
<PackageTags>freetype2 xamarin.android</PackageTags>
<Description>
A moden cross-platform managed FreeType2 library. This package provides you with managed FreeType2 on Android.
</Description>

<LangVersion>latest</LangVersion>
</PropertyGroup>

</Project>
61 changes: 15 additions & 46 deletions FreeTypeSharp.Android/FreeTypeSharp.Android.csproj
Original file line number Diff line number Diff line change
@@ -1,41 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="MSBuild.Sdk.Extras">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{A1BB0D95-50CA-4FFF-B5D1-AE16A99FE906}</ProjectGuid>
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TemplateGuid>{9ef11e43-1701-4396-8835-8392d57abb70}</TemplateGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FreeTypeSharp</RootNamespace>
<AssemblyName>FreeTypeSharp.Android</AssemblyName>
<FileAlignment>512</FileAlignment>
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<TargetFrameworkVersion>v9.0</TargetFrameworkVersion>
<AndroidUseAapt2>true</AndroidUseAapt2>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>portable</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;ANDROID</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;ANDROID</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TargetFramework>monoandroid90</TargetFramework>
<DefineConstants>ANDROID;</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<Compile Remove="bin\**\*" />
<Compile Remove="obj\**\*" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Mono.Android" />
Expand All @@ -45,9 +19,6 @@
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Android.Support.v7.AppCompat" Version="28.0.0.3" />
</ItemGroup>
Expand All @@ -57,13 +28,11 @@
<EmbeddedNativeLibrary Include="..\Dependencies\FreeType2\android\x86\libfreetype.so" Link="libs\x86\libfreetype.so" />
<EmbeddedNativeLibrary Include="..\Dependencies\FreeType2\android\x86_64\libfreetype.so" Link="libs\x86_64\libfreetype.so" />
</ItemGroup>

<ItemGroup>
<None Include="..\LICENSE.txt" Pack="true" />
</ItemGroup>

<Import Project="..\FreeTypeSharp.Shared\FreeTypeSharp.Shared.projitems" Label="Shared" Condition="Exists('..\FreeTypeSharp.Shared\FreeTypeSharp.Shared.projitems')" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->

</Project>
30 changes: 0 additions & 30 deletions FreeTypeSharp.Android/Properties/AssemblyInfo.cs

This file was deleted.

41 changes: 0 additions & 41 deletions FreeTypeSharp.Android/Resources/Resource.designer.cs

This file was deleted.

5 changes: 5 additions & 0 deletions FreeTypeSharp.Android/global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"msbuild-sdks": {
"MSBuild.Sdk.Extras": "2.0.54"
}
}
23 changes: 23 additions & 0 deletions FreeTypeSharp.Core/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<Project>

<PropertyGroup>
<ProjectPlatform>Core</ProjectPlatform>
<BaseIntermediateOutputPath>obj\$(ProjectPlatform)</BaseIntermediateOutputPath>
<BaseOutputPath>..\Artifacts\$(ProjectPlatform)</BaseOutputPath>
<RootNamespace>FreeTypeSharp</RootNamespace>
<AssemblyName>FreeTypeSharp.$(ProjectPlatform)</AssemblyName>
<PackageId>FreeTypeSharp.$(ProjectPlatform)</PackageId>
<PackageProjectUrl>https://github.com/ryancheung/FreeTypeSharp</PackageProjectUrl>
<RepositoryUrl>https://github.com/ryancheung/FreeTypeSharp</RepositoryUrl>
<Authors>ryancheung</Authors>
<Copyright>Copyright (c) 2020 ryancheung</Copyright>
<Title>FreeTypeSharp.$(ProjectPlatform)</Title>
<PackageTags>freetype2 netstandard2.0</PackageTags>
<Description>
A moden cross-platform managed FreeType2 library. This package provides you with managed FreeType2 on Windows, Linux and MacOS.
</Description>

<LangVersion>latest</LangVersion>
</PropertyGroup>

</Project>
33 changes: 28 additions & 5 deletions FreeTypeSharp.Core/FreeTypeSharp.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;netstandard2.0</TargetFrameworks>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
Expand All @@ -15,12 +15,35 @@
</PropertyGroup>

<ItemGroup>
<None Include="..\Dependencies\FreeType2\windows\x64\freetype.dll" Link="nuget\runtimes\win-x64\native\freetype.dll" Condition=" Exists('..\Dependencies\FreeType2\windows\x64\freetype.dll') " />
<None Include="..\Dependencies\FreeType2\windows\x86\freetype.dll" Link="nuget\runtimes\win-x86\native\freetype.dll" Condition=" Exists('..\Dependencies\FreeType2\windows\x86\freetype.dll') " />
<Content Include="..\Dependencies\FreeType2\windows\x86\freetype.dll">
<Link>runtimes\win-x86\native\freetype.dll</Link>
<Pack>true</Pack>
<PackagePath>runtimes\win-x86\native\freetype.dll</PackagePath>
</Content>
<Content Include="..\Dependencies\FreeType2\windows\x64\freetype.dll">
<Link>runtimes\win-x64\native\freetype.dll</Link>
<Pack>true</Pack>
<PackagePath>runtimes\win-x64\native\freetype.dll</PackagePath>
</Content>

<None Include="..\Dependencies\FreeType2\osx\libfreetype.dylib" Link="nuget\runtimes\osx\native\libfreetype.dylib" Condition=" Exists('..\Dependencies\FreeType2\osx\libfreetype.dylib') " />
<Content Include="..\Dependencies\FreeType2\osx\libfreetype.dylib">
<Link>runtimes\osx\native\libfreetype.dylib</Link>
<Pack>true</Pack>
<PackagePath>runtimes\osx\native\libfreetype.dylib</PackagePath>
</Content>

<None Include="..\Dependencies\FreeType2\linux\x64\libfreetype.so" Link="nuget\runtimes\linux-x64\native\libfreetype.so" Condition=" Exists('..\Dependencies\FreeType2\linux\x64\libfreetype.so') " />
<Content Include="..\Dependencies\FreeType2\linux\x64\libfreetype.so">
<Link>runtimes\linux-x64\native\libfreetype.so</Link>
<Pack>true</Pack>
<PackagePath>runtimes\linux-x64\native\libfreetype.so</PackagePath>
</Content>
</ItemGroup>

<ItemGroup>
<None Include="..\build\FreeTypeSharp.Core.targets" Pack="true" PackagePath="build\net462" />
<None Include="..\build\FreeTypeSharp.Core.targets" Pack="true" PackagePath="build\netstandard2.0" />

<None Include="..\LICENSE.txt" Pack="true" />
</ItemGroup>

<Import Project="..\FreeTypeSharp.Shared\FreeTypeSharp.Shared.projitems" Label="Shared" Condition="Exists('..\FreeTypeSharp.Shared\FreeTypeSharp.Shared.projitems')" />
Expand Down
3 changes: 1 addition & 2 deletions FreeTypeSharp.iOS/ApiDefinition.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;

using ObjCRuntime;
using Foundation;
Expand Down Expand Up @@ -63,4 +63,3 @@ namespace FreeTypeSharp
// For more information, see https://aka.ms/ios-binding
//
}

24 changes: 24 additions & 0 deletions FreeTypeSharp.iOS/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<Project>

<PropertyGroup>
<ProjectPlatform>iOS</ProjectPlatform>
<BaseIntermediateOutputPath>obj\$(ProjectPlatform)</BaseIntermediateOutputPath>
<BaseOutputPath>..\Artifacts\$(ProjectPlatform)</BaseOutputPath>
<OutputPath>..\Artifacts\$(ProjectPlatform)\$(Configuration)</OutputPath>
<RootNamespace>FreeTypeSharp</RootNamespace>
<AssemblyName>FreeTypeSharp.$(ProjectPlatform)</AssemblyName>
<PackageId>FreeTypeSharp.$(ProjectPlatform)</PackageId>
<PackageProjectUrl>https://github.com/ryancheung/FreeTypeSharp</PackageProjectUrl>
<RepositoryUrl>https://github.com/ryancheung/FreeTypeSharp</RepositoryUrl>
<Authors>ryancheung</Authors>
<Copyright>Copyright (c) 2020 ryancheung</Copyright>
<Title>FreeTypeSharp.$(ProjectPlatform)</Title>
<PackageTags>freetype2 xamarin.ios</PackageTags>
<Description>
A moden cross-platform managed FreeType2 library. This package provides you with managed FreeType2 on iOS.
</Description>

<LangVersion>latest</LangVersion>
</PropertyGroup>

</Project>
53 changes: 17 additions & 36 deletions FreeTypeSharp.iOS/FreeTypeSharp.iOS.csproj
Original file line number Diff line number Diff line change
@@ -1,51 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="MSBuild.Sdk.Extras">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectTypeGuids>{8FFB629D-F513-41CE-95D2-7ECE97B6EEEC};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectGuid>{8D016D01-EFC6-4745-BBDE-AD66CCD36690}</ProjectGuid>
<TemplateGuid>{b6f3ff35-79b2-4f25-a2fc-60a7cf61013b}</TemplateGuid>
<OutputType>Library</OutputType>
<RootNamespace>FreeTypeSharp</RootNamespace>
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
<AssemblyName>FreeTypeSharp.iOS</AssemblyName>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TargetFramework>xamarinios10</TargetFramework>
<DefineConstants>__IOS__;IOS;</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>
</PropertyGroup>

<ItemGroup>
<Reference Include="System" />
<Reference Include="Xamarin.iOS" />
</ItemGroup>

<ItemGroup>
<Folder Include="Resources\" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Remove="bin\**\*" />
<Compile Remove="obj\**\*" />
<Compile Remove="Properties\**\*" />
</ItemGroup>

<ItemGroup>
<ObjcBindingApiDefinition Include="ApiDefinition.cs" />
</ItemGroup>
<ItemGroup>
<ObjcBindingCoreSource Include="Structs.cs" />
</ItemGroup>

<ItemGroup>
<NativeReference Include="..\Dependencies\FreeType2\ios\libfreetype.a">
<Kind>Static</Kind>
Expand All @@ -54,6 +30,11 @@
<LinkerFlags>-lbz2</LinkerFlags>
</NativeReference>
</ItemGroup>

<ItemGroup>
<None Include="..\LICENSE.txt" Pack="true" />
</ItemGroup>

<Import Project="..\FreeTypeSharp.Shared\FreeTypeSharp.Shared.projitems" Label="Shared" Condition="Exists('..\FreeTypeSharp.Shared\FreeTypeSharp.Shared.projitems')" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.ObjCBinding.CSharp.targets" />
</Project>
Loading

0 comments on commit 1f58393

Please sign in to comment.