From 9b5b87b505916ae04c3133304271a3b1aec26766 Mon Sep 17 00:00:00 2001 From: raksa Date: Tue, 22 Dec 2015 13:56:21 +0700 Subject: [PATCH] reprepare assets on rebuild --- .../proj.android-studio/app/build.gradle | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/templates/js-template-default/frameworks/runtime-src/proj.android-studio/app/build.gradle b/templates/js-template-default/frameworks/runtime-src/proj.android-studio/app/build.gradle index ba1a05574f..fc9dbac363 100644 --- a/templates/js-template-default/frameworks/runtime-src/proj.android-studio/app/build.gradle +++ b/templates/js-template-default/frameworks/runtime-src/proj.android-studio/app/build.gradle @@ -47,3 +47,23 @@ dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile project(':libcocos2dx') } + + +task cleanAssets(type: Delete) { + delete 'assets' +} +task copyAssets(type: Copy) { + from('../../../cocos2d-x/cocos/scripting/js-bindings/') { + include 'script/**' + } + from('../../../../') { + include 'res/**' + include 'src/**' + include 'main.js' + include 'project.json' + } + into 'assets' +} + +clean.dependsOn cleanAssets +preBuild.dependsOn copyAssets