From 76043328bbbd0042631c0ff44420eb1e08351b59 Mon Sep 17 00:00:00 2001 From: rosen-vladimirov Date: Mon, 19 Oct 2015 12:08:53 +0300 Subject: [PATCH] Fix symlink of android framework When you use --symlink for android runtime, CLI's modifying the original AndroidManifest.xml and res dirs. So we should not symlink src directory and build.gradle, settings.gradle. --- lib/services/android-project-service.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/services/android-project-service.ts b/lib/services/android-project-service.ts index 76fbe4eb03..5a8632a7b5 100644 --- a/lib/services/android-project-service.ts +++ b/lib/services/android-project-service.ts @@ -100,15 +100,14 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService if(this.$options.symlink) { this.symlinkDirectory("build-tools", this.platformData.projectRoot, frameworkDir).wait(); this.symlinkDirectory("libs", this.platformData.projectRoot, frameworkDir).wait(); - this.symlinkDirectory("src", this.platformData.projectRoot, frameworkDir).wait(); - - this.$fs.symlink(path.join(frameworkDir, "build.gradle"), path.join(this.platformData.projectRoot, "build.gradle")).wait(); - this.$fs.symlink(path.join(frameworkDir, "settings.gradle"), path.join(this.platformData.projectRoot, "settings.gradle")).wait(); } else { - this.copy(this.platformData.projectRoot, frameworkDir, "build-tools libs src", "-R"); - this.copy(this.platformData.projectRoot, frameworkDir, "build.gradle settings.gradle", "-f"); + this.copy(this.platformData.projectRoot, frameworkDir, "build-tools libs", "-R"); } + // These files and directories should not be symlinked as CLI is modifying them and we'll change the original values as well. + this.copy(this.platformData.projectRoot, frameworkDir, "src", "-R"); + this.copy(this.platformData.projectRoot, frameworkDir, "build.gradle settings.gradle", "-f"); + this.cleanResValues(targetSdkVersion, frameworkVersion).wait(); }).future()();