Created
February 12, 2019 02:11
-
-
Save nguyenlinhnttu/0742fe4c68539ec6a68dcb286e2e6948 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//file local.properties | |
tmdb_api_key = "xxxxxxxxxxxxxxxxxxxxxxxxxx" | |
//file build.gradle (Module: app) | |
buildTypes.each { | |
Properties properties = new Properties() | |
properties.load(project.rootProject.file("local.properties").newDataInputStream()) | |
def tmdbApiKey = properties.getProperty("tmdb_api_key", "") | |
it.buildConfigField 'String', "TMDB_API_KEY", tmdbApiKey | |
it.resValue 'string', "api_key", tmdbApiKey | |
} | |
//Tại file Constants | |
var tmdbApiKey = BuildConfig.TMDB_API_KEY |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment