Compare commits
7 Commits
amalia/02-
...
v-2.2.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 2b60c52df1 | |||
| 47ed52e9d2 | |||
| 02904b1e48 | |||
| 8df5b48578 | |||
| 21617f9c4c | |||
| 383ca069d5 | |||
| 267454637f |
@@ -1,4 +0,0 @@
|
||||
kotlin version: 2.0.21
|
||||
error message: The daemon has terminated unexpectedly on startup attempt #1 with error code: 0. The daemon process output:
|
||||
1. Kotlin compile daemon is ready
|
||||
|
||||
@@ -92,7 +92,7 @@ android {
|
||||
applicationId 'mobiledarmasaba.app'
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 17
|
||||
versionCode 21
|
||||
versionName "2.2.0"
|
||||
}
|
||||
signingConfigs {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
|
||||
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" tools:node="remove"/>
|
||||
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" tools:node="remove"/>
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO"/>
|
||||
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" tools:node="remove"/>
|
||||
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" tools:node="remove"/>
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
||||
<uses-permission android:name="android.permission.VIBRATE"/>
|
||||
|
||||
@@ -23,7 +23,7 @@ export default {
|
||||
},
|
||||
android: {
|
||||
package: "mobiledarmasaba.app",
|
||||
versionCode: 19,
|
||||
versionCode: 21,
|
||||
adaptiveIcon: {
|
||||
foregroundImage: "./assets/images/logo-icon-small.png",
|
||||
backgroundColor: "#ffffff"
|
||||
@@ -54,6 +54,7 @@ export default {
|
||||
"expo-font",
|
||||
"expo-image-picker",
|
||||
"expo-web-browser",
|
||||
"./plugins/withRemoveMediaPermissions",
|
||||
[
|
||||
"@react-native-firebase/app",
|
||||
{
|
||||
|
||||
37
plugins/withRemoveMediaPermissions.js
Normal file
37
plugins/withRemoveMediaPermissions.js
Normal file
@@ -0,0 +1,37 @@
|
||||
const { withAndroidManifest } = require('@expo/config-plugins');
|
||||
|
||||
const BLOCKED_PERMISSIONS = [
|
||||
'android.permission.READ_MEDIA_IMAGES',
|
||||
'android.permission.READ_MEDIA_VIDEO',
|
||||
];
|
||||
|
||||
const withRemoveMediaPermissions = (config) =>
|
||||
withAndroidManifest(config, (config) => {
|
||||
const manifest = config.modResults.manifest;
|
||||
|
||||
// Pastikan xmlns:tools ada di manifest root
|
||||
if (!manifest.$['xmlns:tools']) {
|
||||
manifest.$['xmlns:tools'] = 'http://schemas.android.com/tools';
|
||||
}
|
||||
|
||||
// Hapus entry yang ada (apapun atributnya)
|
||||
const existing = manifest['uses-permission'] ?? [];
|
||||
manifest['uses-permission'] = existing.filter(
|
||||
(perm) => !BLOCKED_PERMISSIONS.includes(perm.$?.['android:name'])
|
||||
);
|
||||
|
||||
// Tambahkan entry dengan tools:node="remove" agar Gradle merger
|
||||
// membuang permission ini dari SEMUA sumber (termasuk library manifests)
|
||||
for (const permission of BLOCKED_PERMISSIONS) {
|
||||
manifest['uses-permission'].push({
|
||||
$: {
|
||||
'android:name': permission,
|
||||
'tools:node': 'remove',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return config;
|
||||
});
|
||||
|
||||
module.exports = withRemoveMediaPermissions;
|
||||
Reference in New Issue
Block a user