From 5ed3220a34b21db7dbba84ab30f21b0914b282b6 Mon Sep 17 00:00:00 2001 From: Tim Mickel Date: Wed, 3 Feb 2016 14:11:08 -0500 Subject: [PATCH] Updating bundle-compile.sh and adding gradle task --- android/ScratchJr/app/build.gradle | 6 ++++++ bin/bundle-compile.sh | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/android/ScratchJr/app/build.gradle b/android/ScratchJr/app/build.gradle index 395f705..2d6897f 100644 --- a/android/ScratchJr/app/build.gradle +++ b/android/ScratchJr/app/build.gradle @@ -52,6 +52,11 @@ task switchToFreeGA(type: Copy) { into "$appModuleRootFolder" } +task generateWebpackBundle(type: Exec) { + workingDir '../../../bin' + commandLine './bundle-compile.sh' +} + class GenerateScratchJrPNGsTask extends DefaultTask { File commonHome = project.file("../../..") File binDir = project.file("${commonHome}/bin") @@ -86,6 +91,7 @@ task generateScratchJrPNGs(type: GenerateScratchJrPNGsTask) task cleanScratchJrResources(type: CleanScratchJrResourcesTask) afterEvaluate { + preBuild.dependsOn generateWebpackBundle processFreeDebugGoogleServices.dependsOn switchToFreeGA processFreeReleaseGoogleServices.dependsOn switchToFreeGA prepareFreeDebugDependencies.dependsOn switchToFree diff --git a/bin/bundle-compile.sh b/bin/bundle-compile.sh index 1fb07b4..842bab0 100755 --- a/bin/bundle-compile.sh +++ b/bin/bundle-compile.sh @@ -1,2 +1,3 @@ #!/bin/sh -npm run build; +cd ..; +/usr/local/bin/node ./node_modules/webpack/bin/webpack.js