/** * download gradle build props * * @param response - encapsulate data related to response * @param servletContextUrl - servlet context */ private void downLoadGradleProps(RestResponse response, String servletContextUrl) { String gradleProperties = getGradleProperties(response, servletContextUrl); ScriptDownload scriptDownload = new ScriptDownload(); scriptDownload.setFileContent(gradleProperties); ((StreamRestResponse) response).setDownload(true); ((StreamRestResponse) response).setDownloadFile("gradle.properties"); response.iModel(scriptDownload); }
/** * download Gradle build File * * @param response - encapsulate data related to response * @param gradleSnippet - gradle snippet file */ private void downloadGradleBuildFile(RestResponse response, String gradleSnippet) { // download build.gradle file ScriptDownload scriptDownload = new ScriptDownload(); scriptDownload.setFileContent(gradleSnippet); ((StreamRestResponse) response).setDownload(true); ((StreamRestResponse) response).setDownloadFile("build.gradle"); response.iModel(scriptDownload); }