Skip to content

Commit 274add0

Browse files
committed
netstandard 2.0
1 parent 1da8ddc commit 274add0

6 files changed

Lines changed: 72 additions & 192 deletions

File tree

Lines changed: 11 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,17 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
33
<PropertyGroup>
4-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6-
<ProjectGuid>{CAF92D49-B715-429C-9E34-57B7E6E57376}</ProjectGuid>
7-
<OutputType>Library</OutputType>
8-
<RootNamespace>MavenNet.Tests</RootNamespace>
9-
<AssemblyName>MavenNet.Tests</AssemblyName>
10-
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
4+
<TargetFramework>netcoreapp2.0</TargetFramework>
115
</PropertyGroup>
12-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
13-
<DebugSymbols>true</DebugSymbols>
14-
<DebugType>full</DebugType>
15-
<Optimize>false</Optimize>
16-
<OutputPath>bin\Debug</OutputPath>
17-
<DefineConstants>DEBUG;</DefineConstants>
18-
<ErrorReport>prompt</ErrorReport>
19-
<WarningLevel>4</WarningLevel>
20-
</PropertyGroup>
21-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
22-
<Optimize>true</Optimize>
23-
<OutputPath>bin\Release</OutputPath>
24-
<ErrorReport>prompt</ErrorReport>
25-
<WarningLevel>4</WarningLevel>
26-
</PropertyGroup>
27-
<ItemGroup>
28-
<Reference Include="System" />
29-
<Reference Include="System.Net.Http" />
30-
<Reference Include="nunit.framework">
31-
<HintPath>..\packages\NUnit.3.6.1\lib\net45\nunit.framework.dll</HintPath>
32-
</Reference>
33-
</ItemGroup>
34-
<ItemGroup>
35-
<Compile Include="Test.cs" />
36-
</ItemGroup>
6+
377
<ItemGroup>
38-
<ProjectReference Include="..\MavenNet\MavenNet.csproj">
39-
<Project>{58557892-52DF-4BA2-90F4-3C4473508ADD}</Project>
40-
<Name>MavenNet</Name>
41-
</ProjectReference>
8+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
9+
<PackageReference Include="xunit" Version="2.3.1" />
10+
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
4211
</ItemGroup>
12+
4313
<ItemGroup>
44-
<None Include="packages.config" />
14+
<ProjectReference Include="..\MavenNet\MavenNet.csproj" />
4515
</ItemGroup>
46-
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
47-
</Project>
16+
17+
</Project>

MavenNet.Tests/Test.cs

Lines changed: 43 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,119 +1,118 @@
1-
using NUnit.Framework;
1+
using Xunit;
22
using System.Linq;
33
using System;
44
using System.Threading.Tasks;
55

66
namespace MavenNet.Tests
77
{
8-
[TestFixture()]
98
public class Test
109
{
1110
const string GPS_LOCAL_REPO = "/Users/redth/Library/Developer/Xamarin/android-sdk-macosx/extras/google/m2repository/";
1211
const string ANDROID_THINGS_URL_REPO = "https://google.bintray.com/androidthings";
1312
const string GOOGLE_MAVEN_REPO = "https://dl.google.com/dl/android/maven2/";
1413

15-
[Test()]
14+
[Fact]
1615
public async Task Test_Refresh_URL()
1716
{
1817
var repo = MavenRepository.FromUrl(ANDROID_THINGS_URL_REPO);
1918
await repo.Refresh();
2019

21-
Assert.IsTrue(repo.Groups.Any());
20+
Assert.True(repo.Groups.Any());
2221
}
2322

24-
[Test]
23+
[Fact]
2524
public async Task Test_Project_URL()
2625
{
2726
var repo = MavenRepository.FromUrl(ANDROID_THINGS_URL_REPO);
2827
await repo.Refresh();
2928

3029
var project = await repo.GetProjectAsync("com.google.android.things", "androidthings", "0.2-devpreview");
3130

32-
Assert.IsTrue(project != null);
31+
Assert.True(project != null);
3332
}
3433

35-
[Test]
34+
[Fact]
3635
public async Task Test_GroupIds_Project_URL()
3736
{
3837
var repo = MavenRepository.FromUrl(ANDROID_THINGS_URL_REPO);
3938
await repo.Refresh("com.google.android.things");
4039

4140
var project = await repo.GetProjectAsync("com.google.android.things", "androidthings", "0.2-devpreview");
4241

43-
Assert.IsTrue(project != null);
42+
Assert.True(project != null);
4443
}
4544

46-
[Category("LOCAL_ONLY")]
47-
[Test]
48-
public async Task Test_Refresh_FILE()
49-
{
50-
var repo = MavenRepository.FromDirectory(GPS_LOCAL_REPO);
51-
await repo.Refresh();
45+
//[Trait("Category", "LOCAL_ONLY")]
46+
//[Fact]
47+
//public async Task Test_Refresh_FILE()
48+
//{
49+
// var repo = MavenRepository.FromDirectory(GPS_LOCAL_REPO);
50+
// await repo.Refresh();
5251

53-
Assert.IsTrue(repo.Groups.Any());
54-
}
52+
// Assert.True(repo.Groups.Any());
53+
//}
5554

56-
[Category("LOCAL_ONLY")]
57-
[Test]
58-
public async Task Test_Project_FILE()
59-
{
60-
var repo = MavenRepository.FromDirectory(GPS_LOCAL_REPO);
61-
await repo.Refresh();
55+
//[Trait("Category", "LOCAL_ONLY")]
56+
//[Fact]
57+
//public async Task Test_Project_FILE()
58+
//{
59+
// var repo = MavenRepository.FromDirectory(GPS_LOCAL_REPO);
60+
// await repo.Refresh();
6261

63-
var project = await repo.GetProjectAsync("com.google.android.gms", "play-services-basement", "10.2.0");
62+
// var project = await repo.GetProjectAsync("com.google.android.gms", "play-services-basement", "10.2.0");
6463

65-
Assert.IsTrue(project != null);
64+
// Assert.True(project != null);
6665

67-
Assert.IsTrue(project.Dependencies?.Any());
68-
}
66+
// Assert.True(project.Dependencies?.Any());
67+
//}
6968

70-
[Category("LOCAL_ONLY")]
71-
[Test]
72-
public async Task Test_GroupIds_Project_FILE()
73-
{
74-
var repo = MavenRepository.FromDirectory(GPS_LOCAL_REPO);
75-
await repo.Refresh("com.google.android.gms");
69+
//[Trait("Category", "LOCAL_ONLY")]
70+
//[Fact]
71+
//public async Task Test_GroupIds_Project_FILE()
72+
//{
73+
// var repo = MavenRepository.FromDirectory(GPS_LOCAL_REPO);
74+
// await repo.Refresh("com.google.android.gms");
7675

77-
var project = await repo.GetProjectAsync("com.google.android.gms", "play-services-basement", "10.2.0");
76+
// var project = await repo.GetProjectAsync("com.google.android.gms", "play-services-basement", "10.2.0");
7877

79-
Assert.IsTrue(project != null);
78+
// Assert.True(project != null);
8079

81-
Assert.IsTrue(project.Dependencies?.Any());
82-
}
80+
// Assert.True(project.Dependencies?.Any());
81+
//}
8382

84-
[Test]
83+
[Fact]
8584
public async Task Test_Refresh_GOOGLE()
8685
{
8786
var repo = MavenRepository.FromGoogle();
8887
await repo.Refresh();
8988

90-
Assert.IsTrue(repo.Groups.Any());
89+
Assert.True(repo.Groups.Any());
9190
}
9291

93-
[Test]
92+
[Fact]
9493
public async Task Test_Project_GOOGLE()
9594
{
9695
var repo = MavenRepository.FromGoogle();
9796
await repo.Refresh();
9897

9998
var project = await repo.GetProjectAsync("com.google.android.gms", "play-services-basement", "10.2.0");
10099

101-
Assert.IsTrue(project != null);
100+
Assert.True(project != null);
102101

103-
Assert.IsTrue(project.Dependencies?.Any());
102+
Assert.True(project.Dependencies?.Any());
104103
}
105104

106-
[Test]
105+
[Fact]
107106
public async Task Test_GroupIds_Project_GOOGLE()
108107
{
109108
var repo = MavenRepository.FromGoogle();
110109
await repo.Refresh("com.google.android.gms");
111110

112111
var project = await repo.GetProjectAsync("com.google.android.gms", "play-services-basement", "10.2.0");
113112

114-
Assert.IsTrue(project != null);
113+
Assert.True(project != null);
115114

116-
Assert.IsTrue(project.Dependencies?.Any());
115+
Assert.True(project.Dependencies?.Any());
117116
}
118117
}
119118
}

MavenNet.Tests/packages.config

Lines changed: 0 additions & 4 deletions
This file was deleted.

MavenNet.nuspec

Lines changed: 0 additions & 24 deletions
This file was deleted.

MavenNet/MavenNet.csproj

Lines changed: 18 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,23 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
33
<PropertyGroup>
4-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6-
<ProjectGuid>{58557892-52DF-4BA2-90F4-3C4473508ADD}</ProjectGuid>
7-
<OutputType>Library</OutputType>
8-
<RootNamespace>MavenNet</RootNamespace>
9-
<AssemblyName>MavenNet</AssemblyName>
10-
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
4+
<TargetFrameworks>netstandard2.0</TargetFrameworks>
5+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
116
</PropertyGroup>
12-
13-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
14-
<DebugSymbols>true</DebugSymbols>
15-
<DebugType>full</DebugType>
16-
<Optimize>false</Optimize>
17-
<OutputPath>bin\Debug</OutputPath>
18-
<DefineConstants>DEBUG;</DefineConstants>
19-
<ErrorReport>prompt</ErrorReport>
20-
<WarningLevel>4</WarningLevel>
21-
<ConsolePause>false</ConsolePause>
22-
</PropertyGroup>
23-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
24-
<Optimize>true</Optimize>
25-
<OutputPath>bin\Release</OutputPath>
26-
<ErrorReport>prompt</ErrorReport>
27-
<WarningLevel>4</WarningLevel>
28-
<ConsolePause>false</ConsolePause>
7+
8+
<PropertyGroup>
9+
<PackageId>MavenNet</PackageId>
10+
<Title>MavenNet</Title>
11+
<Description>A .NET Client for inspecting and interacting with Maven Repositories</Description>
12+
<Summary>A .NET Client for inspecting and interacting with Maven Repositories</Summary>
13+
<PackageLicenseUrl>https://raw.githubusercontent.com/Redth/MavenNet/master/LICENSE</PackageLicenseUrl>
14+
<PackageLicenseUrl>https://github.com/Redth/MavenNet</PackageLicenseUrl>
15+
<PackageTags>Maven</PackageTags>
16+
<Authors>Redth</Authors>
17+
<Owners>Redth</Owners>
2918
</PropertyGroup>
19+
3020
<ItemGroup>
31-
<Reference Include="System" />
32-
<Reference Include="System.Net.Http" />
33-
<Reference Include="System.Xml.Serialization" />
34-
<Reference Include="System.Xml" />
35-
<Reference Include="System.Xml.Linq" />
36-
</ItemGroup>
37-
<ItemGroup>
38-
<Compile Include="MavenRepositoryCollection.cs" />
39-
<Compile Include="Properties\AssemblyInfo.cs" />
40-
<Compile Include="MavenMetadataParser.cs" />
41-
<Compile Include="PomParser.cs" />
42-
<Compile Include="Models\MetadataModels.cs" />
43-
<Compile Include="Models\PomMavenXsdModels.cs" />
44-
<Compile Include="FileBasedMavenRepository.cs" />
45-
<Compile Include="DirectoryMavenRepository.cs" />
46-
<Compile Include="UrlMavenRepository.cs" />
47-
<Compile Include="Models\ProjectExtensions.cs" />
48-
<Compile Include="GoogleMavenRepository.cs" />
49-
<Compile Include="MavenRepository.cs" />
50-
<Compile Include="IMavenRepository.cs" />
51-
<Compile Include="Models\Artifact.cs" />
52-
<Compile Include="Models\Group.cs" />
53-
</ItemGroup>
54-
<ItemGroup>
55-
<Folder Include="Models\" />
21+
<Compile Remove="Properties\AssemblyInfo.cs" />
5622
</ItemGroup>
57-
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
58-
</Project>
23+
</Project>

MavenNet/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)