Commit a1ea6121 authored by Vinicius Jarina's avatar Vinicius Jarina
Browse files

Added UWP support.

parent 1a39e4db
......@@ -34,3 +34,4 @@ tests/build/xamarinios/obj/
tests/build/xamarintvos/obj/
tests/build/xamarintvos/bin/
tests/build/xamarinios/bin/
build/uap10.0/obj/

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29806.167
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NLua", "NLua", "{4A43DAAC-F9FF-4EB1-BFBD-FB4655CCE1F7}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "NLua.Shared", "src\NLua.Shared.shproj", "{BD205AD6-760E-48F3-BAB2-21447396BD17}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{BDBA9844-3BD3-436C-AB8A-8E78C810A710}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D432F663-23CC-48B1-A413-935E5393493C}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NLua.UWP", "build\uap10.0\NLua.UWP.csproj", "{01873689-C719-45A1-8D90-8AE2F1BBF001}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
src\NLua.Shared.projitems*{01873689-c719-45a1-8d90-8ae2f1bbf001}*SharedItemsImports = 4
src\NLua.Shared.projitems*{bd205ad6-760e-48f3-bab2-21447396bd17}*SharedItemsImports = 13
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{01873689-C719-45A1-8D90-8AE2F1BBF001}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{01873689-C719-45A1-8D90-8AE2F1BBF001}.Debug|Any CPU.Build.0 = Debug|Any CPU
{01873689-C719-45A1-8D90-8AE2F1BBF001}.Release|Any CPU.ActiveCfg = Release|Any CPU
{01873689-C719-45A1-8D90-8AE2F1BBF001}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{BD205AD6-760E-48F3-BAB2-21447396BD17} = {4A43DAAC-F9FF-4EB1-BFBD-FB4655CCE1F7}
{01873689-C719-45A1-8D90-8AE2F1BBF001} = {4A43DAAC-F9FF-4EB1-BFBD-FB4655CCE1F7}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4720E610-698B-48DD-BBD7-03AC99E9BC90}
EndGlobalSection
EndGlobal
......@@ -15,7 +15,7 @@
<copyright>Copyright © NLua 2020</copyright>
<tags>lua nlua</tags>
<dependencies>
<dependency id="KeraLua" version="1.0.26" />
<dependency id="KeraLua" version="1.0.27" />
</dependencies>
</metadata>
<files>
......
......@@ -39,13 +39,13 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<Reference Include="KeraLua, Version=1.0.27.0, Culture=neutral, PublicKeyToken=6a194c04b9c89217, processorArchitecture=MSIL">
<HintPath>..\..\packages\KeraLua.1.0.27\lib\MonoAndroid\KeraLua.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Mono.Android" />
<Reference Include="KeraLua">
<HintPath>..\..\packages\KeraLua.1.0.26\lib\MonoAndroid\KeraLua.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
......
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="KeraLua" version="1.0.26" targetFramework="monoandroid81" />
<package id="KeraLua" version="1.0.27" targetFramework="monoandroid81" />
</packages>
\ No newline at end of file
......@@ -46,13 +46,13 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<Reference Include="KeraLua, Version=1.0.27.0, Culture=neutral, PublicKeyToken=6a194c04b9c89217, processorArchitecture=MSIL">
<HintPath>..\..\packages\KeraLua.1.0.27\lib\xamarintvos\KeraLua.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.TVOS" />
<Reference Include="KeraLua">
<HintPath>..\..\packages\KeraLua.1.0.26\lib\xamarintvos\KeraLua.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
......
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="KeraLua" version="1.0.26" targetFramework="xamarintvos10" />
<package id="KeraLua" version="1.0.27" targetFramework="xamarintvos10" />
</packages>
\ No newline at end of file
......@@ -44,13 +44,13 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<Reference Include="KeraLua, Version=1.0.27.0, Culture=neutral, PublicKeyToken=6a194c04b9c89217, processorArchitecture=MSIL">
<HintPath>..\..\packages\KeraLua.1.0.27\lib\xamarinwatchos\KeraLua.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.WatchOS" />
<Reference Include="KeraLua">
<HintPath>..\..\packages\KeraLua.1.0.26\lib\xamarinwatchos\KeraLua.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
......
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="KeraLua" version="1.0.26" targetFramework="xamarinwatchos10" />
<package id="KeraLua" version="1.0.27" targetFramework="xamarinwatchos10" />
</packages>
\ No newline at end of file
......@@ -56,12 +56,12 @@
<AOTMode>None</AOTMode>
</PropertyGroup>
<ItemGroup>
<Reference Include="KeraLua, Version=1.0.27.0, Culture=neutral, PublicKeyToken=6a194c04b9c89217, processorArchitecture=MSIL">
<HintPath>..\..\packages\KeraLua.1.0.27\lib\xamarinmac\KeraLua.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.Mac" />
<Reference Include="KeraLua">
<HintPath>..\..\packages\KeraLua.1.0.26\lib\xamarinmac\KeraLua.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
......
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="KeraLua" version="1.0.26" targetFramework="xamarinmac20" />
<package id="KeraLua" version="1.0.27" targetFramework="xamarinmac20" />
</packages>
\ No newline at end of file
......@@ -50,13 +50,13 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<Reference Include="KeraLua, Version=1.0.27.0, Culture=neutral, PublicKeyToken=6a194c04b9c89217, processorArchitecture=MSIL">
<HintPath>..\..\packages\KeraLua.1.0.27\lib\xamarinios\KeraLua.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Xamarin.iOS" />
<Reference Include="KeraLua">
<HintPath>..\..\packages\KeraLua.1.0.26\lib\xamarinios\KeraLua.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
......
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="KeraLua" version="1.0.26" targetFramework="xamarinios10" />
<package id="KeraLua" version="1.0.27" targetFramework="xamarinios10" />
</packages>
\ No newline at end of file
......@@ -32,10 +32,10 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="KeraLua">
<HintPath>..\..\packages\KeraLua.1.0.26\lib\net45\KeraLua.dll</HintPath>
<Reference Include="KeraLua, Version=1.0.27.0, Culture=neutral, PublicKeyToken=6a194c04b9c89217, processorArchitecture=MSIL">
<HintPath>..\..\packages\KeraLua.1.0.27\lib\net45\KeraLua.dll</HintPath>
</Reference>
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
......@@ -43,5 +43,11 @@
<Import Project="..\..\src\NLua.Shared.projitems" Label="Shared" Condition="Exists('..\..\src\NLua.Shared.projitems')" />
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="..\targets\NLua.Sign.targets" />
<Import Project="..\..\packages\KeraLua.1.0.26\build\net45\KeraLua.targets" Condition="Exists('..\..\packages\KeraLua.1.0.26\build\net45\KeraLua.targets')" />
<Import Project="..\..\packages\KeraLua.1.0.27\build\net45\KeraLua.targets" Condition="Exists('..\..\packages\KeraLua.1.0.27\build\net45\KeraLua.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\KeraLua.1.0.27\build\net45\KeraLua.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\KeraLua.1.0.27\build\net45\KeraLua.targets'))" />
</Target>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="KeraLua" version="1.0.26" targetFramework="net45" />
<package id="KeraLua" version="1.0.27" targetFramework="net45" />
</packages>
\ No newline at end of file
......@@ -20,7 +20,7 @@
</PropertyGroup>
<Import Project="..\..\src\NLua.Shared.projitems" Label="Shared" Condition="Exists('..\..\src\NLua.Shared.projitems')" />
<ItemGroup>
<PackageReference Include="KeraLua" Version="1.0.26" />
<PackageReference Include="KeraLua" Version="1.0.27" />
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
<PackageReference Include="System.Reflection.Emit.ILGeneration" Version="4.7.0" />
</ItemGroup>
......
......@@ -24,7 +24,7 @@
<Import Project="..\..\src\NLua.Shared.projitems" Label="Shared" />
<ItemGroup>
<PackageReference Include="KeraLua" Version="1.0.26" />
<PackageReference Include="KeraLua" Version="1.0.27" />
<PackageReference Include="NUnit" Version="3.12.0" />
</ItemGroup>
......
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{01873689-C719-45A1-8D90-8AE2F1BBF001}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>NLua</RootNamespace>
<AssemblyName>NLua</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.18362.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\lib\Debug\uap10.0\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<Optimize>true</Optimize>
<OutputPath>..\..\lib\Release\uap10.0\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="KeraLua">
<Version>1.0.27</Version>
</PackageReference>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>6.2.9</Version>
</PackageReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="..\..\src\NLua.Shared.projitems" Label="Shared" Condition="Exists('..\..\src\NLua.Shared.projitems')" />
<Import Project="..\targets\NLua.Sign.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
</Project>
\ No newline at end of file
......@@ -28,20 +28,6 @@ function Test-Should-Deploy ()
return $false
}
function Get-Published-PreRelase-Package ($PackageId)
{
$out = [string](nuget list -PreRelease id:$PackageId)
$version = $out.Split(' ')[1]
return $version
}
function Get-Published-Package ($PackageId)
{
$out = [string](nuget list id:$PackageId)
$version = $out.Split(' ')[1]
return $version
}
function Get-Git-Package-Version ()
{
Update-Ensure-Git-Not-Detached
......@@ -69,7 +55,7 @@ function Update-NuSpec-Release-Notes($File, $releaseNotes)
$releaseNotesPath = "package.metadata.releaseNotes"
if ($releaseNotes -ne $null -and $releaseNotes -ne "") {
if ($null -ne $releaseNotes -and $releaseNotes -ne "") {
Set-XmlElementsTextValue -XmlDocument $fileContents -ElementPath $releaseNotesPath -TextValue $releaseNotes
}
$fileContents.Save($File)
......@@ -83,7 +69,7 @@ function Update-NuSpec-Version($File, $Version)
$versionPath = "package.metadata.version"
if ($Version -ne $null -and $Version -ne "") {
if ($null -ne $Version -and $Version -ne "") {
Set-XmlElementsTextValue -XmlDocument $fileContents -ElementPath $versionPath -TextValue $Version
}
......@@ -159,18 +145,12 @@ function Test-Tag-Build ($nugetGitVersion, $buildMetaData, $fullSemVer) {
function Test-Stable-Release ($nugetGitVersion, $buildMetaData, $fullSemVer)
{
# This is unlikelly to heppen, but could happen if the tag creation didn't triggered the Package
if (Test-Tag-Build $nugetGitVersion $buildMetaData $fullSemVer) {
return $true
}
return $false
}
function Set-Forced-Git-Version ($version)
{
Write-Output "next-version: $version" > GitVersion.yml
}
function Get-Prefix-Name ()
{
$branchName = Get-Current-Branch-Name
......@@ -202,55 +182,6 @@ function Get-Next-Version-String ($PackageId)
return $nextVersion
}
function Test-Version-Stable-Release ($version)
{
$count = $version.Split("-").Length
if ($count -eq 3) {
return $false
}
return $true
}
function Test-Package-Already-Published ($PackageId, $nextVersion)
{
if (Test-Version-Stable-Release $nextVersion) {
$publishedVersion = Get-Published-Package $PackageId
if ($publishedVersion -eq $nextVersion) {
return $true
}
return $false
}
$buildMetaData = Get-Git-Build-MetaData
$currentVersion = $nextVersion.Split('-')[0]
[int]$currentBuild = [Convert]::ToInt32($buildMetaData, 10)
$currentPrefix = Get-Prefix-Name
$version = Get-Published-PreRelase-Package $PackageId
#if the latest pre-relese returned is a stable release
if (Test-Version-Stable-Release $version) {
return $false
}
$publishedVersion = $version.Split('-')[0]
$publishedPrefix = $version.Split('-')[1]
$build = $version.Split('-')[2]
$build = $build.Replace("build", "")
[int]$publishedBuild = [Convert]::ToInt32($build, 10)
if ($currentVersion -ne $publishedVersion) {
return $false
}
if ($currentPrefix -ne $publishedPrefix) {
return $false
}
if ($currentBuild -gt $publishedPrefix) {
return $false
}
return $true
}
function Test-Git-Detached ()
{
$output = [string](git branch | head -1)
......
param ([string] $PackageId, [string] $NuSpecFile)
param ([string] $PackageId)
. .\devops\BuildFunctions.ps1
$hash = Get-Current-Commit-Hash
$releaseNotes = "Release: $($hash)"
$NuSpecFile = $PackageId + '.nuspec'
Update-NuSpec-Release-Notes $NuSpecFile $releaseNotes
& nuget pack $NuSpecFile
\ No newline at end of file
& nuget pack $NuSpecFile -NoPackageAnalysis
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment