๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

๋นˆ ๊ตฌ๋ฉ ์ฑ„์šฐ๊ธฐ

[Android Studio Flamingo Release] BuildConfig ์•ˆ ๋ณด์ž„

https://daryeou.tistory.com/324

 

[Gradle] AGP 8.0์—์„œ BuildConfig ์‚ฌ์šฉ ์‹œ ์—๋Ÿฌ

๋ฉ€ํ‹ฐ๋ชจ๋“ˆ์—์„œ BuildConfig๋ฅผ buildType๋ณ„๋กœ ๋‹ค๋ฅด๊ฒŒ ํ•˜๊ธฐ ์œ„ํ•ด ํ•ด๋‹น ๋ชจ๋“ˆ build.gradle ํŒŒ์ผ์„ ์•„๋ž˜์™€ ๊ฐ™์ด ์ž‘์„ฑํ–ˆ์—ˆ๋‹ค. android { namespace 'com.app.xxxx' compileSdk 33 defaultConfig { minSdk 21 targetSdk 33 testInstrumentationRunn

daryeou.tistory.com

 

์ด ํฌ์ŠคํŠธ ๋•๋ถ„์— ์•Œ์•˜๋‹ค. Android Gradle Plugin 8.0๋ถ€ํ„ฐ๋Š” BuildConfig๊ฐ€ ๋น„ํ™œ์„ฑํ™”๋œ๋‹ค๋Š” ๊ฒƒ์„.

 

https://medium.com/androiddevelopers/5-ways-to-prepare-your-app-build-for-android-studio-flamingo-release-da34616bb946

 

5 ways to prepare your app build for Android Studio Flamingo release

When you upgrade to Android Studio Flamingo and Android Gradle Plugin (AGP) 8.0, you need to update your app build files to accommodate…

medium.com

์š” ๊ธ€๋„ ์ฐพ์•˜๋‹ค. ์—ฌ๊ธฐ์„œ๋„ BuildConfig ๋น„ํ™œ์„ฑํ™” ์ด์•ผ๊ธฐ๊ฐ€ ๋‚˜์˜จ๋‹ค.

 

BuildConfig๋ฅผ ํ™œ์„ฑํ™”ํ•  ๊ฒฝ์šฐ, ์„ฑ๋Šฅ ํ–ฅ์ƒ์„ ์œ„ํ•ด gradle.properties ํŒŒ์ผ์— ํ•ด๋‹น ์„ค์ •์„ ์ถ”๊ฐ€ํ•˜๋ผ๊ณ  ํ•œ๋‹ค.

 

android.enableBuildConfigAsBytecode=true

BuildConfig ํŒŒ์ผ์„ ์ž๋ฐ” ํŒŒ์ผ์—์„œ ์ปดํŒŒ์ผ ํŒŒ์ผ๋กœ ์ƒ์„ฑํ•œ๋‹ค๊ณ  ํ•œ๋‹ค.