build: 升级构建工具链并适配现代 Android 插件

- Gradle 升级至 8.13,Android Gradle 插件升级至 8.13.2
- compileSdk/targetSdk 升级至 36,namespace 替代 package
- 引入 Kotlin 插件与协程依赖,统一 stdlib 版本
- 精简打包输出命名,移除过时配置与 abiFilters
- 修复 manifest exported 属性与 CMake 链接对齐
This commit is contained in:
2026-08-15 20:55:47 +08:00
parent 0fde3a1700
commit e23b077543
7 changed files with 75 additions and 63 deletions

View File

@@ -5,6 +5,8 @@
cmake_minimum_required(VERSION 3.4.1)
project(ttutils)
# Creates and names a library, sets it as either STATIC
# or SHARED, and provides the relative paths to its source code.
# You can define multiple libraries, and CMake builds them for you.
@@ -54,4 +56,6 @@ target_link_libraries( # Specifies the target library.
# Links the target library to the log library
# included in the NDK.
${log-lib})
${log-lib})
set_target_properties(ttutils PROPERTIES LINK_FLAGS "-Wl,-z,max-page-size=16384")

View File

@@ -1,6 +1,8 @@
apply plugin: 'com.android.library'
android {
namespace "com.ttstd.ttutils"
compileSdkVersion 34
// buildToolsVersion "34.0.0"
@@ -21,7 +23,7 @@ android {
// build.gradle中移除armeabi mips等
//选择要添加的对应 cpu 类型的 .so 库。
abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
// 还可以添加 'armeabi', 'x86', 'x86_64', 'mips', 'mips64'
}
}

View File

@@ -1,2 +1 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ttstd.ttutils" />
<manifest package="com.ttstd.ttutils" />