Browse Source

SONAR-15469 Stop using deprecated Gradle API in SonarQube

tags/9.2.0.49834
Kengo TODA 2 years ago
parent
commit
d0b6b0f341

+ 5
- 5
build.gradle View File

@@ -444,12 +444,12 @@ subprojects {
}

task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
archiveClassifier = 'sources'
from sourceSets.main.allSource
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
archiveClassifier = 'javadoc'
from javadoc.destinationDir
}

@@ -461,9 +461,9 @@ subprojects {

jacocoTestReport {
reports {
xml.enabled true
csv.enabled false
html.enabled false
xml.required = true
csv.required = false
html.required = false
}
}


+ 3
- 3
server/sonar-db-dao/build.gradle View File

@@ -50,13 +50,13 @@ test {
}

task dumpSchema(type:JavaExec) {
main = 'org.sonar.db.dump.DumpSQSchema'
mainClass = 'org.sonar.db.dump.DumpSQSchema'
classpath = sourceSets.test.runtimeClasspath
}
tasks.check.dependsOn dumpSchema

task createDB(type:JavaExec) {
main = 'org.sonar.db.createdb.CreateDb'
mainClass = 'org.sonar.db.createdb.CreateDb'
classpath = sourceSets.test.runtimeClasspath
systemProperty 'orchestrator.configUrl', System.getProperty('orchestrator.configUrl')
if (!project.version.endsWith("-SNAPSHOT")) {
@@ -65,7 +65,7 @@ task createDB(type:JavaExec) {
}

task testJar(type: Jar) {
classifier = 'tests'
archiveClassifier = 'tests'
from sourceSets.test.output
}


+ 4
- 4
sonar-application/build.gradle View File

@@ -33,8 +33,8 @@ configurations {

jar.enabled = false
shadowJar {
baseName = 'sonar-application'
classifier = null
archiveBaseName = 'sonar-application'
archiveClassifier = null
mergeServiceFiles()
manifest {
attributes('Main-Class': 'org.sonar.application.App')
@@ -229,9 +229,9 @@ zip.doLast {

def length = archiveFile.get().asFile.length()
if (length < minLength)
throw new GradleException("$archiveName size ($length) too small. Min is $minLength")
throw new GradleException("${archiveFileName.get()} size ($length) too small. Min is $minLength")
if (length > maxLength)
throw new GradleException("$distsDir/$archiveName size ($length) too large. Max is $maxLength")
throw new GradleException("${destinationDirectory.get()}/${archiveFileName.get()} size ($length) too large. Max is $maxLength")
}
assemble.dependsOn zip


+ 2
- 1
sonar-scanner-protocol/build.gradle View File

@@ -27,9 +27,10 @@ task fatJar(type: Jar) {
manifest {
attributes 'Main-Class': 'org.sonar.scanner.protocol.viewer.ScannerReportViewerApp'
}
baseName = project.name + '-all'
archiveBaseName = project.name + '-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}

build.dependsOn fatJar

+ 1
- 1
sonar-ws-generator/build.gradle View File

@@ -22,7 +22,7 @@ task fatJar(type: Jar) {
manifest {
attributes 'Main-Class': 'org.sonarqube.wsgenerator.Generator'
}
classifier = 'jar-with-dependencies'
archiveClassifier = 'jar-with-dependencies'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}

Loading…
Cancel
Save