Build reported these warnings:
warning XA4231: The Android class parser value 'jar2xml' is deprecated and will be removed in a future version of Xamarin.Android. Update the project properties to use 'class-parse'
In the code <AndroidClassParser> is not specified, so by default it uses
'jar2xml'. So set its value to 'class-parse'.
See:
https://github.com/xamarin/xamarin-android/blob/main/Documentation/guides/messages/xa4231.mdhttps://github.com/xamarin/xamarin-android/issues/1319
Moving to class-parse instead of jar2xml also fixes issues when building with Java 11 & Xamarin < 12.2
Because of:
- 94e21c7aaa
If the change wasn't done, we would have to stick with JDK-8
Instead of 'Novell\'
In kp2akeytransform.csproj
Novell\Xamarin.Android.Bindings.targets is not anymore at this place. It is now in
Xamarin\Android\Xamarin.Android.Bindings.targets
Most subprojects already use that path, but this wasn't changed here
build.readme.md: mention how to build the native libs when on windows
Fix target name: rename target to keepass2android-app
*.BAT build-scripts: make script fail when a command fails
If a command was failing, the script continued to run and didn't fail.
The build errors could be hidden. This will make them apparent
build-java.bat:
- prefix call to gradlew.bat with 'call'
Otherwise, the batch file stops at the first gradlew call.
- don't build PluginQR as its output is not used, and the build fails with
newer Android SDK/NDK
build-xamarin.bat:
- use VS2019 path, download NuGet dependencies
- Call vcvarsall.bat only if not yet done
- build also APK
- Tested with VS Community 2019
- When calling it multiple times, the PATH env var contains duplicate values
and in the end will be too long, leading to vcvarsall.bat failing,
and hence build-xamarin.bat too
build-java.sh:
- don't unset ANDROID_NDK_HOME & ANDROID_NDK
Fixes build issues on github actions
- add missing KP2AKdbLibrary
- add executable bit to src/java/KP2AKdbLibrary/gradlew
- support build with msbuild & force use of xabuild when on linux
- don't build PluginQR as its output is not used, and the build fails with
newer Android SDK/NDK
build-xamarin.sh:
- put the config (Debug or Release) in a variable
build-apk.sh:
- fix project name to keepass2android-app.csproj
- support build with msbuild & force use of xabuild when on linux
Needed for github actions, and will also support building on macos with msbuild
- put the config (Debug or Release) in a variable
- Add missing /p:Configuration= /p:Platform=AnyCPU which is needed when building
nonet on macos (because nonet uses "Release")
remove PluginQR
This commit has to be merged with the commit in SamsungPass submodule that
updates SamsungPass to v1.2.6.
Commit message below:
With 1.1.3 build fails as soon as we use Xamarin.Android >= 12.1 (on all
platforms) [1].
Actually, this is due the version of r8.jar shipped by Xamarin which now fails.
Failure is actually normal [2], as expected, while in the past it didn't fail
(problem not catched in older versions).
So the bug is actually in SamsungPass.
This PR has to be taken with caution:
- it was just to check that it would build with a newer version of SamsungPass
- The new functions that are in the jar haven't been ported except those
mandatory to build
- Content is unsure and part of the code is marked as TODO
- jar was taken from a location whose trustability was not checked [3]
API for 1.2.6 can be found at [4]
[1] https://github.com/xamarin/xamarin-android/issues/7607
[2] https://issuetracker.google.com/issues/192128533
[3] https://github.com/antonjlin/Shack/blob/master/app/libs/pass-v1.2.6.jar
[4] https://web.archive.org/web/20181004165435/http://img-developer.samsung.com/onlinedocs/sms/pass/index.html
Error was:
```
Error in obj/Debug/lp/12/jl/__reference__pass-v1.1.3.jar:com/samsung/android/sdk/pass/SpassFingerprint.class:
java.lang.ArrayIndexOutOfBoundsException: Index 4 out of bounds for length 4
"/tmp/keepass2android/src/KeePass.sln" (keepass2android-app target) (1) ->
"/tmp/keepass2android/src/keepass2android/keepass2android-app.csproj" (default target) (2) ->
(_CompileToDalvik target) ->
/tmp/keepass2android/l/xamarin.android-oss/bin/Release/lib/xamarin.android/xbuild/Xamarin/Android/Xamarin.Android.D8.targets(79,5): error : java.lang.ArrayIndexOutOfBoundsException : Index 4 out of bounds for length 4 [/tmp/keepass2android/src/keepass2android/keepass2android-app.csproj]
```