Post

(Android) Gradle 단에서 상수 넣어주기 (외부에서 상수 넣어주기)

gradle.properties 에서 build.gradle로 상수 넣어주기.

https://github.com/novoda/gradle-build-properties-plugin

build.gradle에서 BuildConfig.java로 상수 넣어주기.

http://mornbr.blogspot.com/2015/11/androidgradleandroid-buildtypes.html

보안에는 도움이 안됨. 어차피

코드를 생성해주고 거기다가 변수 만들어서 String 집어 넣어 주는 방식이라서. 단지 외부 상수를 한꺼번에 관리할 수 있어서 깔끔하다? 구성상의 편리함? 뭐 그런 장점임.
This post is licensed under CC BY 4.0 by the author.