zioinfo-mail/workspace/guardia-messenger/plugins/withGradleProps.js
DESKTOP-TKLFCPR\ython 777e027553 refactor(structure): move app -> workspace/guardia-messenger
Permission denied on git mv, used robocopy instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 23:53:57 +09:00

32 lines
991 B
JavaScript

const { withGradleProperties } = require('@expo/config-plugins')
/**
* PNG crunching 비활성화 + arm64-v8a 단일 아키텍처로 빌드 속도 향상
* PIL 생성 PNG가 AAPT2 cruncher와 충돌하는 문제 수정
*/
module.exports = function withGradleProps(config) {
return withGradleProperties(config, (cfg) => {
const props = cfg.modResults
const set = (key, value) => {
const idx = props.findIndex(p => p.key === key)
if (idx !== -1) {
props[idx].value = value
} else {
props.push({ type: 'property', key, value })
}
}
// PNG crunching 비활성화 (PIL PNG와 AAPT2 충돌 방지)
set('android.enablePngCrunchInReleaseBuilds', 'false')
// 빌드 대상 아키텍처 축소 (arm64-v8a = 최신 폰, 빌드 시간 단축)
set('reactNativeArchitectures', 'arm64-v8a')
// 메모리 증가 (Gradle OOM 방지)
set('org.gradle.jvmargs', '-Xmx4096m -XX:MaxMetaspaceSize=1024m')
return cfg
})
}