Update Build.cs

sorry, I forgot to update the script file linked in the documentation last time
This commit is contained in:
Fuling 2019-10-04 17:37:52 +08:00 committed by GitHub
parent fa7a82b03f
commit 20e25167e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -58,6 +58,9 @@ public class Build : MonoBehaviour
var build_file = Path.Combine(androidExportPath, "build.gradle");
var build_text = File.ReadAllText(build_file);
build_text = build_text.Replace("com.android.application", "com.android.library");
build_text = build_text.Replace("bundle {", "splits {");
build_text = build_text.Replace("enableSplit = false", "enable false");
build_text = build_text.Replace("enableSplit = true", "enable true");
build_text = build_text.Replace("implementation fileTree(dir: 'libs', include: ['*.jar'])", "implementation project(':unity-classes')");
build_text = Regex.Replace(build_text, @"\n.*applicationId '.+'.*\n", "\n");
File.WriteAllText(build_file, build_text);
@ -116,4 +119,4 @@ public class Build : MonoBehaviour
return scenes;
}
}
}