Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dc35be5

Browse filesBrowse files
rockamokapsing
authored andcommitted
Update to Android NDK r28 (fcitx5-android#710)
1 parent 07ea0d1 commit dc35be5
Copy full SHA for dc35be5

File tree

Expand file treeCollapse file tree

19 files changed

+51
-77
lines changed
Filter options
Expand file treeCollapse file tree

19 files changed

+51
-77
lines changed

‎.github/workflows/fdroid.yml

Copy file name to clipboardExpand all lines: .github/workflows/fdroid.yml
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ jobs:
8888
(.versionCode = $versionCode) |=
8989
(.commit = \"$commitHash\")
9090
" $metadata
91+
# TODO: remove this afterwards
92+
# https://github.com/orgs/community/discussions/26676
93+
yq -i ".Builds[0] |=
94+
(.commit = \"${{ github.event.pull_request.head.sha }}\")
95+
" $metadata
9196
prebuiltTreeURL=$(curl -L \
9297
-H "Accept: application/vnd.github+json" \
9398
-H "Authorization: Bearer ${{ github.token }}" \

‎.github/workflows/nix.yml

Copy file name to clipboardExpand all lines: .github/workflows/nix.yml
+3-8Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,17 @@ on:
77

88
jobs:
99
develop:
10-
strategy:
11-
matrix:
12-
os:
13-
- ubuntu-24.04
14-
- macos-14
15-
runs-on: ${{ matrix.os }}
10+
runs-on: ubuntu-24.04
1611
steps:
1712
- name: Fetch source code
1813
uses: actions/checkout@v4
1914
with:
2015
fetch-depth: 0
2116
submodules: recursive
22-
- uses: cachix/install-nix-action@v30
17+
- uses: cachix/install-nix-action@v31
2318
with:
2419
github_access_token: ${{ secrets.GITHUB_TOKEN }}
25-
- uses: cachix/cachix-action@v15
20+
- uses: cachix/cachix-action@v16
2621
with:
2722
name: fcitx5-android
2823
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"

‎.github/workflows/publish.yml

Copy file name to clipboardExpand all lines: .github/workflows/publish.yml
+2-9Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,8 @@ jobs:
2626

2727
- name: Setup Android environment
2828
uses: android-actions/setup-android@v3
29-
30-
- name: Install Android NDK
31-
run: |
32-
sdkmanager --install "cmake;3.22.1"
33-
34-
- name: Install system dependencies
35-
run: |
36-
sudo apt update
37-
sudo apt install extra-cmake-modules gettext
29+
with:
30+
packages: cmake;3.31.6
3831

3932
- name: Setup Gradle
4033
uses: gradle/actions/setup-gradle@v4

‎.github/workflows/pull_request.yml

Copy file name to clipboardExpand all lines: .github/workflows/pull_request.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737

3838
- name: Install Android NDK
3939
run: |
40-
sdkmanager --install "cmake;3.22.1"
40+
sdkmanager --install "cmake;3.31.6"
4141
4242
- name: Install system dependencies (Ubuntu)
4343
if: ${{ startsWith(matrix.os, 'ubuntu') }}

‎.gitmodules

Copy file name to clipboardExpand all lines: .gitmodules
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
[submodule "lib/fcitx5/src/main/cpp/prebuilt"]
55
path = lib/fcitx5/src/main/cpp/prebuilt
66
url = https://github.com/mokapsing/f5a-prebuilt.git
7+
shallow = true
78
[submodule "lib/fcitx5-lua/src/main/cpp/fcitx5-lua"]
89
path = lib/fcitx5-lua/src/main/cpp/fcitx5-lua
910
url = https://github.com/fcitx/fcitx5-lua.git

‎app/org.fcitx.fcitx5.android.yml

Copy file name to clipboardExpand all lines: app/org.fcitx.fcitx5.android.yml
+7-9Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ Builds:
2121
sudo:
2222
- apt-get update
2323
- apt-get install -y g++ libtool make automake gettext bzip2 xz-utils zstd pkg-config
24-
cmake extra-cmake-modules ninja-build libfmt-dev libboost-all-dev libfcitx5utils-dev opencc
25-
ghc cabal-install libghc-shake-dev libghc-aeson-pretty-dev libghc-js-flot-data
26-
haskell-js-dgtable-utils fcitx5-modules python-is-python3
24+
cmake extra-cmake-modules ninja-build libfmt-dev libsystemd-dev libboost-all-dev
25+
ghc cabal-install libghc-shake-dev libghc-aeson-pretty-dev libghc-js-flot-data haskell-js-dgtable-utils
26+
python-is-python3 opencc
2727
gradle:
2828
- yes
2929
binary: https://jenkins.fcitx-im.org/job/android/job/fcitx5-android/lastSuccessfulBuild/artifact/out/org.fcitx.fcitx5.android-%v-%abi-release.apk
@@ -32,7 +32,7 @@ Builds:
3232
rm:
3333
- lib/fcitx5/src/main/cpp/prebuilt
3434
prebuild:
35-
- sdkmanager 'cmake;3.22.1'
35+
- sdkmanager 'cmake;3.31.6'
3636
- sed -i -e '/ImportQualifiedPost/d' $$fcitx5-android-prebuilder$$/src/Main.hs
3737
- sed -i -e 's/import \(.*\) qualified as/import qualified \1 as/g' $$fcitx5-android-prebuilder$$/src/*.hs
3838
- sed -i -e 's|https://maven.pkg.github.com|https://jitpack.io|g' ../build-logic/convention/build.gradle.kts
@@ -43,13 +43,11 @@ Builds:
4343
- build-logic/convention/build
4444
build:
4545
- pushd $$fcitx5-android-prebuilder$$
46-
- cabal configure --disable-library-vanilla --enable-shared --enable-executable-dynamic --ghc-options=-dynamic
47-
- ABI=%abi ANDROID_NDK_ROOT=$$NDK$$ CMAKE_VERSION=3.22.1 ANDROID_PLATFORM=23
48-
COMP_SPELL_DICT=/usr/lib/x86_64-linux-gnu/fcitx5/libexec/comp-spell-dict
49-
./build-cabal -j spell-dict fmt libevent libintl-lite boost marisa opencc libime lua chinese-addons-data zstd
46+
- ABI=%abi ANDROID_NDK_ROOT=$$NDK$$ CMAKE_VERSION=3.31.6 ANDROID_PLATFORM=23
47+
./build-cabal -j app
5048
- popd
5149
- mv $$fcitx5-android-prebuilder$$/build ../lib/fcitx5/src/main/cpp/prebuilt
52-
ndk: 25.2.9519653
50+
ndk: 28.0.13004108
5351
gradleprops:
5452
- buildABI=%abi
5553
- buildTimestamp=%ts

‎app/src/main/cpp/CMakeLists.txt

Copy file name to clipboardExpand all lines: app/src/main/cpp/CMakeLists.txt
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ add_subdirectory(androidfrontend)
3131
add_subdirectory(androidkeyboard)
3232
add_subdirectory(androidnotification)
3333

34-
# prebuilt fmt
35-
set(fmt_DIR "${PREBUILT_DIR}/fmt/${ANDROID_ABI}/lib/cmake/fmt")
36-
find_package(fmt)
37-
3834
# prebuilt libuv
3935
set(libuv_DIR "${PREBUILT_DIR}/libuv/${ANDROID_ABI}/lib/cmake/libuv")
4036
find_package(libuv)
@@ -46,7 +42,7 @@ find_package(Boost 1.86.0 REQUIRED COMPONENTS headers iostreams CONFIG)
4642
set(CHINESE_ADDONS_PINYIN_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../lib/fcitx5-chinese-addons/src/main/cpp/fcitx5-chinese-addons/im/pinyin")
4743
add_library(pinyin-customphrase STATIC "${CHINESE_ADDONS_PINYIN_DIR}/customphrase.cpp")
4844
target_include_directories(pinyin-customphrase INTERFACE "${CHINESE_ADDONS_PINYIN_DIR}")
49-
target_link_libraries(pinyin-customphrase PRIVATE fmt::fmt-header-only Fcitx5::Utils LibIME::Core)
45+
target_link_libraries(pinyin-customphrase PRIVATE Fcitx5::Utils LibIME::Core)
5046

5147
add_library(native-lib SHARED native-lib.cpp)
5248
target_link_libraries(native-lib

‎build-logic/convention/src/main/kotlin/Versions.kt

Copy file name to clipboardExpand all lines: build-logic/convention/src/main/kotlin/Versions.kt
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ object Versions {
1212
const val minSdk = 23
1313
const val targetSdk = 35
1414

15-
const val defaultCMake = "3.22.1"
16-
const val defaultNDK = "25.2.9519653"
15+
const val defaultCMake = "3.31.6"
16+
const val defaultNDK = "28.0.13004108"
1717
const val defaultBuildTools = "35.0.1"
1818

1919
// NOTE: increase this value to bump version code

‎flake.lock

Copy file name to clipboardExpand all lines: flake.lock
+9-9Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎flake.nix

Copy file name to clipboardExpand all lines: flake.nix
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@
3030

3131
# Update versions here
3232
# This should match to build-logic/convention/src/main/kotlin/Versions.kt
33-
cmakeVersion = "3.22.1";
34-
buildToolsVersion = "34.0.0";
35-
platformToolsVersion = "34.0.5";
36-
platformVersion = "34";
37-
ndkVersion = "25.2.9519653";
33+
cmakeVersion = "3.31.6";
34+
buildToolsVersion = "35.0.1";
35+
platformToolsVersion = "35.0.2";
36+
platformVersion = "35";
37+
ndkVersion = "28.0.13004108";
3838

3939
includeNDK = true;
4040
androidComposition = final.androidenv.composeAndroidPackages {

‎gradle/libs.versions.toml

Copy file name to clipboardExpand all lines: gradle/libs.versions.toml
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[versions]
2-
androidGradlePlugin = "8.8.2"
3-
kotlin = "2.1.10"
4-
ksp = "2.1.10-1.0.31"
2+
androidGradlePlugin = "8.9.1"
3+
kotlin = "2.1.20"
4+
ksp = "2.1.20-1.0.31"
55
lifecycle = "2.8.7"
6-
navigation = "2.8.8"
6+
navigation = "2.8.9"
77
room = "2.6.1"
88
splitties = "3.0.0"
99
aboutlibraries = "11.6.3"

‎lib/fcitx5-chinese-addons/src/main/cpp/CMakeLists.txt

Copy file name to clipboardExpand all lines: lib/fcitx5-chinese-addons/src/main/cpp/CMakeLists.txt
+2-5Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,10 @@ find_package(Fcitx5ModuleLuaAddonLoader MODULE)
3131
# dummy target to export src/main/cpp/cmake
3232
add_custom_target(cmake)
3333

34-
# prebuilt fmt
35-
set(fmt_DIR "${PREBUILT_DIR}/fmt/${ANDROID_ABI}/lib/cmake/fmt")
36-
find_package(fmt)
37-
3834
# prebuilt boost
3935
list(APPEND CMAKE_FIND_ROOT_PATH "${PREBUILT_DIR}/boost/${ANDROID_ABI}/lib/cmake")
40-
find_package(Boost 1.86.0 REQUIRED COMPONENTS iostreams CONFIG)
36+
find_package(Boost 1.87.0 REQUIRED COMPONENTS iostreams CONFIG)
37+
add_compile_definitions("BOOST_ALL_NO_EMBEDDED_GDB_SCRIPTS")
4138

4239
# prebuilt marisa-tire, OpenCC needs it
4340
set(marisa_DIR "${PREBUILT_DIR}/marisa/${ANDROID_ABI}/lib/cmake/marisa")

‎lib/fcitx5/src/main/cpp/CMakeLists.txt

Copy file name to clipboardExpand all lines: lib/fcitx5/src/main/cpp/CMakeLists.txt
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
1717
# cmake/FindECM.cmake
1818
find_package(ECM)
1919

20-
# prebuilt fmt
21-
set(fmt_DIR "${PREBUILT_DIR}/fmt/${ANDROID_ABI}/lib/cmake/fmt")
22-
find_package(fmt)
23-
2420
# prebuilt libintl-lite
2521
set(LibIntl_DIR "${PREBUILT_DIR}/libintl-lite/${ANDROID_ABI}/lib/cmake")
2622
find_package(LibIntl)

‎lib/libime/src/main/cpp/CMakeLists.txt

Copy file name to clipboardExpand all lines: lib/libime/src/main/cpp/CMakeLists.txt
+2-5Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,10 @@ find_package(Fcitx5Utils MODULE)
1616
# dummy target to export src/main/cpp/cmake
1717
add_custom_target(cmake)
1818

19-
# prebuilt fmt
20-
set(fmt_DIR "${PREBUILT_DIR}/fmt/${ANDROID_ABI}/lib/cmake/fmt")
21-
find_package(fmt)
22-
2319
# prebuilt boost
2420
list(APPEND CMAKE_FIND_ROOT_PATH "${PREBUILT_DIR}/boost/${ANDROID_ABI}/lib/cmake")
25-
find_package(Boost 1.86.0 REQUIRED COMPONENTS iostreams CONFIG)
21+
find_package(Boost 1.87.0 REQUIRED COMPONENTS iostreams CONFIG)
22+
add_compile_definitions("BOOST_ALL_NO_EMBEDDED_GDB_SCRIPTS")
2623

2724
# prebuilt zstd
2825
set(zstd_DIR "${PREBUILT_DIR}/zstd/${ANDROID_ABI}/lib/cmake/zstd")

‎lib/libime/src/main/cpp/cmake/FindLibIMECore.cmake

Copy file name to clipboardExpand all lines: lib/libime/src/main/cpp/cmake/FindLibIMECore.cmake
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ find_package(libime REQUIRED CONFIG)
66

77
if (NOT TARGET LibIME::Core)
88
# fix target dependency
9-
set_target_properties(libime::IMECore PROPERTIES INTERFACE_LINK_LIBRARIES fcitx5::Fcitx5Utils)
9+
set_target_properties(libime::IMECore PROPERTIES
10+
INTERFACE_LINK_LIBRARIES "fcitx5::Fcitx5Utils;Boost::boost"
11+
)
1012
# fix target name
1113
add_library(LibIME::Core ALIAS libime::IMECore)
1214
endif()

‎lib/libime/src/main/cpp/cmake/FindLibIMEPinyin.cmake

Copy file name to clipboardExpand all lines: lib/libime/src/main/cpp/cmake/FindLibIMEPinyin.cmake
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ find_package(LibIMECore MODULE)
88

99
if (NOT TARGET LibIME::Pinyin)
1010
# fix target dependency
11-
set_target_properties(libime::IMEPinyin PROPERTIES INTERFACE_LINK_LIBRARIES fcitx5::Fcitx5Utils)
1211
set_target_properties(libime::IMEPinyin PROPERTIES INTERFACE_LINK_LIBRARIES libime::IMECore)
1312
# fix target name
1413
add_library(LibIME::Pinyin ALIAS libime::IMEPinyin)

‎lib/libime/src/main/cpp/cmake/FindLibIMETable.cmake

Copy file name to clipboardExpand all lines: lib/libime/src/main/cpp/cmake/FindLibIMETable.cmake
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ find_package(LibIMECore MODULE)
88

99
if (NOT TARGET LibIME::Table)
1010
# fix target dependency
11-
set_target_properties(libime::IMETable PROPERTIES INTERFACE_LINK_LIBRARIES fcitx5::Fcitx5Utils)
12-
set_target_properties(libime::IMEPinyin PROPERTIES INTERFACE_LINK_LIBRARIES libime::IMECore)
11+
set_target_properties(libime::IMETable PROPERTIES INTERFACE_LINK_LIBRARIES libime::IMECore)
1312
# fix target name
1413
add_library(LibIME::Table ALIAS libime::IMETable)
1514
endif()

‎plugin/jyutping/src/main/cpp/CMakeLists.txt

Copy file name to clipboardExpand all lines: plugin/jyutping/src/main/cpp/CMakeLists.txt
+2-5Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,10 @@ set(CMAKE_MODULE_PATH ${FCITX5_CHINESE_ADDONS_CMAKE_MODULES} ${CMAKE_MODULE_PATH
2626

2727
find_package(Fcitx5ModulePunctuation MODULE)
2828

29-
# prebuilt fmt
30-
set(fmt_DIR "${PREBUILT_DIR}/fmt/${ANDROID_ABI}/lib/cmake/fmt")
31-
find_package(fmt)
32-
3329
# prebuilt boost
3430
list(APPEND CMAKE_FIND_ROOT_PATH "${PREBUILT_DIR}/boost/${ANDROID_ABI}/lib/cmake")
35-
find_package(Boost 1.86.0 REQUIRED COMPONENTS iostreams CONFIG)
31+
find_package(Boost 1.87.0 REQUIRED COMPONENTS iostreams CONFIG)
32+
add_compile_definitions("BOOST_ALL_NO_EMBEDDED_GDB_SCRIPTS")
3633

3734
# prebuilt zstd
3835
set(zstd_DIR "${PREBUILT_DIR}/zstd/${ANDROID_ABI}/lib/cmake/zstd")

‎plugin/rime/src/main/cpp/CMakeLists.txt

Copy file name to clipboardExpand all lines: plugin/rime/src/main/cpp/CMakeLists.txt
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,8 @@ set_target_properties(Rime_static PROPERTIES
3434

3535
# https://github.com/rime/librime/blob/1.9.0/src/rime_api.h#L663
3636
# https://stackoverflow.com/questions/805555/ld-linker-question-the-whole-archive-option
37-
# use $<LINK_LIBRARY:WHOLE_ARCHIVE,Rime_static> when cmake updated to 3.24+
3837
# https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html#link-features
39-
set(RIME_TARGET "-Wl,--whole-archive" Rime_static "-Wl,--no-whole-archive")
38+
set(RIME_TARGET $<LINK_LIBRARY:WHOLE_ARCHIVE,Rime_static>)
4039
set(RIME_DATA_DIR "${CMAKE_INSTALL_DATADIR}/rime-data")
4140
add_subdirectory(fcitx5-rime)
4241

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.