4 Commits

Author SHA1 Message Date
b0a604f110 Use 'android_binary' rule to build 'libmozc.so'
This is a follow up to my previous commit [1], which aimed to build
'libmozc.so' for relevant architectures.

Although in the above commit I believe I followed exactly the same step
explained in the Bazel document [2], it seems that artifact files are
not ready to run on the actual Android devices.  Perhaps it might be
because the above approach is for those who want to build native
libraries for Android without building an APK, which is somewhat
not-a-major use case and may not be well maintained.  This is why I
ended up building a temporary fat APK only to extract native libraries
from it.

Basically what this commit does are:

 1. Build a fat APK, which depends on 'mozcjni' cc_library target.
 2. Extract native libraries from the APK and zip it as native_libs.zip

The temporary APK used here is completely empty and used only for
building purpose.

The 'package' meta target is updated to point to the native library
build target, which is 'android/jni:native_libs'.

 bazel build --config oss_android package
 ls bazel-bin/android/jni/native_libs.zip

'.bazelrc' is also updated because Android build starts using the
following options instead.

 * --android_crosstool_top=@androidndk//:toolchain
 * --fat_apk_cpu=armeabi-v7a,arm64-v8a,x86,x86_64

Dockerfile is also updated because now Android build requires not only
Android NDK but also Android SDK.

This commit only affects Android build target.  Other build target
should continue to success without installing Android SDK/NDK.

Closes #840.

 [1]: 5a6e457b72
 [2]: https://bazel.build/docs/android-ndk#cclibrary-android
 [3]: https://bazel.build/docs/android-ndk

PiperOrigin-RevId: 578420951
2023-11-01 07:13:42 +00:00
878e307b16 Workaround for GitHub graphs not showing
GitHub support said certain big files under data/ are causing slowdowns and suggested treating them as binary in .gitattributes.
https://github.com/google/mozc/issues/789

PiperOrigin-RevId: 556095285
2023-08-11 21:39:09 +00:00
86581b0201 Prepare for *.textproto file
This is a preparation before submitting the first `*.textproto` file into Mozc repository.

https://protobuf.dev/reference/protobuf/textformat-spec/#text-format-files

PiperOrigin-RevId: 520793382
2023-03-31 01:08:29 +00:00
a5e7e460b8 Rely on .gitattributes for line ending settings for Windows
Mozc project expects all the checked out text files to have LF line
ending not only on mac/Linux but also on Windows.

This CL introduces `.gitattributes` to teach git about such a policy
so that each developer does not need to change their git config only
on Windows environment.

Closes #699

PiperOrigin-RevId: 519718821
2023-03-27 14:44:55 +00:00