Skip to content

Commit 9b286e2

Browse files
committed
open for android studio
1 parent 198ce4a commit 9b286e2

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
2.62 KB
Binary file not shown.

Assets/AndroidIl2cppPatchDemo/Editor/AndroidBuilder.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,17 @@ public static bool GenerateBuildScripts()
369369
.Replace(".apk", ".aab")
370370
.Replace("apk", "bundle"));
371371

372+
// gradle java home
373+
string gradleConfigDir = ANDROID_PROJECT_PATH + "/.gradle/";
374+
if (!Directory.Exists(gradleConfigDir)) { Directory.CreateDirectory(gradleConfigDir); }
375+
string gradleConfigFile = gradleConfigDir + "config.properties";
376+
string content = "java.home=" + jdkPath + "\n";
377+
File.WriteAllText(gradleConfigFile, content
378+
.Replace("\\", "\\\\")
379+
.Replace("/", "\\\\")
380+
.Replace(":", "\\:")
381+
);
382+
372383
return true;
373384
}
374385

0 commit comments

Comments
 (0)