Skip to content

Commit 0768a6b

Browse files
committed
适配16KB页面
1 parent 92499e2 commit 0768a6b

6 files changed

Lines changed: 24 additions & 9 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ allprojects {
2020
}
2121
2222
dependencies {
23+
// 传统4KB内存页面版本
2324
implementation 'com.licheedev:android-serialport:2.1.4'
25+
// 适配16KB页面版本,https://developer.android.google.cn/guide/practices/page-sizes?hl=zh-cn
26+
implementation 'com.licheedev:android-serialport:2.1.5'
2427
}
2528
```
2629

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript {
77
mavenCentral()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:4.0.1'
10+
classpath 'com.android.tools.build:gradle:4.2.2'
1111
// NOTE: Do not place your application dependencies here; they belong
1212
// in the individual module build.gradle files
1313
classpath 'org.jetbrains.dokka:dokka-gradle-plugin:1.4.32'
@@ -32,6 +32,6 @@ ext {
3232
minSdkVersion = 8
3333
targetSdkVersion = 29
3434

35-
versionCode = 2
36-
versionName = "2.1.4"
35+
versionCode = 3
36+
versionName = "2.1.5"
3737
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Wed Aug 26 17:00:59 CST 2020
1+
#Fri Sep 06 10:04:58 CST 2024
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip

sample/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ dependencies {
2727
})
2828
implementation 'androidx.appcompat:appcompat:1.2.0'
2929
testImplementation 'junit:junit:4.13'
30-
implementation project(':serialport')
31-
//implementation 'com.licheedev:android-serialport:2.1.3'
30+
//implementation project(':serialport')
31+
implementation 'com.licheedev:android-serialport:2.1.5'
3232
}

serialport/CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This ensures that a certain set of CMake features is available to
33
# your build.
44

5-
cmake_minimum_required(VERSION 3.4.1)
5+
cmake_minimum_required(VERSION 3.18.1)
66

77
# Specifies a library name, specifies whether the library is STATIC or
88
# SHARED, and provides relative paths to the source code. You can
@@ -35,4 +35,10 @@ target_link_libraries( # Specifies the target library.
3535

3636
# Links the target library to the log library
3737
# included in the NDK.
38-
${log-lib} )
38+
${log-lib} )
39+
40+
target_link_options(
41+
serial_port
42+
PRIVATE
43+
"-Wl,-z,max-page-size=16384"
44+
)

serialport/build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ android {
2121
externalNativeBuild {
2222
cmake {
2323
path 'CMakeLists.txt'
24+
version "3.18.1"
25+
}
26+
}
27+
packagingOptions {
28+
jniLibs {
29+
useLegacyPackaging true
2430
}
2531
}
2632
}

0 commit comments

Comments
 (0)