Skip to content

Commit 3a2acd8

Browse files
Maschganaltatis
andauthored
Fix: Remove NDK build-id (#59)
Co-authored-by: Michael Geers <[email protected]>
1 parent a4038f5 commit 3a2acd8

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

app.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,12 @@
5858
"de": "./i18n/de.json"
5959
},
6060
"plugins": [
61+
["./scripts/removeDKBuildId.js"],
6162
[
6263
"expo-build-properties",
6364
{
6465
"android": {
65-
"usesCleartextTraffic": true,
66-
"ndk": {
67-
"arguments": "APP_LDFLAGS=--build-id=none"
68-
}
66+
"usesCleartextTraffic": true
6967
}
7068
}
7169
],

scripts/removeDKBuildId.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
const {
2+
withAppBuildGradle,
3+
} = require("@expo/config-plugins/build/plugins/android-plugins.js");
4+
5+
const withNDKBuildId = (config) => {
6+
return withAppBuildGradle(config, (gradleConfig) => {
7+
if (typeof gradleConfig.modResults.contents === "string") {
8+
gradleConfig.modResults.contents =
9+
gradleConfig.modResults.contents.replace(
10+
"defaultConfig {",
11+
`defaultConfig {
12+
externalNativeBuild {
13+
ndkBuild {
14+
arguments "APP_LDFLAGS=--build-id=none"
15+
}
16+
}`,
17+
);
18+
}
19+
return gradleConfig;
20+
});
21+
};
22+
23+
module.exports = withNDKBuildId;

0 commit comments

Comments
 (0)