Skip to content

Commit

Permalink
Copy gradle.properties iff exists
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrolamarao committed Feb 20, 2024
1 parent cb627bf commit b9576c4
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,6 @@ public void composite () throws IOException
"""
);

Files.copy(projectDir.resolve("gradle.properties"),baseDir.resolve("gradle.properties"));

// intermediate library

final var middleDir = projectDir.resolve("middle");
Expand Down Expand Up @@ -327,8 +325,6 @@ int main (int argc, char * argv [])
"""
);

Files.copy(projectDir.resolve("gradle.properties"),middleDir.resolve("gradle.properties"));

// application

final var applicationDir = projectDir.resolve("application");
Expand Down Expand Up @@ -368,7 +364,13 @@ int main (int argc, char * argv [])
"""
);

Files.copy(projectDir.resolve("gradle.properties"),applicationDir.resolve("gradle.properties"));
// root

if (Files.exists(projectDir.resolve("gradle.properties"))) {
Files.copy(projectDir.resolve("gradle.properties"),baseDir.resolve("gradle.properties"));
Files.copy(projectDir.resolve("gradle.properties"),middleDir.resolve("gradle.properties"));
Files.copy(projectDir.resolve("gradle.properties"),applicationDir.resolve("gradle.properties"));
}

Files.writeString(projectDir.resolve("settings.gradle.kts"),
"""
Expand Down

0 comments on commit b9576c4

Please sign in to comment.