Created
April 23, 2018 06:40
-
-
Save leeyc09/a8ab2a25e6df1221747ed4c038a01178 to your computer and use it in GitHub Desktop.
L10nsample_build.gradle
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
//https://github.com/leeyc09/L10nStringResourceAutomation/blob/master/sample_build.gradle | |
ext.download_res_folder = 'src/main/res_down' //저장될 별도의 리소스 폴더 | |
ext.script_path = 'script/languageResource.py' //스크립트 저장 경로 | |
ext.GoogleDocId = 'Google Doc ID' //구글 스프레드시트 독 아이디 | |
ext.json_key_path = 'script/some_auth_file.json' ///구글 키 저장 경로 | |
task StringResourceSync(type: Exec) { | |
doFirst { | |
println ":::" + "Start to get String Resources..." + ":::" | |
} | |
// windows | |
// commandLine = ['cmd', '/c', 'python' , script_path, GoogleDocId,download_res_folder] | |
// mac | |
commandLine =['python', script_path, GoogleDocId, json_key_path, download_res_folder] | |
doLast { | |
println ":::" + "Finish to get String Resources..." + ":::" | |
} | |
} | |
preBuild.dependsOn StringResourceSync | |
android { | |
... | |
//추가 리소스 셋을 추가한다. | |
sourceSets { | |
main.res.srcDirs += download_res_folder | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment