Rename AndroidManifest.xml to avoid spurious diffs

The KDE Android SDK will overwrite the version number in the Android
manifest when building the app. When building against a clone this results
in 'spurious' git diffs that should never be committed. Work-around this by
renaming the AndroidManifest.xml and copying it in place at build time.
master
Johan Ouwerkerk 2020-05-12 22:58:13 +02:00
parent db41697dbf
commit e8785db94b
3 changed files with 10 additions and 0 deletions

1
android/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
AndroidManifest.xml

View File

@ -10,3 +10,12 @@ file (
DESTINATION "${CMAKE_CURRENT_BINARY_DIR}"
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
#
# The KDE Android SDK overwrites the AndroidManifest to set an auto-generated versionCode.
# When building against a local clone, this results in annoying git diffs that must be manually reset.
#
# As a work-around, the AndroidManifest.xml is gitignore'd and generated (copied) from another file, taking care to
# preserve a file-level dependency between the 'real' source and the generated file.
#
configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/AndroidManifest.xml.in" "${CMAKE_CURRENT_SOURCE_DIR}/AndroidManifest.xml" COPYONLY)