Skip to content

Commit 195a480

Browse files
committed
Added Xamarin targets
1 parent 7f80e11 commit 195a480

File tree

4 files changed

+114
-106
lines changed

4 files changed

+114
-106
lines changed

appveyor.yml

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
environment:
2-
PKG_VERSION: 1.2.0
2+
PKG_VERSION: 0.0.2
33
VERSION_SUFFIX: ""
44
version: ${PKG_VERSION}-{build}
55
configuration: Release
@@ -41,22 +41,11 @@ build_script:
4141
- ps: |
4242
if ($env:APPVEYOR_REPO_BRANCH -eq "master")
4343
{
44-
dotnet build "src\Sodium.Core" -c $env:CONFIGURATION
44+
msbuild /t:pack /p:Configuration=$env:CONFIGURATION /p:OutputPath=$env:APPVEYOR_BUILD_FOLDER\artifacts libsodium-core.sln
4545
}
4646
else
4747
{
48-
dotnet build "src\Sodium.Core" -c $env:CONFIGURATION --version-suffix $env:VERSION_SUFFIX
49-
}
50-
51-
after_build:
52-
- ps: |
53-
if ($env:APPVEYOR_REPO_BRANCH -eq "master")
54-
{
55-
dotnet pack "src\Sodium.Core" -c $env:CONFIGURATION --no-build -o $env:APPVEYOR_BUILD_FOLDER\artifacts
56-
}
57-
else
58-
{
59-
dotnet pack "src\Sodium.Core" -c $env:CONFIGURATION --no-build --version-suffix $env:VERSION_SUFFIX -o $env:APPVEYOR_BUILD_FOLDER\artifacts
48+
msbuild /t:pack /p:Configuration=$env:CONFIGURATION /p:OutputPath=$env:APPVEYOR_BUILD_FOLDER\artifacts /p:version-suffix=$env:VERSION_SUFFIX libsodium-core.sln
6049
}
6150
6251
test: off
@@ -74,7 +63,7 @@ on_success:
7463
- codecov -f "%APPVEYOR_BUILD_FOLDER%\test\Sodium.Tests\coverage.xml"
7564

7665
artifacts:
77-
- path: artifacts\**\*.*
66+
- path: artifacts\**\*.nupkg
7867

7968
cache:
8069
- '%USERPROFILE%\.local'
@@ -91,17 +80,17 @@ nuget:
9180
deploy:
9281
- provider: NuGet
9382
api_key:
94-
secure: WcDqU36pLPvA+s5D4N0VEsi7AZGewvf4croE/D3rh3F+iqiztq9w5gHbrhgoTNS9
83+
secure: HS+AVSCmEzHGcITHZJsQVLXvDpkURCQ1YOzH9dw0yVS+hqP4EIBFFM/3VGb7UGbN
9584
on:
9685
branch: master
9786
appveyor_repo_tag: true
9887
- provider: GitHub
9988
description: "Release description"
10089
auth_token:
101-
secure: nsZHZ5nFBFP4fZoVUEeWeZKx7LUASVqCZ+JblTox+02RfTAOlANdFWeCqOwhu7pk
90+
secure: 1J52zPBOA8m7c6tVTvPbKw5oFdoEXCZ6Y9F67ypZy8V4Bg9FasTF+MffvH58vQ3c
10291
artifact: /.*\.nupkg/ # upload all NuGet packages to release assets
10392
draft: false
10493
prerelease: false
10594
on:
106-
branch: master # release from master branch only
95+
branch: master
10796
appveyor_repo_tag: true

global.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"msbuild-sdks": {
3+
"MSBuild.Sdk.Extras": "2.0.54"
4+
}
5+
}

src/Sodium.Core/Sodium.Core.csproj

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="MSBuild.Sdk.Extras">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard1.6;netstandard2.0</TargetFrameworks>
5-
<Description>libsodium for .net core</Description>
6-
<Copyright>Copyright © tabrath 2017</Copyright>
7-
<AssemblyTitle>Sodium.Core</AssemblyTitle>
8-
<VersionPrefix>1.2.0</VersionPrefix>
9-
<Authors>tabrath</Authors>
4+
<TargetFrameworks>MonoAndroid90;Xamarin.iOS10;netstandard1.6;netstandard2.0</TargetFrameworks>
5+
<Description>libsodium for Xamarin</Description>
6+
<Copyright>Copyright © Liip 2019</Copyright>
7+
<AssemblyTitle>Sodium.Xamarin</AssemblyTitle>
8+
<VersionPrefix>0.0.2</VersionPrefix>
9+
<Authors>jschmid</Authors>
1010
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
11-
<AssemblyName>Sodium.Core</AssemblyName>
12-
<PackageId>Sodium.Core</PackageId>
13-
<PackageTags>libsodium</PackageTags>
14-
<PackageLicenseUrl>https://github.com/tabrath/libsodium-core/blob/master/LICENSE</PackageLicenseUrl>
11+
<AssemblyName>Sodium.Xamarin</AssemblyName>
12+
<PackageId>Sodium.Xamarin</PackageId>
13+
<PackageTags>libsodium;xamarin;xamarin.ios;xamarin.android</PackageTags>
14+
<PackageLicenseUrl>https://github.com/liip/Sodium.Xamarin/blob/master/LICENSE</PackageLicenseUrl>
1515
<RepositoryType>git</RepositoryType>
16-
<RepositoryUrl>https://github.com/tabrath/libsodium-core/</RepositoryUrl>
16+
<RepositoryUrl>https://github.com/liip/Sodium.Xamarin/</RepositoryUrl>
1717
<PlatformTarget>AnyCPU</PlatformTarget>
1818
<OutputType>Library</OutputType>
19-
<PackageProjectUrl>https://github.com/tabrath/libsodium-core/</PackageProjectUrl>
19+
<PackageProjectUrl>https://github.com/liip/Sodium.Xamarin/</PackageProjectUrl>
2020
<RootNamespace>Sodium</RootNamespace>
2121
<PackageIconUrl>http://upload.wikimedia.org/wikipedia/commons/thumb/7/78/Salt_shaker_on_white_background.jpg/220px-Salt_shaker_on_white_background.jpg</PackageIconUrl>
2222
<PreserveCompilationContext>true</PreserveCompilationContext>
@@ -36,6 +36,13 @@
3636
<DefineConstants>$(DefineConstants)</DefineConstants>
3737
</PropertyGroup>
3838

39+
<PropertyGroup Condition="$(TargetFramework.StartsWith('Xamarin.iOS'))">
40+
<DefineConstants>$(DefineConstants);IOS</DefineConstants>
41+
</PropertyGroup>
42+
<PropertyGroup Condition="$(TargetFramework.StartsWith('MonoAndroid'))">
43+
<DefineConstants>$(DefineConstants);ANDROID</DefineConstants>
44+
</PropertyGroup>
45+
3946
<ItemGroup>
4047
<PackageReference Include="libsodium" Version="1.0.17" />
4148
</ItemGroup>

0 commit comments

Comments
 (0)