-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use Smdn.MSBuild.ProjectAssets.Library
- Loading branch information
Showing
11 changed files
with
250 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
* text=auto | ||
|
||
*.sln text eol=crlf | ||
*.csproj text eol=crlf | ||
*.vbproj text eol=crlf | ||
*.proj text eol=crlf | ||
*.targets text eol=crlf | ||
*.props text eol=crlf | ||
*.ruleset text eol=crlf | ||
*.resx text eol=crlf | ||
*.runsettings text eol=crlf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
/build/ | ||
bin/ | ||
obj/ | ||
*.userprefs | ||
external/mecab/mecab/ | ||
external/mecab/mecab-*/ | ||
.vs/ | ||
TestResult.xml | ||
TestResults/ | ||
mono_crash.mem.*.blob | ||
mono_crash.*.json | ||
|
||
# automatically generated files from Smdn.MSBuild.ProjectAssets.* | ||
.editorconfig | ||
src/.editorconfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2021 smdn <smdn@smdn.jp> | ||
SPDX-License-Identifier: MIT | ||
--> | ||
<Project> | ||
<PropertyGroup> | ||
<SmdnBuildAssetRootDirectory>$(MSBuildThisFileDirectory)..\</SmdnBuildAssetRootDirectory> | ||
</PropertyGroup> | ||
|
||
<ImportGroup Label="project assets"> | ||
<Import Project="$(MSBuildThisFileDirectory)ProjectAssets.props" /> | ||
</ImportGroup> | ||
|
||
<PropertyGroup Label="API list generator configurations"> | ||
<APIListOutputBaseDirectory>$(MSBuildThisFileDirectory)..\doc\api-list\</APIListOutputBaseDirectory> | ||
<APIListPackageVersion>1.1.5</APIListPackageVersion> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Label="package properties"> | ||
<PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
<PackageProjectUrl>https://github.com/smdn/Smdn.Text.Ondulish</PackageProjectUrl> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Label="repository properties" Condition="'$(GITHUB_ACTIONS)' != 'true'"> | ||
<RepositoryUrl>https://github.com/smdn/Smdn.Text.Ondulish</RepositoryUrl> | ||
<RepositoryType>git</RepositoryType> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference | ||
Include="Smdn.MSBuild.DefineConstants.NETSdkApi" | ||
Version="1.3.6" | ||
PrivateAssets="all" | ||
IncludeAssets="build" | ||
/> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2021 smdn <smdn@smdn.jp> | ||
SPDX-License-Identifier: MIT | ||
--> | ||
<Project> | ||
<ImportGroup Label="project assets"> | ||
<Import Project="$(SmdnProjectAssets_TargetsImports)" /> | ||
</ImportGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2022 smdn <smdn@smdn.jp> | ||
SPDX-License-Identifier: MIT | ||
--> | ||
<Project> | ||
<PropertyGroup> | ||
<SmdnProjectAssets_Common_PackageVersion Condition=" '$(SmdnProjectAssets_Common_PackageVersion)' == '' ">1.1.3</SmdnProjectAssets_Common_PackageVersion> | ||
<SmdnProjectAssets_Library_PackageVersion Condition=" '$(SmdnProjectAssets_Library_PackageVersion)' == '' ">1.3.1</SmdnProjectAssets_Library_PackageVersion> | ||
</PropertyGroup> | ||
|
||
<!-- | ||
NuGetPackageRoot is not set until `pack` or `restore` is executed, so set an alternative default path here | ||
ref: https://github.com/NuGet/Home/issues/9150 | ||
--> | ||
<PropertyGroup> | ||
<_NuGetPackageAltRoot>$(NuGetPackageRoot)</_NuGetPackageAltRoot> | ||
<_NuGetPackageAltRoot Condition="('$(_NuGetPackageAltRoot)' == '') and ('$(NUGET_PACKAGES)' != '')">$(NUGET_PACKAGES)\</_NuGetPackageAltRoot> | ||
<_NuGetPackageAltRoot Condition="('$(_NuGetPackageAltRoot)' == '') and $([MSBuild]::IsOSUnixLike())">$(HOME)\.nuget\packages\</_NuGetPackageAltRoot> | ||
<_NuGetPackageAltRoot Condition="('$(_NuGetPackageAltRoot)' == '')">$(USERPROFILE)\.nuget\packages\</_NuGetPackageAltRoot> | ||
</PropertyGroup> | ||
|
||
<!-- | ||
Set the path to *.props/*targets files of asset library according to the switching property. | ||
--> | ||
<PropertyGroup> | ||
<_SmdnProjectAssets_Common_PathToPackageRoot Condition=" '$(_SmdnProjectAssets_Common_PathToPackageRoot)' == '' ">$(_NuGetPackageAltRoot)smdn.msbuild.projectassets.common\$(SmdnProjectAssets_Common_PackageVersion)\</_SmdnProjectAssets_Common_PathToPackageRoot> | ||
<_SmdnProjectAssets_Library_PathToPackageRoot Condition=" '$(_SmdnProjectAssets_Library_PathToPackageRoot)' == '' ">$(_NuGetPackageAltRoot)smdn.msbuild.projectassets.library\$(SmdnProjectAssets_Library_PackageVersion)\</_SmdnProjectAssets_Library_PathToPackageRoot> | ||
</PropertyGroup> | ||
|
||
<!-- | ||
Importing by *.nuget.g.props/*.nuget.g.targets file does not properly set the properties defined in the asset library, | ||
so do not use PackageReference with IncludeAssets, and import *.props/*targets manually instead. | ||
--> | ||
<ItemGroup> | ||
<PackageDownload | ||
Include="Smdn.MSBuild.ProjectAssets.Common" | ||
Version="[$(SmdnProjectAssets_Common_PackageVersion)]" | ||
/> | ||
<PackageDownload | ||
Include="Smdn.MSBuild.ProjectAssets.Library" | ||
Version="[$(SmdnProjectAssets_Library_PackageVersion)]" | ||
/> | ||
</ItemGroup> | ||
|
||
<!-- | ||
Import *.props files. | ||
--> | ||
<Import Project="$(_SmdnProjectAssets_Common_PathToPackageRoot)project\Project.props" /> | ||
<Import Project="$(_SmdnProjectAssets_Library_PathToPackageRoot)project\Project.props" /> | ||
|
||
<!-- | ||
Define the path to *.targets files to be imported. | ||
--> | ||
<PropertyGroup> | ||
<SmdnProjectAssets_TargetsImports>$(SmdnProjectAssets_TargetsImports);$(_SmdnProjectAssets_Common_PathToPackageRoot)project\Project.targets</SmdnProjectAssets_TargetsImports> | ||
<SmdnProjectAssets_TargetsImports>$(SmdnProjectAssets_TargetsImports);$(_SmdnProjectAssets_Library_PathToPackageRoot)project\Project.targets</SmdnProjectAssets_TargetsImports> | ||
</PropertyGroup> | ||
</Project> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2021 smdn <smdn@smdn.jp> | ||
SPDX-License-Identifier: MIT | ||
--> | ||
<Project> | ||
<!-- This is required to restore Smdn.MSBuild.ProjectAssets.* when test projects are attempted to built directly. (ex: on CI) --> | ||
<ImportGroup Label="project assets"> | ||
<Import Project="$(MSBuildThisFileDirectory)..\src\ProjectAssets.props" /> | ||
</ImportGroup> | ||
|
||
<PropertyGroup Condition=" '$(IsTestProject)' == 'true' "> | ||
<Nullable>warnings</Nullable> | ||
|
||
<SmdnTestTargetProjectDirectory | ||
Condition=" '$(SmdnTestTargetProjectName)' != '' " | ||
>$(MSBuildThisFileDirectory)..\src\$(SmdnTestTargetProjectName)\</SmdnTestTargetProjectDirectory> | ||
<SmdnTestTargetProjectFullPath | ||
Condition=" '$(SmdnTestTargetProjectName)' != '' " | ||
>$(SmdnTestTargetProjectDirectory)$(SmdnTestTargetProjectName).csproj</SmdnTestTargetProjectFullPath> | ||
</PropertyGroup> | ||
|
||
<Import | ||
Condition=" '$(IsTestProject)' == 'true' " | ||
Project="$(MSBuildThisFileDirectory)TargetFrameworks.props" | ||
/> | ||
|
||
<ItemGroup Condition=" '$(IsTestProject)' == 'true' "> | ||
<PackageReference Include="NUnit" Version="3.13.2" /> | ||
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" /> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0"/> | ||
</ItemGroup> | ||
|
||
<ItemGroup Label="add test target project reference"> | ||
<ProjectReference | ||
Condition=" '$(SmdnTestTargetProjectFullPath)' != '' and Exists('$(SmdnTestTargetProjectFullPath)') " | ||
Include="$(SmdnTestTargetProjectFullPath)" | ||
/> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2022 smdn <smdn@smdn.jp> | ||
SPDX-License-Identifier: MIT | ||
--> | ||
<Project> | ||
<ItemGroup> | ||
<PackageReference Update="Smdn.Test.NUnit.Constraints" Version="1.0.0" /> | ||
<PackageReference Update="Smdn.Test.NUnit.Utils" Version="1.0.0" /> | ||
</ItemGroup> | ||
|
||
<PropertyGroup> | ||
<CanTestReleasedPackage Condition=" '$(CanTestReleasedPackage)' == '' ">true</CanTestReleasedPackage> | ||
</PropertyGroup> | ||
|
||
<Choose> | ||
<When Condition=" '$(TestReleasedPackage)' == 'true' and '$(CanTestReleasedPackage)' == 'true' "> | ||
<ItemGroup Label="add test target package reference"> | ||
<PackageReference | ||
Condition=" '$(SmdnTestTargetProjectName)' != '' " | ||
Include="$(SmdnTestTargetProjectName)" | ||
Version="*-*" | ||
/> | ||
</ItemGroup> | ||
</When> | ||
<Otherwise> | ||
<ItemGroup Label="add test target project reference"> | ||
<ProjectReference | ||
Condition=" '$(SmdnTestTargetProjectFullPath)' != '' and Exists('$(SmdnTestTargetProjectFullPath)') " | ||
Include="$(SmdnTestTargetProjectFullPath)" | ||
/> | ||
</ItemGroup> | ||
</Otherwise> | ||
</Choose> | ||
|
||
<Target | ||
Name="WarnCannotTestReleasedPackage" | ||
BeforeTargets="BeforeBuild" | ||
Condition=" '$(TestReleasedPackage)' == 'true' and '$(CanTestReleasedPackage)' != 'true' " | ||
> | ||
<Warning Text="cannot test with released package"/> | ||
</Target> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,7 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFrameworks>net6.0</TargetFrameworks> | ||
<LangVersion>latest</LangVersion> | ||
<TargetFrameworks Condition=" '$(EnableTargetFrameworkDotNet)' == 'true' ">net6.0</TargetFrameworks> | ||
<TargetFrameworks Condition=" '$(EnableTargetFrameworkNetCoreApp)' == 'true' ">$(TargetFrameworks)</TargetFrameworks> | ||
<TargetFrameworks Condition=" '$(EnableTargetFrameworkNetFx)' == 'true' ">$(TargetFrameworks)</TargetFrameworks> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="NUnit" Version="3.12.0" /> | ||
<PackageReference Include="NUnitLite" Version="3.12.0" /> | ||
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1" /> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\Smdn.Text.Ondulish\Smdn.Text.Ondulish.csproj" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2022 smdn <smdn@smdn.jp> | ||
SPDX-License-Identifier: MIT | ||
--> | ||
<Project> | ||
<PropertyGroup> | ||
<!-- enable target framework net* (.NET >= 5.0) by default --> | ||
<EnableTargetFrameworkDotNet>true</EnableTargetFrameworkDotNet> | ||
<!-- enable target framework netcoreapp* by default --> | ||
<EnableTargetFrameworkNetCoreApp>true</EnableTargetFrameworkNetCoreApp> | ||
<!-- enable target framework net* (.NET Framework/Mono) by default --> | ||
<EnableTargetFrameworkNetFx>true</EnableTargetFrameworkNetFx> | ||
</PropertyGroup> | ||
|
||
<!-- On Ubuntu 22.04 --> | ||
<PropertyGroup | ||
Condition=" $([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier.StartsWith('ubuntu.22.04')) " | ||
> | ||
<!-- disable .NET Core (cannot run .NET Core on Ubuntu 22.04) --> | ||
<EnableTargetFrameworkNetCoreApp>false</EnableTargetFrameworkNetCoreApp> | ||
<!-- disable Mono (test runner not working on local environment?) --> | ||
<EnableTargetFrameworkNetFx>false</EnableTargetFrameworkNetFx> | ||
</PropertyGroup> | ||
|
||
<!-- On Ubuntu 20.04 --> | ||
<PropertyGroup | ||
Condition=" $([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier.StartsWith('ubuntu.20.04')) " | ||
> | ||
<!-- enable Mono on GitHub Actions --> | ||
<EnableTargetFrameworkNetFx Condition=" '$(GITHUB_ACTIONS)' == 'true' ">true</EnableTargetFrameworkNetFx> | ||
</PropertyGroup> | ||
</Project> |