Merge 9e250a727dd176bff63e3b9222675d13e2451bfa into bcb694384de8462302448cab6a3dfb1853ba5d5e

This commit is contained in:
Qijia Liu 2026-07-30 15:19:28 +09:00 committed by GitHub
commit 61d88d6819
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 118 additions and 1 deletions

3
.gitmodules vendored
View File

@ -56,3 +56,6 @@
[submodule "plugin/thai/src/main/cpp/fcitx5-libthai"]
path = plugin/thai/src/main/cpp/fcitx5-libthai
url = https://github.com/fcitx/fcitx5-libthai
[submodule "plugin/mozc/src/main/cpp/fcitx5-mozc"]
path = plugin/mozc/src/main/cpp/fcitx5-mozc
url = https://github.com/fcitx-contrib/fcitx5-mozc

View File

@ -38,7 +38,7 @@ In case you want Fcitx5 on other platforms: [macOS](https://github.com/fcitx-con
- Zhuyin/Bopomofo (via [Chewing Plugin](./plugin/chewing))
- Jyutping (via [Jyutping Plugin](./plugin/jyutping/), powered by [libime-jyutping](https://github.com/fcitx/libime-jyutping))
- Vietnamese (via [UniKey Plugin](./plugin/unikey), supports Telex, VNI and VIQR)
- Japanese (via [Anthy Plugin](./plugin/anthy))
- Japanese (via [Mozc Plugin](./plugin/mozc) and [Anthy Plugin](./plugin/anthy))
- Korean (via [Hangul Plugin](./plugin/hangul))
- Sinhala (via [Sayura Plugin](./plugin/sayura))
- Thai (via [Thai Plugin](./plugin/thai))
@ -108,6 +108,7 @@ First, clone this repository and fetch all submodules:
```shell
git clone git@github.com:fcitx5-android/fcitx5-android.git
git submodule update --init --recursive
git clone git@github.com:google/mozc plugin/mozc/src/main/cpp/fcitx5-mozc/mozc --depth=1 --recurse-submodules
```
Install `extra-cmake-modules` and `gettext` with your system package manager:

View File

@ -0,0 +1,52 @@
plugins {
id("org.fcitx.fcitx5.android.app-convention")
id("org.fcitx.fcitx5.android.plugin-app-convention")
id("org.fcitx.fcitx5.android.native-app-convention")
id("org.fcitx.fcitx5.android.build-metadata")
id("org.fcitx.fcitx5.android.data-descriptor")
id("org.fcitx.fcitx5.android.fcitx-component")
}
android {
namespace = "org.fcitx.fcitx5.android.plugin.mozc"
defaultConfig {
applicationId = "org.fcitx.fcitx5.android.plugin.mozc"
@Suppress("UnstableApiUsage")
externalNativeBuild {
cmake {
targets(
"mozc"
)
}
}
}
buildTypes {
release {
resValue("string", "app_name", "@string/app_name_release")
}
debug {
resValue("string", "app_name", "@string/app_name_debug")
}
}
packaging {
jniLibs {
excludes += setOf(
"**/libc++_shared.so",
"**/libFcitx5*"
)
}
}
}
fcitxComponent {
installPrebuiltAssets = true
}
dependencies {
implementation(project(":lib:fcitx5"))
implementation(project(":lib:plugin-base"))
}

View File

@ -0,0 +1,11 @@
{
"uniqueId": "fcitx/mozc",
"artifactVersion": "2.30.5618.101",
"description": "Mozc for Fcitx",
"name": "fcitx/mozc",
"website": "https://github.com/fcitx/mozc",
"tag": "native",
"licenses": [
"BSD-3-Clause"
]
}

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:label="@string/app_name" />
</manifest>

View File

@ -0,0 +1,30 @@
cmake_minimum_required(VERSION 3.18)
project(fcitx5-android-plugin-mozc VERSION ${VERSION_NAME})
# For reproducible build
add_link_options("LINKER:--hash-style=gnu,--build-id=none")
# prefab dependency
find_package(fcitx5 REQUIRED CONFIG)
get_target_property(FCITX5_CMAKE_MODULES fcitx5::cmake INTERFACE_INCLUDE_DIRECTORIES)
set(CMAKE_MODULE_PATH ${FCITX5_CMAKE_MODULES} ${CMAKE_MODULE_PATH})
find_package(ECM MODULE)
find_package(Fcitx5Core MODULE)
find_package(Fcitx5Module MODULE)
add_library(Mozc_static STATIC IMPORTED)
set_target_properties(Mozc_static PROPERTIES
IMPORTED_LOCATION "${PREBUILT_DIR}/libmozc/${ANDROID_ABI}/lib/libmozc-static.a"
INTERFACE_INCLUDE_DIRECTORIES "${PREBUILT_DIR}/libmozc/${ANDROID_ABI}/include/mozc"
INTERFACE_LINK_LIBRARIES "-llog -L${PREBUILT_DIR}/libmozc/${ANDROID_ABI}/lib -labsl -lprotobuf -lutf8_validity"
)
set(MOZC_TARGET Mozc_static)
add_subdirectory(fcitx5-mozc)
target_include_directories(mozc PRIVATE
"${PROJECT_SOURCE_DIR}/../../../../../lib/fcitx5/build/headers/usr/include"
"${PROJECT_SOURCE_DIR}/../../../../../lib/fcitx5/build/headers/usr/include/Fcitx5/Module"
)

@ -0,0 +1 @@
Subproject commit 5580d540d61e873033671e3d3af3e4fff51bd91d

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name_debug">Fcitx5 (Mozc Plugin | Debug)</string>
<string name="app_name_release">Fcitx5 (Mozc Plugin)</string>
<string name="description">Mozc (Japanese input method) engine support for Fcitx5</string>
</resources>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<plugin xmlns="../../../../../pluginSchema.xsd">
<apiVersion>0.1</apiVersion>
<domain>fcitx5-mozc</domain>
<description>@string/description</description>
</plugin>

View File

@ -35,3 +35,4 @@ include(":plugin:chewing")
include(":plugin:sayura")
include(":plugin:jyutping")
include(":plugin:thai")
include(":plugin:mozc")