Skip to content

Commit

Permalink
update paths
Browse files Browse the repository at this point in the history
  • Loading branch information
jperedadnr committed Aug 8, 2024
1 parent 15cffff commit aacf322
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -536,14 +536,13 @@ private void prepareAndroidFiles() throws IOException {
Path sourcePath = paths.getSourcePath().resolve(targetOS);

Path userBuild = sourcePath.resolve(Constants.BUILD_FILE);
Path targetBuild = getAndroidProjectMainPath().resolve(Constants.BUILD_FILE);
Path targetBuild = getAndroidProjectPath().resolve("app").resolve(Constants.BUILD_FILE);
Path generatedBuild = paths.getGenPath().resolve(targetOS).resolve(Constants.BUILD_FILE);

if (!Files.exists(userBuild)) {
// use default build.gradle
Path buildPath = getAndroidProjectPath().resolve("app").resolve(Constants.BUILD_FILE);
FileOps.replaceInFile(buildPath, "namespace 'com.gluonhq.helloandroid'", "namespace '" + getAndroidPackageName() + "'");
FileOps.replaceInFile(buildPath,
FileOps.replaceInFile(targetBuild, "namespace 'com.gluonhq.helloandroid'", "namespace '" + getAndroidPackageName() + "'");
FileOps.replaceInFile(targetBuild,
"// OTHER_ANDROID_DEPENDENCIES", String.join("\n ", requiredDependencies()));
FileOps.copyFile(targetBuild, generatedBuild);
Logger.logInfo("Default build.gradle file generated in " + generatedBuild + ".\n" +
Expand Down

0 comments on commit aacf322

Please sign in to comment.