๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
Environment·Tool/IntelliJ IDEA

[IntelliJ] Gradle ํ”„๋กœ์ ํŠธ resources ๋””๋ ‰ํ† ๋ฆฌ ๋งŒ๋“ค๊ธฐ

by Leica 2020. 3. 9.
๋ฐ˜์‘ํ˜•

[IntelliJ] Gradle ํ”„๋กœ์ ํŠธ resources ๋””๋ ‰ํ† ๋ฆฌ ๋งŒ๋“ค๊ธฐ

 

๋‹ค์Œ์€ ์ผ๋ฐ˜์ ์ธ gradle ํ”„๋กœ์ ํŠธ์˜ ๊ตฌ์กฐ์ด๋‹ค.

 

resources ๋””๋ ‰ํ† ๋ฆฌ๋Š” main, test ํ•˜์œ„์— ์œ„์น˜ํ•˜๋Š”๋ฐ intelliJ ๋ฒ„์ „์— ๋”ฐ๋ผ resources ๋””๋ ‰ํ† ๋ฆฌ๊ฐ€ ์ƒ์„ฑ๋˜์ง€ ์•Š๋Š” ๊ฒฝ์šฐ๊ฐ€ ์žˆ๋‹ค.

์ด ๋””๋ ‰ํ† ๋ฆฌ๋ฅผ ์ง์ ‘ ๋งŒ๋“œ๋Š” ๋ฐฉ๋ฒ•์„ ์•Œ์•„๋ณด์ž.

 

main์—์„œ resources ์ด๋ฆ„์˜ ์ƒˆ ๋””๋ ‰ํ† ๋ฆฌ๋ฅผ ๋งŒ๋“ ๋‹ค.

 

resources ๋””๋ ‰ํ† ๋ฆฌ๊ฐ€ ๋งŒ๋“ค์–ด์กŒ๋‹ค.

๋‚˜ ๊ฐ™์€ ๊ฒฝ์šฐ์—” ์ž๋™์œผ๋กœ resources ๋””๋ ‰ํ† ๋ฆฌ๋กœ ์ธ์‹๋ผ์„œ ์•„์ด์ฝ˜์ด ์ ์šฉ๋์œผ๋‚˜ ๊ทธ๋ ‡์ง€ ์•Š์„ ๊ฒฝ์šฐ,

 

์ƒ์„ฑํ•œ resources ๋””๋ ‰ํ† ๋ฆฌ์— ๋งˆ์šฐ์Šค ์šฐ์ธก ๋ฒ„ํŠผ์„ ํด๋ฆญํ•ด์„œ ์ปจํ…์ŠคํŠธ ๋ฉ”๋‰ด๋ฅผ ๋„์šฐ๊ณ  Mark Directory as - Resoures Root๋ฅผ ํด๋ฆญํ•œ๋‹ค.

 

Gradle resources ๋””๋ ‰ํ† ๋ฆฌ ์ƒ์„ฑ ์™„๋ฃŒ

๋ฐ˜์‘ํ˜•

๋Œ“๊ธ€