Skip to content

Commit 31b2621

Browse files
Merge pull request #1079 from NativeScript/vladimirov/fix-symlink-android
Fix symlink of android framework
2 parents 5ebebb4 + 7604332 commit 31b2621

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

lib/services/android-project-service.ts

+5-6
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,14 @@ class AndroidProjectService extends projectServiceBaseLib.PlatformProjectService
100100
if(this.$options.symlink) {
101101
this.symlinkDirectory("build-tools", this.platformData.projectRoot, frameworkDir).wait();
102102
this.symlinkDirectory("libs", this.platformData.projectRoot, frameworkDir).wait();
103-
this.symlinkDirectory("src", this.platformData.projectRoot, frameworkDir).wait();
104-
105-
this.$fs.symlink(path.join(frameworkDir, "build.gradle"), path.join(this.platformData.projectRoot, "build.gradle")).wait();
106-
this.$fs.symlink(path.join(frameworkDir, "settings.gradle"), path.join(this.platformData.projectRoot, "settings.gradle")).wait();
107103
} else {
108-
this.copy(this.platformData.projectRoot, frameworkDir, "build-tools libs src", "-R");
109-
this.copy(this.platformData.projectRoot, frameworkDir, "build.gradle settings.gradle", "-f");
104+
this.copy(this.platformData.projectRoot, frameworkDir, "build-tools libs", "-R");
110105
}
111106

107+
// These files and directories should not be symlinked as CLI is modifying them and we'll change the original values as well.
108+
this.copy(this.platformData.projectRoot, frameworkDir, "src", "-R");
109+
this.copy(this.platformData.projectRoot, frameworkDir, "build.gradle settings.gradle", "-f");
110+
112111
this.cleanResValues(targetSdkVersion, frameworkVersion).wait();
113112

114113
}).future<any>()();

0 commit comments

Comments
 (0)