Skip to content

Commit

Permalink
Merge pull request #30513 from glefloch/fix/30453
Browse files Browse the repository at this point in the history
Limit application.properties lookup to main source set
  • Loading branch information
aloubyansky authored Jan 23, 2023
2 parents 653954d + 2ead515 commit e634fe0
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,11 @@ private String expandConfigurationKey(String shortKey) {

private String getPropValueWithPrecedence(final String propName, final java.util.Optional<String> defaultValue) {
if (applicationProperties.isEmpty()) {
FileCollection classpathFiles = getClasspath()
SourceSet mainSourceSet = QuarkusGradleUtils.getSourceSet(getProject(), SourceSet.MAIN_SOURCE_SET_NAME);

FileCollection configFiles = mainSourceSet.getResources()
.filter(file -> "application.properties".equalsIgnoreCase(file.getName()));
classpathFiles.forEach(file -> {
configFiles.forEach(file -> {
FileInputStream appPropsIS = null;
try {
appPropsIS = new FileInputStream(file.getAbsoluteFile());
Expand Down

0 comments on commit e634fe0

Please sign in to comment.