From 150964c272076babccd1d1fdd837d0324cdbd4ad Mon Sep 17 00:00:00 2001 From: Jeremy Davis Date: Tue, 3 Dec 2024 10:59:33 +0100 Subject: SONAR-23492 OSS repo builds properly --- sonar-application/build.gradle | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'sonar-application') diff --git a/sonar-application/build.gradle b/sonar-application/build.gradle index d7dfd63886f..31e72eb12db 100644 --- a/sonar-application/build.gradle +++ b/sonar-application/build.gradle @@ -76,13 +76,13 @@ dependencies { jdbc_mssql 'com.microsoft.sqlserver:mssql-jdbc' jdbc_postgresql 'org.postgresql:postgresql' + webapp 'org.sonarsource.sonarqube:webapp-assets' def artifactoryUsername = System.env.'ARTIFACTORY_PRIVATE_USERNAME' ?: (project.hasProperty('artifactoryUsername') ? project.getProperty('artifactoryUsername') : '') def artifactoryPassword = System.env.'ARTIFACTORY_PRIVATE_PASSWORD' ?: (project.hasProperty('artifactoryPassword') ? project.getProperty('artifactoryPassword') : '') if (artifactoryUsername && artifactoryPassword) { zipDist "sonarqube:elasticsearch:${elasticSearchServerVersion}-no-jdk@tar.gz" - webapp 'com.sonarsource.sonarqube:webapp-assets' } else { zipDist "elasticsearch:elasticsearch:${elasticSearchServerVersion}-linux-x86_64@tar.gz" } @@ -312,15 +312,10 @@ task zip(type: Zip, dependsOn: [configurations.compileClasspath]) { def webappBuildPath = System.getenv('WEBAPP_BUILD_PATH') - def artifactoryUsername = System.env.'ARTIFACTORY_PRIVATE_USERNAME' ?: (project.hasProperty('artifactoryUsername') ? project.getProperty('artifactoryUsername') : '') - def artifactoryPassword = System.env.'ARTIFACTORY_PRIVATE_PASSWORD' ?: (project.hasProperty('artifactoryPassword') ? project.getProperty('artifactoryPassword') : '') - if (webappBuildPath == null && artifactoryUsername && artifactoryPassword) { + if (webappBuildPath == null) { from(zipTree(configurations.webapp.singleFile)) } else { - // TODO: fix default location! - webappBuildPath ?= "../sonarqube-webapp/server/sonar-web/build/webapp" - assert rootProject.file(webappBuildPath).exists() from(rootProject.fileTree(webappBuildPath)) -- cgit v1.2.3