Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add trim/AOT annotations to make code trim/AOT-safe #1222

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"sdk": {
"version": "8.0.100"
"version": "8.0.100",
"rollForward": "latestFeature"
}
}
7 changes: 4 additions & 3 deletions nuget/SQLite-net-base/SQLite-net-base.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>netstandard2.0;net8.0</TargetFrameworks>
<AssemblyName>SQLite-net</AssemblyName>
<PackageId>sqlite-net-base</PackageId>
<AssemblyTitle>SQLite-net .NET Standard Base Library</AssemblyTitle>
Expand All @@ -10,15 +10,16 @@
It is meant to give you all the power of SQLite-net but with the freedom to choose your own provider.
Please use the package sqlite-net-pcl if you have no idea what any of this means.
</Description>
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">true</IsAotCompatible>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DefineConstants>USE_SQLITEPCL_RAW;NO_SQLITEPCL_RAW_BATTERIES;RELEASE</DefineConstants>
<DocumentationFile>bin\Release\netstandard2.0\SQLite-net.xml</DocumentationFile>
<DocumentationFile>bin\Release\$(TargetFramework)\SQLite-net.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineConstants>USE_SQLITEPCL_RAW;NO_SQLITEPCL_RAW_BATTERIES;DEBUG</DefineConstants>
<DocumentationFile>bin\Debug\netstandard2.0\SQLite-net.xml</DocumentationFile>
<DocumentationFile>bin\Debug\$(TargetFramework)\SQLite-net.xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
Expand Down
7 changes: 4 additions & 3 deletions nuget/SQLite-net-sqlcipher/SQLite-net-sqlcipher.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>netstandard2.0;net8.0</TargetFrameworks>
<AssemblyName>SQLite-net</AssemblyName>
<PackageId>sqlite-net-sqlcipher</PackageId>
<AssemblyTitle>SQLite-net SQLCipher .NET Standard Library</AssemblyTitle>
Expand All @@ -11,15 +11,16 @@
This enables secure access to the database with password (key) access.
</Description>
<PackageTags>sqlite-net;sqlite;database;orm;encryption;sqlcipher</PackageTags>
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">true</IsAotCompatible>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DefineConstants>USE_SQLITEPCL_RAW;RELEASE</DefineConstants>
<DocumentationFile>bin\Release\netstandard2.0\SQLite-net.xml</DocumentationFile>
<DocumentationFile>bin\Release\$(TargetFramework)\SQLite-net.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineConstants>USE_SQLITEPCL_RAW;DEBUG</DefineConstants>
<DocumentationFile>bin\Debug\netstandard2.0\SQLite-net.xml</DocumentationFile>
<DocumentationFile>bin\Debug\$(TargetFramework)\SQLite-net.xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
Expand Down
7 changes: 4 additions & 3 deletions nuget/SQLite-net-static/SQLite-net-static.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>netstandard2.0;net8.0</TargetFrameworks>
<AssemblyName>SQLite-net</AssemblyName>
<PackageId>sqlite-net-static</PackageId>
<AssemblyTitle>SQLite-net .NET Standard P/Invoke Library</AssemblyTitle>
Expand All @@ -10,15 +10,16 @@
This version uses P/Invokes to the "sqlite3" native library provided by the operating system.
This works on Xamarin.iOS, Xamarin.Mac, Wilderness Labs' Meadow, and any other platform that has a "sqlite3" library in the path.
</Description>
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">true</IsAotCompatible>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DefineConstants>RELEASE</DefineConstants>
<DocumentationFile>bin\Release\netstandard2.0\SQLite-net.xml</DocumentationFile>
<DocumentationFile>bin\Release\$(TargetFramework)\SQLite-net.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineConstants>DEBUG</DefineConstants>
<DocumentationFile>bin\Debug\netstandard2.0\SQLite-net.xml</DocumentationFile>
<DocumentationFile>bin\Debug\$(TargetFramework)\SQLite-net.xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
Expand Down
7 changes: 4 additions & 3 deletions nuget/SQLite-net-std/SQLite-net-std.csproj
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>netstandard2.0;net8.0</TargetFrameworks>
<AssemblyName>SQLite-net</AssemblyName>
<PackageId>sqlite-net-pcl</PackageId>
<AssemblyTitle>SQLite-net Official .NET Standard Library</AssemblyTitle>
<Description>
SQLite-net is an open source and light weight library providing easy SQLite database storage for .NET, Mono, and Xamarin applications.
This version uses SQLitePCLRaw to provide platform independent versions of SQLite.
</Description>
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">true</IsAotCompatible>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DefineConstants>USE_SQLITEPCL_RAW;RELEASE</DefineConstants>
<DocumentationFile>bin\Release\netstandard2.0\SQLite-net.xml</DocumentationFile>
<DocumentationFile>bin\Release\$(TargetFramework)\SQLite-net.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineConstants>USE_SQLITEPCL_RAW;DEBUG</DefineConstants>
<DocumentationFile>bin\Debug\netstandard2.0\SQLite-net.xml</DocumentationFile>
<DocumentationFile>bin\Debug\$(TargetFramework)\SQLite-net.xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
Expand Down
Loading