Browse Source

SONAR-21219 fixed an issue where generating package-info on Windows would break the build

tags/10.5.0.89998
lukasz-jarocki-sonarsource 1 month ago
parent
commit
837d9043fc
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      build.gradle

+ 2
- 2
build.gradle View File

@@ -514,8 +514,8 @@ subprojects {
String packageInfoPath = it + "/package-info.java"
File packageInfoFile = new File (packageInfoPath)
if (!packageInfoFile.exists()) {
logger.warn("Creating file: " + packageInfoPath)
def packageName = packageInfoFile.getParent().takeAfter("src/main/java/").replaceAll("/", "\\.")
logger.info("Creating file: " + packageInfoPath)
def packageName = packageInfoFile.getParent().replaceAll("[\\\\ /]", ".").takeAfter("src.main.java.");
String packageInfoContent = applyPackageInfoTemplate(packageName)
packageInfoFile << packageInfoContent
}

Loading…
Cancel
Save