Some targets still target v8.0 (api26):
src/KeePassLib2Android/KeePassLib2Android.csproj: <TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
src/KP2AKdbLibraryBinding/KP2AKdbLibraryBinding.csproj: <TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
src/ZlibAndroid/ZlibAndroid.csproj: <TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
src/PluginSdkBinding/PluginSdkBinding.csproj: <TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
src/PCloudBindings/PCloudBindings.csproj: <TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
src/AndroidFileChooserBinding/AndroidFileChooserBinding.csproj: <TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
src/TwofishCipher/TwofishCipher.csproj: <TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
So we need it in ANDROID_SDK_ROOT.
Otherwise build fails with this error (on macos & windows):
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Tooling.targets(100,5): error XA5207: Could not find android.jar for API level 26. This means the Android SDK platform for API level 26 is not installed. Either install it in the Android SDK Manager (Tools > Android > Android SDK Manager...), or change the Xamarin.Android project to target an API version that is installed. (C:\Android\android-sdk\platforms\android-26\android.jar missing.) [D:\a\keepass2android\keepass2android\src\TwofishCipher\TwofishCipher.csproj]
* make changes to comply with new target sdk version requirements (mostly Exported-attribute and mutability flags)
* drop samsung fingerprint support (as suggested by Samsung), would require more hacks to keep it with the new target sdk version
* add build-properties.props to allow specifying a flavor in VS builds.
com.jcraft:jsch is not actively maintained anymore and lacks support
for modern public key algorithms such as rsa-sha2-256. It only
supports ssh-rsa which is disabled in up-to-date environments.
com.github.mwiede:jsch was created as a drop-in replacement which
works in modern environments [1].
Sources are taken from maven central [2]. The following files were
omitted, because they depend on additional 3rd-party libraries which
we do not have / do not need:
com/jcraft/jsch/JUnixSocketFactory.java
com/jcraft/jsch/Log4j2Logger.java
com/jcraft/jsch/PageantConnector.java
com/jcraft/jsch/Slf4jLogger.java
com/jcraft/jsch/SSHAgentConnector.java
com/jcraft/jsch/bc/*
com/jcraft/jsch/jgss/GSSContextKrb5.java
Fixes#1812.
[1] https://github.com/mwiede/jsch
[2] https://repo1.maven.org/maven2/com/github/mwiede/jsch/0.2.5/jsch-0.2.5-sources.jar
Somes files that are in .gitignore are still in the repository
This will remove them.
Commands used to do this:
git rm --cached -r . &&
git add . &&
git restore --staged .gitmodul
The jars in src/java/JavaFileStorage/libs are no more used since commit
a63663c30e
If this removes too many files, it means that .gitignore has to be fixed.
To find which rule removes which file run:
git check-ignore -v <file>
Especially, removing .idea/ completely might not be correct depending on ones
objective.
Default value for <AndroidResgenFile> is Resource.designer.cs
https://learn.microsoft.com/en-us/xamarin/android/deploy-test/building-apps/build-properties#androidresgenfile
Two projects were using <AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
All other projects use <AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
Difference is one has uppercase D, the other lowercase d
.gitignore already has a rule for 'Resource.designer.cs' in it.
The two projects that were with Resource.Designer.cs needed either a specific line in gitignore
or weren't actually ignored.
Selected fix here is to rename the file with a lowercase 'd' instead of uppercase.
This permits to remove one line from .gitignore and keep the other file really ignored