Skip to content

Commit a2af8c0

Browse files
authoredSep 30, 2018
Merge pull request #152 from spring-projects/features/netcore
.NET Core compilation
2 parents 3bdc793 + b81af45 commit a2af8c0

File tree

224 files changed

+2448
-4182
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

224 files changed

+2448
-4182
lines changed
 

‎BreakingChanges.txt

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Changes (2.0 to 3.0)
2+
========================
3+
4+
1. .NET Framework 4.5.2 is the lowest framework supported
5+
6+
17
Changes (1.3.2 to 2.0)
28
========================
39

‎Spring.build

+42-64
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ Commandline Examples:
375375
</items>
376376
</in>
377377
<do>
378-
<echo message="Running tests for ${path}" />
378+
<echo message="Running .NET Framework tests for ${path}" />
379379
<property name="test.bin.dir" value="${path}/net452" />
380380
<property name="test.assemblyname" value="${string::substring(path, string::last-index-of(path, '\') + 1, string::get-length(path) - string::last-index-of(path, '\') - 1)}" />
381381
<property name="test.assemblyfile" value="${test.assemblyname}.dll" />
@@ -384,6 +384,9 @@ Commandline Examples:
384384
</do>
385385
</foreach>
386386

387+
<!-- run .NET Core separately for now -->
388+
<call target="compile-test-netcore" />
389+
387390
<!-- build coverage summary -->
388391
<exec program="${tool.dir}/ncoverexplorer/ncoverexplorer.console.exe" workingdir="${current.bin.dir}" failonerror="false" if="${test.coverage.tool == 'ncover' and test.withcoverage}">
389392
<arg value="/xml:&quot;${current.bin.dir}/TestCoverageSummary.xml&quot;" />
@@ -400,8 +403,32 @@ Commandline Examples:
400403
</exec>
401404
</target>
402405

406+
<target name="compile-test-netcore">
407+
<foreach item="File" property="file">
408+
<in>
409+
<items>
410+
<include name="${spring.basedir}/test/Spring/Spring.Core.Tests/Spring.Core.Tests.2010.csproj" />
411+
<include name="${spring.basedir}/test/Spring/Spring.Aop.Tests/Spring.Aop.Tests.2010.csproj" />
412+
<include name="${spring.basedir}/test/Spring/Spring.Data.Tests/Spring.Data.Tests.2010.csproj" />
413+
<include name="${spring.basedir}/test/Spring/Spring.Testing.NUnit.Tests/Spring.Testing.NUnit.Tests.2010.csproj" />
414+
</items>
415+
</in>
416+
<do>
417+
<echo message="Running .NET Core tests for ${file}" />
418+
419+
<exec program="dotnet" verbose="true">
420+
<arg line="test" />
421+
<arg line="/nodeReuse:false" />
422+
<arg line="-c ${current.build.config}" />
423+
<arg line="-f netcoreapp2.1" />
424+
<arg line="${file}" />
425+
</exec>
426+
</do>
427+
</foreach>
428+
</target>
429+
403430
<target name="compile-net-4.5" description="Builds .NET Framework 4.5 version"
404-
depends="set-net-4.5-runtime-configuration, check-spring-basedir, clean-current-bin-dir, restore-nuget-packages">
431+
depends="set-net-4.5-runtime-configuration, check-spring-basedir, restore-nuget-packages">
405432

406433
<property name="test.withcoverage" value="false" overwrite="true"/>
407434

@@ -445,7 +472,7 @@ Commandline Examples:
445472
</target>
446473

447474
<target name="compile-mono-2.0" description="Builds MONO Framework 2.0 version"
448-
depends="set-mono-2.0-runtime-configuration, check-spring-basedir, clean-current-bin-dir">
475+
depends="set-mono-2.0-runtime-configuration, check-spring-basedir">
449476
<call target="copykeys" if="${project.build.sign}"/>
450477
<call target="common.generate-assemblyinfo"/>
451478
<property name="build-ems" value="false" overwrite="true" />
@@ -853,7 +880,6 @@ Commandline Examples:
853880
<include name="**/nunit.*.xml"/>
854881
<include name="**/NUnitAsp.dll"/>
855882
<include name="**/NUnitAspEx.dll"/>
856-
<include name="**/Rhino.Mocks.dll"/>
857883
<include if="${not net-4.0}" name="**/System.Web.Extensions.dll"/>
858884
<include name="**/Apache.NMS.dll"/>
859885
<include name="**/Apache.NMS.pdb"/>
@@ -1089,29 +1115,6 @@ Commandline Examples:
10891115

10901116
</fileset>
10911117
</copy>
1092-
1093-
<mkdir dir="${current.package.dir}/bin/net/3.5"/>
1094-
<copy todir="${current.package.dir}/bin/net/3.5" verbose="${copy-verbose}">
1095-
<fileset basedir="./build/net/3.5">
1096-
1097-
<include name="*/Spring.Services.dll"/>
1098-
<include name="*/Spring.Services.xml"/>
1099-
<include name="*/Spring.Services.pdb"/>
1100-
1101-
<include name="*/*/Spring.Scheduling.Quartz2.dll"/>
1102-
<include name="*/*/Spring.Scheduling.Quartz2.xml"/>
1103-
<include name="*/*/Spring.Scheduling.Quartz2.pdb"/>
1104-
1105-
<include name="*/Spring.Web.Extensions.dll"/>
1106-
<include name="*/Spring.Web.Extensions.xml"/>
1107-
<include name="*/Spring.Web.Extensions.pdb"/>
1108-
1109-
<include name="*/Spring.Data.NHibernate*.dll"/>
1110-
<include name="*/Spring.Data.NHibernate*.xml"/>
1111-
<include name="*/Spring.Data.NHibernate*.pdb"/>
1112-
1113-
</fileset>
1114-
</copy>
11151118

11161119
</if>
11171120

@@ -1447,52 +1450,27 @@ Commandline Examples:
14471450

14481451
<foreach item="File" property="filename">
14491452
<in>
1450-
<items basedir="${spring.basedir}/src/spring">
1451-
<include name="**/*.nuspec" />
1453+
<items basedir="${spring.basedir}/src/Spring">
1454+
<include name="**/*.csproj" />
1455+
<exclude name="**/Spring.Messaging.Ems.csproj*" unless="${build-ems}" />
14521456
</items>
14531457
</in>
14541458
<do>
14551459
<echo message="Generating NuGet Package from nuspec file: ${filename}" />
1456-
1457-
<exec program="${tool.dir}\NuGet\NuGet.exe" workingdir="${spring.basedir}" verbose="true">
1458-
<arg value="pack" />
1459-
<arg value="${filename}" />
1460-
<arg value="-Version" />
1461-
<arg value="${nuget.package.version}" />
1462-
<arg value="-basepath" />
1463-
<arg value="${spring.basedir}" />
1464-
<arg value="-OutputDirectory" />
1465-
<arg value="${nuget.package.dir}" />
1466-
</exec>
1460+
<exec program="dotnet" verbose="true">
1461+
<arg value="pack" />
1462+
<arg value="-c" />
1463+
<arg value="Release" />
1464+
<arg value="-p:PackageVersion=${nuget.package.version}" />
1465+
<arg value="-o" />
1466+
<arg value="${nuget.package.dir}" />
1467+
<arg value="${filename}" />
1468+
</exec>
14671469
</do>
14681470
</foreach>
14691471
</target>
14701472

14711473
<target name="update-nuspec-metadata" depends="set-nuget-package-version">
1472-
<!--
1473-
INFO: this task assumes that all SPRNET components are versioned coincident with each other and
1474-
updates all version dependencies betw. SPRNET components at once
1475-
-->
1476-
<foreach item="File" property="filename">
1477-
<in>
1478-
<items basedir="${spring.basedir}/src/spring">
1479-
<include name="**/*.nuspec" />
1480-
<!--
1481-
NOTE: must exclude Spring.Core.nuspec b/c it has no Spring.* deps and so the XPATH expr. won't find a match in that case
1482-
and so would fail the XMLPOKE operation otherwise
1483-
-->
1484-
<exclude name="**/Spring.Core.nuspec" />
1485-
</items>
1486-
</in>
1487-
<do>
1488-
<echo message="Processing nuspec file: ${filename}" />
1489-
<xmlpoke file="${filename}" xpath="/n:package/n:metadata/n:dependencies/n:dependency[starts-with(@id, 'Spring.')]/@version" value="${nuget.package.version}">
1490-
<namespaces>
1491-
<namespace prefix="n" uri="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" />
1492-
</namespaces>
1493-
</xmlpoke>
1494-
</do>
1495-
</foreach>
14961474
</target>
14971475

14981476

0 commit comments

Comments
 (0)
Please sign in to comment.