Browse Source

SONAR-17566 Drop jdk11 support for running the SonarQube server

tags/9.9.0.65466
Matteo Mara 1 year ago
parent
commit
4a1916621a

+ 0
- 26
.cirrus.yml View File

@@ -303,32 +303,6 @@ qa_task:
- ./private/cirrus/cirrus-qa.sh postgres
<<: *DEFAULT_ARTIFACTS_TEMPLATE

qa_java11_task:
<<: *DEFAULT_TEMPLATE
<<: *BUILD_DEPENDANT_TASK_TEMPLATE
<<: *GRADLE_CACHE_TEMPLATE
<<: *JAR_CACHE_TEMPLATE
gke_container:
dockerfile: private/docker/Dockerfile-build-java11
builder_image_project: sonarqube-team
builder_image_name: family/docker-builder
cluster_name: cirrus-ci-cluster
zone: us-central1-a
namespace: default
cpu: 2
memory: 6Gb
additional_containers:
- <<: *POSTGRES_ADDITIONAL_CONTAINER_TEMPLATE
env:
matrix:
- QA_CATEGORY: Cat1
- QA_CATEGORY: CommunityEditionWithPlugins
- QA_CATEGORY: ComputeEngine
- QA_CATEGORY: Upgrade
script:
- ./private/cirrus/cirrus-qa.sh postgres
<<: *DEFAULT_ARTIFACTS_TEMPLATE

task: #bitbucket
<<: *DEFAULT_TEMPLATE
<<: *BUILD_DEPENDANT_TASK_TEMPLATE

+ 4
- 5
build.gradle View File

@@ -1,5 +1,7 @@
import groovy.json.JsonOutput

import static org.gradle.api.JavaVersion.VERSION_17

plugins {
// Ordered alphabetically
id 'com.github.hierynomus.license' version '0.16.1'
@@ -13,8 +15,8 @@ plugins {
id 'org.sonarqube' version '3.5.0.2730'
}

if (!JavaVersion.current().java11Compatible) {
throw new GradleException("JDK 11+ is required to perform this build. It's currently " + System.getProperty("java.home") + ".")
if (!JavaVersion.current().isCompatibleWith(VERSION_17)) {
throw new GradleException("JDK 17+ is required to perform this build. It's currently " + System.getProperty("java.home") + ".")
}

/**
@@ -146,9 +148,6 @@ subprojects {
// do not deploy to Artifactory by default
artifactoryPublish.skip = true

// Produce Java 11 bytecode while making sure the code does not use any APIs from Java 17
compileJava.options.release = 11

compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"


+ 5
- 0
plugins/sonar-xoo-plugin/build.gradle View File

@@ -33,6 +33,11 @@ jar {

artifactoryPublish.skip = false

// Produce Java 11 bytecode while making sure the code does not use any APIs from Java 17
tasks.withType(JavaCompile) {
options.release = 11
}

publishing {
publications {
mavenJava(MavenPublication) {

+ 5
- 0
sonar-core/build.gradle View File

@@ -37,6 +37,11 @@ dependencies {
testCompileOnly 'com.google.code.findbugs:jsr305'
}

// Produce Java 11 bytecode while making sure the code does not use any APIs from Java 17
tasks.withType(JavaCompile) {
options.release = 11
}

// Used by sonar-db-core to run DB Unit Tests
artifactoryPublish.skip = false
publishing {

+ 5
- 0
sonar-duplications/build.gradle View File

@@ -19,3 +19,8 @@ dependencies {
testImplementation 'org.hamcrest:hamcrest-core'
testImplementation 'org.mockito:mockito-core'
}

// Produce Java 11 bytecode while making sure the code does not use any APIs from Java 17
tasks.withType(JavaCompile) {
options.release = 11
}

+ 5
- 0
sonar-markdown/build.gradle View File

@@ -17,6 +17,11 @@ dependencies {

artifactoryPublish.skip = false

// Produce Java 11 bytecode while making sure the code does not use any APIs from Java 17
tasks.withType(JavaCompile) {
options.release = 11
}

publishing {
publications {
mavenJava(MavenPublication) {

+ 5
- 0
sonar-plugin-api-impl/build.gradle View File

@@ -34,6 +34,11 @@ processResources {

artifactoryPublish.skip = false

// Produce Java 11 bytecode while making sure the code does not use any APIs from Java 17
tasks.withType(JavaCompile) {
options.release = 11
}

publishing {
publications {
mavenJava(MavenPublication) {

+ 5
- 0
sonar-scanner-engine/build.gradle View File

@@ -66,6 +66,11 @@ license {

artifactoryPublish.skip = false

// Produce Java 11 bytecode while making sure the code does not use any APIs from Java 17
tasks.withType(JavaCompile) {
options.release = 11
}

// Used by core plugins
publishing {
publications {

+ 5
- 0
sonar-scanner-protocol/build.gradle View File

@@ -33,6 +33,11 @@ task fatJar(type: Jar) {

build.dependsOn fatJar

// Produce Java 11 bytecode while making sure the code does not use any APIs from Java 17
tasks.withType(JavaCompile) {
options.release = 11
}

// Used by sonar-db-core to run DB Unit Tests
artifactoryPublish.skip = false
publishing {

+ 5
- 0
sonar-testing-harness/build.gradle View File

@@ -19,6 +19,11 @@ dependencies {
compileOnlyApi 'com.google.code.findbugs:jsr305'
}

// Produce Java 11 bytecode while making sure the code does not use any APIs from Java 17
tasks.withType(JavaCompile) {
options.release = 11
}

artifactoryPublish.skip = false
publishing {
publications {

+ 5
- 0
sonar-ws/build.gradle View File

@@ -33,6 +33,11 @@ dependencies {

artifactoryPublish.skip = false

// Produce Java 11 bytecode while making sure the code does not use any APIs from Java 17
tasks.withType(JavaCompile) {
options.release = 11
}

publishing {
publications {
mavenJava(MavenPublication) {

Loading…
Cancel
Save