diff --git a/Directory.Build.props b/Directory.Build.props
index 312e7bb3d..bd46e6e75 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -8,7 +8,8 @@
<_OutputPath>$(MSBuildThisFileDirectory)bin\Build$(Configuration)\
true
true
-
+ 7.0
+ net$(DotNetTargetFrameworkVersion)
- $(NoWarn);CS8032
+ $(NoWarn);CS8032;CS8981
diff --git a/Makefile b/Makefile
index 644d11b67..2bbf73873 100644
--- a/Makefile
+++ b/Makefile
@@ -33,7 +33,7 @@ TESTS = \
bin/Test$(CONFIGURATION)/Xamarin.SourceWriter-Tests.dll
NET_TESTS = \
- bin/Test$(CONFIGURATION)-net6.0/Java.Base-Tests.dll
+ bin/Test$(CONFIGURATION)-net7.0/Java.Base-Tests.dll
PTESTS = \
bin/Test$(CONFIGURATION)/Java.Interop-PerformanceTests.dll
@@ -127,7 +127,7 @@ run-tests: $(TESTS) bin/Test$(CONFIGURATION)/$(JAVA_INTEROP_LIB)
$(foreach t,$(TESTS), $(call RUN_TEST,$(t),1)) \
exit $$r;
-run-net-tests: $(NET_TESTS) bin/Test$(CONFIGURATION)-net6.0/$(JAVA_INTEROP_LIB)
+run-net-tests: $(NET_TESTS) bin/Test$(CONFIGURATION)-net7.0/$(JAVA_INTEROP_LIB)
r=0; \
$(foreach t,$(NET_TESTS), dotnet test $(t) || r=1) \
exit $$r;
diff --git a/build-tools/automation/azure-pipelines.yaml b/build-tools/automation/azure-pipelines.yaml
index ac018b467..a63001ce1 100644
--- a/build-tools/automation/azure-pipelines.yaml
+++ b/build-tools/automation/azure-pipelines.yaml
@@ -21,12 +21,13 @@ variables:
RunningOnCI: true
Build.Configuration: Release
MaxJdkVersion: 8
- DotNetCoreVersion: 6.0.202
+ DotNetCoreVersion: 7.0.100-preview.4.22252.9
+ DotNetTargetFramework: net7.0
+ NetCoreTargetFrameworkPathSuffix: -$(DotNetTargetFramework)
1ESWindowsPool: AzurePipelines-EO
1ESWindowsImage: AzurePipelinesWindows2022compliant
1ESMacPool: Azure Pipelines
1ESMacImage: internal-macos-11
- NetCoreTargetFrameworkPathSuffix: -net6.0
VSInstallRoot: C:\Program Files\Microsoft Visual Studio\2022\Enterprise
jobs:
@@ -136,11 +137,7 @@ jobs:
boots https://download.mono-project.com/archive/6.12.0/macos-10-universal/MonoFramework-MDK-6.12.0.145.macos10.xamarin.universal.pkg
displayName: Install Mono
- - script: make prepare CONFIGURATION=$(Build.Configuration) JI_MAX_JDK=$(MaxJdkVersion)
- displayName: make prepare
-
- - script: make all CONFIGURATION=$(Build.Configuration) JI_MAX_JDK=$(MaxJdkVersion)
- displayName: make all
+ - template: templates\core-build.yaml
- script: |
r=0
diff --git a/build-tools/automation/templates/core-tests.yaml b/build-tools/automation/templates/core-tests.yaml
index 3063a11c4..5f56f1797 100644
--- a/build-tools/automation/templates/core-tests.yaml
+++ b/build-tools/automation/templates/core-tests.yaml
@@ -90,7 +90,7 @@ steps:
condition: or(eq('${{ parameters.runNativeDotnetTests }}', 'true'), eq('${{ parameters.runNativeTests }}', 'true'))
inputs:
command: test
- testRunTitle: Java.Interop (net6.0 - ${{ parameters.platformName }})
+ testRunTitle: Java.Interop ($(DotNetTargetFramework) - ${{ parameters.platformName }})
arguments: bin/Test$(Build.Configuration)$(NetCoreTargetFrameworkPathSuffix)/Java.Interop-Tests.dll
continueOnError: true
@@ -122,11 +122,11 @@ steps:
continueOnError: true
- task: DotNetCoreCLI@2
- displayName: 'Tests: Java.Interop-Performance-net6.0'
+ displayName: 'Tests: Java.Interop-Performance-$(DotNetTargetFramework)'
condition: eq('${{ parameters.runNativeTests }}', 'true')
inputs:
command: test
- testRunTitle: Java.Interop-Performance (net6.0 - ${{ parameters.platformName }})
+ testRunTitle: Java.Interop-Performance ($(DotNetTargetFramework) - ${{ parameters.platformName }})
arguments: bin/Test$(Build.Configuration)$(NetCoreTargetFrameworkPathSuffix)/Java.Interop-PerformanceTests.dll
continueOnError: true
@@ -135,7 +135,7 @@ steps:
condition: or(eq('${{ parameters.runNativeDotnetTests }}', 'true'), eq('${{ parameters.runNativeTests }}', 'true'))
inputs:
command: test
- testRunTitle: Java.Base (net6.0 - ${{ parameters.platformName }})
+ testRunTitle: Java.Base ($(DotNetTargetFramework) - ${{ parameters.platformName }})
arguments: bin/Test$(Build.Configuration)$(NetCoreTargetFrameworkPathSuffix)/Java.Base-Tests.dll
continueOnError: true
diff --git a/build-tools/jnienv-gen/jnienv-gen.csproj b/build-tools/jnienv-gen/jnienv-gen.csproj
index 2402a52d1..0287a6b75 100644
--- a/build-tools/jnienv-gen/jnienv-gen.csproj
+++ b/build-tools/jnienv-gen/jnienv-gen.csproj
@@ -2,7 +2,7 @@
Exe
- net472;net6.0
+ net472;$(DotNetTargetFramework)
false
$(BaseIntermediateOutputPath)$(Configuration)\$(TargetFramework.ToLowerInvariant())\
diff --git a/samples/Hello/Hello.csproj b/samples/Hello/Hello.csproj
index 61ceac50d..82b0b2edf 100644
--- a/samples/Hello/Hello.csproj
+++ b/samples/Hello/Hello.csproj
@@ -1,7 +1,7 @@
- net6.0
+ $(DotNetTargetFramework)
Exe
true
enable
diff --git a/src/Java.Base/Java.Base.csproj b/src/Java.Base/Java.Base.csproj
index 7351b3997..b05f70d60 100644
--- a/src/Java.Base/Java.Base.csproj
+++ b/src/Java.Base/Java.Base.csproj
@@ -1,7 +1,7 @@
- net6.0
+ $(DotNetTargetFramework)
true
enable
diff --git a/src/Java.Interop.Export/Java.Interop.Export.csproj b/src/Java.Interop.Export/Java.Interop.Export.csproj
index 2e06bae67..3bb393185 100644
--- a/src/Java.Interop.Export/Java.Interop.Export.csproj
+++ b/src/Java.Interop.Export/Java.Interop.Export.csproj
@@ -1,7 +1,7 @@
- netstandard2.0;net6.0
+ netstandard2.0;$(DotNetTargetFramework)
8.0
{B501D075-6183-4E1D-92C9-F7B5002475B1}
enable
diff --git a/src/Java.Interop/Java.Interop.csproj b/src/Java.Interop/Java.Interop.csproj
index 95d0802f0..9593eaea4 100644
--- a/src/Java.Interop/Java.Interop.csproj
+++ b/src/Java.Interop/Java.Interop.csproj
@@ -6,7 +6,7 @@
netstandard2.0
@@ -14,7 +14,7 @@
<_JniEnvAdditionalProperties>TargetFramework=net472
- netstandard2.0;net6.0
+ netstandard2.0;$(DotNetTargetFramework)
$(NoWarn);1591
diff --git a/src/Java.Runtime.Environment/Java.Runtime.Environment.csproj b/src/Java.Runtime.Environment/Java.Runtime.Environment.csproj
index 69a35ba98..cf62b5dc4 100644
--- a/src/Java.Runtime.Environment/Java.Runtime.Environment.csproj
+++ b/src/Java.Runtime.Environment/Java.Runtime.Environment.csproj
@@ -1,11 +1,11 @@
- netstandard2.0;net6.0
+ netstandard2.0;$(DotNetTargetFramework)
true
..\..\product.snk
true
- 8.0
+ 9.0
enable
NU1702
diff --git a/src/Xamarin.Android.Tools.Bytecode/Xamarin.Android.Tools.Bytecode.csproj b/src/Xamarin.Android.Tools.Bytecode/Xamarin.Android.Tools.Bytecode.csproj
index 8c3562411..f5989f6dd 100644
--- a/src/Xamarin.Android.Tools.Bytecode/Xamarin.Android.Tools.Bytecode.csproj
+++ b/src/Xamarin.Android.Tools.Bytecode/Xamarin.Android.Tools.Bytecode.csproj
@@ -1,7 +1,7 @@
- netstandard2.0;net6.0
+ netstandard2.0;$(DotNetTargetFramework)
8.0
true
..\..\product.snk
diff --git a/src/java-interop/java-interop.csproj b/src/java-interop/java-interop.csproj
index 50d75ac32..562fe1f6b 100644
--- a/src/java-interop/java-interop.csproj
+++ b/src/java-interop/java-interop.csproj
@@ -1,6 +1,6 @@
- net472;net6.0
+ net472;$(DotNetTargetFramework)
$(ToolOutputFullPath)
$(BuildToolOutputFullPath)
java-interop
diff --git a/tests/Java.Base-Tests/Java.Base-Tests.csproj b/tests/Java.Base-Tests/Java.Base-Tests.csproj
index 6bc86be15..d04a048f6 100644
--- a/tests/Java.Base-Tests/Java.Base-Tests.csproj
+++ b/tests/Java.Base-Tests/Java.Base-Tests.csproj
@@ -1,7 +1,7 @@
- net6.0
+ $(DotNetTargetFramework)
Java.BaseTests
true
enable
diff --git a/tests/Java.Interop-PerformanceTests/Java.Interop-PerformanceTests.csproj b/tests/Java.Interop-PerformanceTests/Java.Interop-PerformanceTests.csproj
index 509b21841..52ca1a252 100644
--- a/tests/Java.Interop-PerformanceTests/Java.Interop-PerformanceTests.csproj
+++ b/tests/Java.Interop-PerformanceTests/Java.Interop-PerformanceTests.csproj
@@ -1,7 +1,7 @@
- net472;net6.0
+ net472;$(DotNetTargetFramework)
false
true
diff --git a/tests/Java.Interop-Tests/Java.Interop-Tests.csproj b/tests/Java.Interop-Tests/Java.Interop-Tests.csproj
index eac512935..d64d20be1 100644
--- a/tests/Java.Interop-Tests/Java.Interop-Tests.csproj
+++ b/tests/Java.Interop-Tests/Java.Interop-Tests.csproj
@@ -1,7 +1,7 @@
- net472;net6.0
+ net472;$(DotNetTargetFramework)
false
true
9.0
@@ -11,7 +11,7 @@
$(TestOutputFullPath)
-
+
$(DefineConstants);NO_MARSHAL_MEMBER_BUILDER_SUPPORT;NO_GC_BRIDGE_SUPPORT
@@ -35,7 +35,7 @@
-
+
diff --git a/tests/Java.Interop.Dynamic-Tests/Java.Interop.Dynamic-Tests.csproj b/tests/Java.Interop.Dynamic-Tests/Java.Interop.Dynamic-Tests.csproj
index e9afbb274..2929c4877 100644
--- a/tests/Java.Interop.Dynamic-Tests/Java.Interop.Dynamic-Tests.csproj
+++ b/tests/Java.Interop.Dynamic-Tests/Java.Interop.Dynamic-Tests.csproj
@@ -1,7 +1,7 @@
- net472;net6.0
+ net472;$(DotNetTargetFramework)
false
true
diff --git a/tests/Java.Interop.Export-Tests/Java.Interop.Export-Tests.csproj b/tests/Java.Interop.Export-Tests/Java.Interop.Export-Tests.csproj
index 4fbed16b0..9ef1b18e7 100644
--- a/tests/Java.Interop.Export-Tests/Java.Interop.Export-Tests.csproj
+++ b/tests/Java.Interop.Export-Tests/Java.Interop.Export-Tests.csproj
@@ -1,7 +1,7 @@
- net472;net6.0
+ net472;$(DotNetTargetFramework)
false
true
diff --git a/tests/Java.Interop.Tools.Generator-Tests/Java.Interop.Tools.Generator-Tests.csproj b/tests/Java.Interop.Tools.Generator-Tests/Java.Interop.Tools.Generator-Tests.csproj
index 9a3cf0b73..97711aa73 100644
--- a/tests/Java.Interop.Tools.Generator-Tests/Java.Interop.Tools.Generator-Tests.csproj
+++ b/tests/Java.Interop.Tools.Generator-Tests/Java.Interop.Tools.Generator-Tests.csproj
@@ -1,7 +1,7 @@
- net472;net6.0
+ net472;$(DotNetTargetFramework)
Java.Interop.Tools.Common_Tests
false
diff --git a/tests/Java.Interop.Tools.JavaCallableWrappers-Tests/Java.Interop.Tools.JavaCallableWrappers-Tests.csproj b/tests/Java.Interop.Tools.JavaCallableWrappers-Tests/Java.Interop.Tools.JavaCallableWrappers-Tests.csproj
index 05131ed80..c6750e952 100644
--- a/tests/Java.Interop.Tools.JavaCallableWrappers-Tests/Java.Interop.Tools.JavaCallableWrappers-Tests.csproj
+++ b/tests/Java.Interop.Tools.JavaCallableWrappers-Tests/Java.Interop.Tools.JavaCallableWrappers-Tests.csproj
@@ -1,7 +1,7 @@
- net472;net6.0
+ net472;$(DotNetTargetFramework)
false
$(DefineConstants);HAVE_CECIL;JCW_ONLY_TYPE_NAMES
diff --git a/tests/Java.Interop.Tools.JavaSource-Tests/Java.Interop.Tools.JavaSource-Tests.csproj b/tests/Java.Interop.Tools.JavaSource-Tests/Java.Interop.Tools.JavaSource-Tests.csproj
index 71af957fe..aa5b0ef4b 100644
--- a/tests/Java.Interop.Tools.JavaSource-Tests/Java.Interop.Tools.JavaSource-Tests.csproj
+++ b/tests/Java.Interop.Tools.JavaSource-Tests/Java.Interop.Tools.JavaSource-Tests.csproj
@@ -1,6 +1,6 @@
- net472;net6.0
+ net472;$(DotNetTargetFramework)
False
diff --git a/tests/Java.Interop.Tools.JavaTypeSystem-Tests/Java.Interop.Tools.JavaTypeSystem-Tests.csproj b/tests/Java.Interop.Tools.JavaTypeSystem-Tests/Java.Interop.Tools.JavaTypeSystem-Tests.csproj
index f9b6b103f..bda2b02a5 100644
--- a/tests/Java.Interop.Tools.JavaTypeSystem-Tests/Java.Interop.Tools.JavaTypeSystem-Tests.csproj
+++ b/tests/Java.Interop.Tools.JavaTypeSystem-Tests/Java.Interop.Tools.JavaTypeSystem-Tests.csproj
@@ -1,7 +1,7 @@
- net472;net6.0
+ net472;$(DotNetTargetFramework)
false
Java.Interop.Tools.JavaTypeSystem.Tests
diff --git a/tests/TestJVM/TestJVM.csproj b/tests/TestJVM/TestJVM.csproj
index 3c6332422..f4770c6d9 100644
--- a/tests/TestJVM/TestJVM.csproj
+++ b/tests/TestJVM/TestJVM.csproj
@@ -1,7 +1,7 @@
- net472;net6.0
+ net472;$(DotNetTargetFramework)
8.0
enable
false
diff --git a/tests/Xamarin.Android.Tools.ApiXmlAdjuster-Tests/Xamarin.Android.Tools.ApiXmlAdjuster-Tests.csproj b/tests/Xamarin.Android.Tools.ApiXmlAdjuster-Tests/Xamarin.Android.Tools.ApiXmlAdjuster-Tests.csproj
index ecf33d9e1..f4e21a244 100644
--- a/tests/Xamarin.Android.Tools.ApiXmlAdjuster-Tests/Xamarin.Android.Tools.ApiXmlAdjuster-Tests.csproj
+++ b/tests/Xamarin.Android.Tools.ApiXmlAdjuster-Tests/Xamarin.Android.Tools.ApiXmlAdjuster-Tests.csproj
@@ -1,7 +1,7 @@
- net472;net6.0
+ net472;$(DotNetTargetFramework)
false
diff --git a/tests/Xamarin.Android.Tools.Bytecode-Tests/Xamarin.Android.Tools.Bytecode-Tests.csproj b/tests/Xamarin.Android.Tools.Bytecode-Tests/Xamarin.Android.Tools.Bytecode-Tests.csproj
index 3f39f0716..43870d999 100644
--- a/tests/Xamarin.Android.Tools.Bytecode-Tests/Xamarin.Android.Tools.Bytecode-Tests.csproj
+++ b/tests/Xamarin.Android.Tools.Bytecode-Tests/Xamarin.Android.Tools.Bytecode-Tests.csproj
@@ -1,7 +1,7 @@
- net472;net6.0
+ net472;$(DotNetTargetFramework)
false
8.0
diff --git a/tests/Xamarin.SourceWriter-Tests/Xamarin.SourceWriter-Tests.csproj b/tests/Xamarin.SourceWriter-Tests/Xamarin.SourceWriter-Tests.csproj
index b6ad9f07b..930180dae 100644
--- a/tests/Xamarin.SourceWriter-Tests/Xamarin.SourceWriter-Tests.csproj
+++ b/tests/Xamarin.SourceWriter-Tests/Xamarin.SourceWriter-Tests.csproj
@@ -1,7 +1,7 @@
- net472;net6.0
+ net472;$(DotNetTargetFramework)
false
diff --git a/tests/generator-Tests/generator-Tests.csproj b/tests/generator-Tests/generator-Tests.csproj
index 28466b7fa..63e1683cf 100644
--- a/tests/generator-Tests/generator-Tests.csproj
+++ b/tests/generator-Tests/generator-Tests.csproj
@@ -1,7 +1,7 @@
- net472;net6.0
+ net472;$(DotNetTargetFramework)
false
true
8.0
diff --git a/tests/invocation-overhead/invocation-overhead.csproj b/tests/invocation-overhead/invocation-overhead.csproj
index eb984eadd..8cf004010 100644
--- a/tests/invocation-overhead/invocation-overhead.csproj
+++ b/tests/invocation-overhead/invocation-overhead.csproj
@@ -2,11 +2,11 @@
Exe
- net472;net6.0
+ net472;$(DotNetTargetFramework)
True
True
FEATURE_JNIENVIRONMENT_JI_INTPTRS;FEATURE_JNIENVIRONMENT_JI_PINVOKES;FEATURE_JNIENVIRONMENT_SAFEHANDLES;FEATURE_JNIENVIRONMENT_XA_INTPTRS
- $(DefineConstants);FEATURE_JNIENVIRONMENT_JI_FUNCTION_POINTERS
+ $(DefineConstants);FEATURE_JNIENVIRONMENT_JI_FUNCTION_POINTERS
diff --git a/tests/invocation-overhead/invocation-overhead.targets b/tests/invocation-overhead/invocation-overhead.targets
index 40974f9e9..be9df828b 100644
--- a/tests/invocation-overhead/invocation-overhead.targets
+++ b/tests/invocation-overhead/invocation-overhead.targets
@@ -29,7 +29,7 @@
Targets="_Run_net472"
/>
diff --git a/tests/logcat-parse-Tests/logcat-parse-Tests.csproj b/tests/logcat-parse-Tests/logcat-parse-Tests.csproj
index eacd22fa6..ee2f577bd 100644
--- a/tests/logcat-parse-Tests/logcat-parse-Tests.csproj
+++ b/tests/logcat-parse-Tests/logcat-parse-Tests.csproj
@@ -1,7 +1,7 @@
- net472;net6.0
+ net472;$(DotNetTargetFramework)
false
diff --git a/tools/class-parse/class-parse.csproj b/tools/class-parse/class-parse.csproj
index 37dbf3823..1b2eb95c5 100644
--- a/tools/class-parse/class-parse.csproj
+++ b/tools/class-parse/class-parse.csproj
@@ -1,7 +1,7 @@
- net472;net6.0
+ net472;$(DotNetTargetFramework)
Exe
diff --git a/tools/generator/generator.csproj b/tools/generator/generator.csproj
index a171ed116..563f56c24 100644
--- a/tools/generator/generator.csproj
+++ b/tools/generator/generator.csproj
@@ -1,7 +1,7 @@
- net472;net6.0
+ net472;$(DotNetTargetFramework)
Exe
$(DefineConstants);GENERATOR;HAVE_CECIL;JCW_ONLY_TYPE_NAMES
8.0
@@ -43,7 +43,7 @@
-
+
diff --git a/tools/jcw-gen/jcw-gen.csproj b/tools/jcw-gen/jcw-gen.csproj
index 2b3d423d3..6a5537b04 100644
--- a/tools/jcw-gen/jcw-gen.csproj
+++ b/tools/jcw-gen/jcw-gen.csproj
@@ -1,7 +1,7 @@
- net472;net6.0
+ net472;$(DotNetTargetFramework)
Exe
diff --git a/tools/logcat-parse/logcat-parse.csproj b/tools/logcat-parse/logcat-parse.csproj
index 27b9af00f..38b2e55ed 100644
--- a/tools/logcat-parse/logcat-parse.csproj
+++ b/tools/logcat-parse/logcat-parse.csproj
@@ -1,7 +1,7 @@
- net472;net6.0
+ net472;$(DotNetTargetFramework)
Exe
diff --git a/tools/param-name-importer/param-name-importer.csproj b/tools/param-name-importer/param-name-importer.csproj
index 1f1922e98..10ddef741 100644
--- a/tools/param-name-importer/param-name-importer.csproj
+++ b/tools/param-name-importer/param-name-importer.csproj
@@ -1,6 +1,6 @@
- net472;net6.0
+ net472;$(DotNetTargetFramework)
Exe