From b6951fb75d73ed21e6d5e79771d127cc7c19939b Mon Sep 17 00:00:00 2001 From: Eric Sink Date: Fri, 28 Jan 2022 12:42:29 -0600 Subject: [PATCH] progress on net6 xamarin support #467 -- use Xamarin.Legacy.Sdk, super-helpful package suggested by @jpobst. change commands in build script to use dotnet build now instead of old desktop msbuild. as indicated in xamarin/Xamarin.Legacy.Sdk#34 , tvos is not supported, so for now, this commit changes tvos build to net6 without including support for legacy. none of this is tested yet. --- Directory.Build.props | 2 +- build/Program.fs | 10 ++++++---- ...PCLRaw.batteries_v2.e_sqlcipher.internal.ios.csproj | 4 ++-- ...tePCLRaw.batteries_v2.e_sqlite3.internal.ios.csproj | 4 ++-- ...ePCLRaw.batteries_v2.e_sqlite3.internal.tvos.csproj | 4 ++-- ...tePCLRaw.batteries_v2.sqlcipher.internal.ios.csproj | 4 ++-- .../SQLitePCLRaw.lib.e_sqlcipher.android.csproj | 4 ++-- .../SQLitePCLRaw.lib.e_sqlcipher.ios.csproj | 4 ++-- .../SQLitePCLRaw.lib.e_sqlite3.android.csproj | 4 ++-- .../SQLitePCLRaw.lib.e_sqlite3.ios.csproj | 4 ++-- .../SQLitePCLRaw.lib.e_sqlite3.tvos.csproj | 4 ++-- .../SQLitePCLRaw.lib.sqlcipher.ios.placeholder.csproj | 4 ++-- src/global.json | 3 ++- 13 files changed, 29 insertions(+), 26 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 1f35c24a..cbb1ebc3 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -4,7 +4,7 @@ Copyright 2014-2021 SourceGear, LLC SourceGear Eric Sink - 2.0.8-pre20220128122014 + 2.0.8-pre20220128123315 2.0.8.1488 2.0.8.1488 SQLitePCLRaw is a Portable Class Library (PCL) for low-level (raw) access to SQLite diff --git a/build/Program.fs b/build/Program.fs index 0d46d8a8..41f33cce 100644 --- a/build/Program.fs +++ b/build/Program.fs @@ -123,8 +123,9 @@ let main argv = for s in msbuild_dirs do let dir_name = sprintf "SQLitePCLRaw.%s" s let dir = (Path.Combine(top, "src", dir_name)) - exec "dotnet" "restore" dir - exec "msbuild" "/p:Configuration=Release" dir + //exec "dotnet" "restore" dir + //exec "msbuild" "/p:Configuration=Release" dir + exec "dotnet" "build -c Release" dir let msbuild_pack_dirs = [ "lib.e_sqlite3.android" @@ -136,8 +137,9 @@ let main argv = for s in msbuild_pack_dirs do let dir_name = sprintf "SQLitePCLRaw.%s" s let dir = (Path.Combine(top, "src", dir_name)) - exec "dotnet" "restore" dir - exec "msbuild" "/p:Configuration=Release /t:pack" dir + //exec "dotnet" "restore" dir + //exec "msbuild" "/p:Configuration=Release /t:pack" dir + exec "dotnet" "pack -c Release" dir let get_build_prop p = let path_xml = Path.Combine(top, "Directory.Build.props") diff --git a/src/SQLitePCLRaw.batteries_v2.e_sqlcipher.internal.ios/SQLitePCLRaw.batteries_v2.e_sqlcipher.internal.ios.csproj b/src/SQLitePCLRaw.batteries_v2.e_sqlcipher.internal.ios/SQLitePCLRaw.batteries_v2.e_sqlcipher.internal.ios.csproj index 9d671802..d8115d69 100644 --- a/src/SQLitePCLRaw.batteries_v2.e_sqlcipher.internal.ios/SQLitePCLRaw.batteries_v2.e_sqlcipher.internal.ios.csproj +++ b/src/SQLitePCLRaw.batteries_v2.e_sqlcipher.internal.ios/SQLitePCLRaw.batteries_v2.e_sqlcipher.internal.ios.csproj @@ -1,6 +1,6 @@ - + - xamarin.ios10 + net6-ios;xamarin.ios10 true SQLitePCLRaw.batteries_v2 ..\..\sn\SQLitePCLRaw.batteries_v2.snk diff --git a/src/SQLitePCLRaw.batteries_v2.e_sqlite3.internal.ios/SQLitePCLRaw.batteries_v2.e_sqlite3.internal.ios.csproj b/src/SQLitePCLRaw.batteries_v2.e_sqlite3.internal.ios/SQLitePCLRaw.batteries_v2.e_sqlite3.internal.ios.csproj index 18c2b6ed..eb464788 100644 --- a/src/SQLitePCLRaw.batteries_v2.e_sqlite3.internal.ios/SQLitePCLRaw.batteries_v2.e_sqlite3.internal.ios.csproj +++ b/src/SQLitePCLRaw.batteries_v2.e_sqlite3.internal.ios/SQLitePCLRaw.batteries_v2.e_sqlite3.internal.ios.csproj @@ -1,6 +1,6 @@ - + - xamarin.ios10 + net6-ios;xamarin.ios10 true SQLitePCLRaw.batteries_v2 ..\..\sn\SQLitePCLRaw.batteries_v2.snk diff --git a/src/SQLitePCLRaw.batteries_v2.e_sqlite3.internal.tvos/SQLitePCLRaw.batteries_v2.e_sqlite3.internal.tvos.csproj b/src/SQLitePCLRaw.batteries_v2.e_sqlite3.internal.tvos/SQLitePCLRaw.batteries_v2.e_sqlite3.internal.tvos.csproj index 03de8f34..36b25992 100644 --- a/src/SQLitePCLRaw.batteries_v2.e_sqlite3.internal.tvos/SQLitePCLRaw.batteries_v2.e_sqlite3.internal.tvos.csproj +++ b/src/SQLitePCLRaw.batteries_v2.e_sqlite3.internal.tvos/SQLitePCLRaw.batteries_v2.e_sqlite3.internal.tvos.csproj @@ -1,6 +1,6 @@ - + - xamarin.tvos10 + net6-tvos true SQLitePCLRaw.batteries_v2 ..\..\sn\SQLitePCLRaw.batteries_v2.snk diff --git a/src/SQLitePCLRaw.batteries_v2.sqlcipher.internal.ios/SQLitePCLRaw.batteries_v2.sqlcipher.internal.ios.csproj b/src/SQLitePCLRaw.batteries_v2.sqlcipher.internal.ios/SQLitePCLRaw.batteries_v2.sqlcipher.internal.ios.csproj index 7e4474a3..6d143fc0 100644 --- a/src/SQLitePCLRaw.batteries_v2.sqlcipher.internal.ios/SQLitePCLRaw.batteries_v2.sqlcipher.internal.ios.csproj +++ b/src/SQLitePCLRaw.batteries_v2.sqlcipher.internal.ios/SQLitePCLRaw.batteries_v2.sqlcipher.internal.ios.csproj @@ -1,6 +1,6 @@ - + - xamarin.ios10 + net6-ios;xamarin.ios10 true SQLitePCLRaw.batteries_v2 ..\..\sn\SQLitePCLRaw.batteries_v2.snk diff --git a/src/SQLitePCLRaw.lib.e_sqlcipher.android/SQLitePCLRaw.lib.e_sqlcipher.android.csproj b/src/SQLitePCLRaw.lib.e_sqlcipher.android/SQLitePCLRaw.lib.e_sqlcipher.android.csproj index 65a322fa..49fa5721 100644 --- a/src/SQLitePCLRaw.lib.e_sqlcipher.android/SQLitePCLRaw.lib.e_sqlcipher.android.csproj +++ b/src/SQLitePCLRaw.lib.e_sqlcipher.android/SQLitePCLRaw.lib.e_sqlcipher.android.csproj @@ -1,6 +1,6 @@ - + - MonoAndroid80 + net6-android;MonoAndroid80 false true ..\..\sn\SQLitePCLRaw.lib.e_sqlcipher.snk diff --git a/src/SQLitePCLRaw.lib.e_sqlcipher.ios/SQLitePCLRaw.lib.e_sqlcipher.ios.csproj b/src/SQLitePCLRaw.lib.e_sqlcipher.ios/SQLitePCLRaw.lib.e_sqlcipher.ios.csproj index d4356a35..2a96c34a 100644 --- a/src/SQLitePCLRaw.lib.e_sqlcipher.ios/SQLitePCLRaw.lib.e_sqlcipher.ios.csproj +++ b/src/SQLitePCLRaw.lib.e_sqlcipher.ios/SQLitePCLRaw.lib.e_sqlcipher.ios.csproj @@ -1,6 +1,6 @@ - + - xamarin.ios10 + net6-ios;xamarin.ios10 false true ..\..\sn\SQLitePCLRaw.lib.e_sqlcipher.snk diff --git a/src/SQLitePCLRaw.lib.e_sqlite3.android/SQLitePCLRaw.lib.e_sqlite3.android.csproj b/src/SQLitePCLRaw.lib.e_sqlite3.android/SQLitePCLRaw.lib.e_sqlite3.android.csproj index 8899802f..21865d7e 100644 --- a/src/SQLitePCLRaw.lib.e_sqlite3.android/SQLitePCLRaw.lib.e_sqlite3.android.csproj +++ b/src/SQLitePCLRaw.lib.e_sqlite3.android/SQLitePCLRaw.lib.e_sqlite3.android.csproj @@ -1,6 +1,6 @@ - + - MonoAndroid80 + net6-android;MonoAndroid80 false true ..\..\sn\SQLitePCLRaw.lib.e_sqlite3.snk diff --git a/src/SQLitePCLRaw.lib.e_sqlite3.ios/SQLitePCLRaw.lib.e_sqlite3.ios.csproj b/src/SQLitePCLRaw.lib.e_sqlite3.ios/SQLitePCLRaw.lib.e_sqlite3.ios.csproj index 9cc9d29d..a6f69b00 100644 --- a/src/SQLitePCLRaw.lib.e_sqlite3.ios/SQLitePCLRaw.lib.e_sqlite3.ios.csproj +++ b/src/SQLitePCLRaw.lib.e_sqlite3.ios/SQLitePCLRaw.lib.e_sqlite3.ios.csproj @@ -1,6 +1,6 @@ - + - xamarin.ios10 + net6-ios;xamarin.ios10 false true ..\..\sn\SQLitePCLRaw.lib.e_sqlite3.snk diff --git a/src/SQLitePCLRaw.lib.e_sqlite3.tvos/SQLitePCLRaw.lib.e_sqlite3.tvos.csproj b/src/SQLitePCLRaw.lib.e_sqlite3.tvos/SQLitePCLRaw.lib.e_sqlite3.tvos.csproj index 62500b84..f059b6ff 100644 --- a/src/SQLitePCLRaw.lib.e_sqlite3.tvos/SQLitePCLRaw.lib.e_sqlite3.tvos.csproj +++ b/src/SQLitePCLRaw.lib.e_sqlite3.tvos/SQLitePCLRaw.lib.e_sqlite3.tvos.csproj @@ -1,6 +1,6 @@ - + - xamarin.tvos10 + net6-tvos false true ..\..\sn\SQLitePCLRaw.lib.e_sqlite3.snk diff --git a/src/SQLitePCLRaw.lib.sqlcipher.ios.placeholder/SQLitePCLRaw.lib.sqlcipher.ios.placeholder.csproj b/src/SQLitePCLRaw.lib.sqlcipher.ios.placeholder/SQLitePCLRaw.lib.sqlcipher.ios.placeholder.csproj index d6ac63e3..651cf070 100644 --- a/src/SQLitePCLRaw.lib.sqlcipher.ios.placeholder/SQLitePCLRaw.lib.sqlcipher.ios.placeholder.csproj +++ b/src/SQLitePCLRaw.lib.sqlcipher.ios.placeholder/SQLitePCLRaw.lib.sqlcipher.ios.placeholder.csproj @@ -1,6 +1,6 @@ - + - xamarin.ios10 + net6-ios;xamarin.ios10 false true SQLitePCLRaw.lib.sqlcipher diff --git a/src/global.json b/src/global.json index 28a78451..91385738 100644 --- a/src/global.json +++ b/src/global.json @@ -1,6 +1,7 @@ { "msbuild-sdks": { - "MSBuild.Sdk.Extras": "2.0.54" + "MSBuild.Sdk.Extras": "2.0.54", + "Xamarin.Legacy.Sdk": "0.1.2-alpha6" } }