Skip to content

Commit

Permalink
build: Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
felipebz committed Jul 20, 2023
1 parent 2ffd9bc commit f424ffd
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 36 deletions.
8 changes: 4 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ plugins {
`maven-publish`
signing
jacoco
kotlin("jvm") version "1.8.20"
id("org.jetbrains.dokka") version ("1.8.10")
kotlin("jvm") version "1.9.0"
id("org.jetbrains.dokka") version ("1.8.20")
id("com.github.hierynomus.license") version "0.16.1"
id("org.sonarqube") version "4.0.0.2929"
id("org.jreleaser") version "1.6.0"
id("org.sonarqube") version "4.3.0.3225"
id("org.jreleaser") version "1.7.0"
}

allprojects {
Expand Down
14 changes: 7 additions & 7 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
object Versions {
const val junit = "5.9.1"
const val assertj = "3.23.1"
const val mockito = "4.9.0"
const val mockito_kotlin = "4.0.0"
const val junit = "5.9.3"
const val assertj = "3.24.2"
const val mockito = "5.4.0"
const val mockito_kotlin = "5.0.0"
const val flr = "1.2.0"
const val gson = "2.10"
const val jsoup = "1.15.3"
const val gson = "2.10.1"
const val jsoup = "1.16.1"
const val min_sonarqube = "9.9.0.65466"
const val min_sonarqube_api = "9.14.0.375"
const val sonarqube_orchestrator = "3.40.0.183"
const val sonarqube_orchestrator = "4.0.0.404"

const val plugin_shadow = "7.1.2"
}
Expand Down
9 changes: 2 additions & 7 deletions sonar-zpa-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import groovy.util.NodeList
import java.time.ZoneId
import java.time.format.DateTimeFormatter
import java.util.*
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
id("com.github.johnrengelman.shadow") version Versions.plugin_shadow
Expand All @@ -28,22 +27,18 @@ testing {
dependencies {
implementation(Libs.assertj)
implementation("org.sonarsource.sonarqube:sonar-ws:${Versions.min_sonarqube}")
implementation("org.sonarsource.orchestrator:sonar-orchestrator:${Versions.sonarqube_orchestrator}")
runtimeOnly("org.junit.vintage:junit-vintage-engine")
implementation("org.sonarsource.orchestrator:sonar-orchestrator-junit5:${Versions.sonarqube_orchestrator}")
}

targets {
all {
testTask.configure {
val runtimeVersion = System.getProperty("sonar.runtimeVersion", "LATEST_RELEASE[8.9]")
val runtimeVersion = System.getProperty("sonar.runtimeVersion", "LATEST_RELEASE[9.9]")

javaLauncher.set(javaToolchains.launcherFor {
languageVersion.set(JavaLanguageVersion.of(17))
})

filter {
includeTestsMatching("org.sonar.plsqlopen.it.Tests")
}
systemProperty("java.awt.headless", "true")
systemProperty("sonar.runtimeVersion", runtimeVersion)
outputs.upToDateWhen { false }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ package org.sonar.plsqlopen.it

import org.assertj.core.api.Assertions.assertThat
import org.assertj.core.api.Assertions.tuple
import org.junit.BeforeClass
import org.junit.ClassRule
import org.junit.Test
import org.junit.jupiter.api.BeforeAll
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.RegisterExtension
import org.sonarqube.ws.client.issues.SearchRequest
import java.io.File

Expand All @@ -46,11 +46,11 @@ class IssueTest {
private const val PROJECT_KEY = "issue"

@JvmField
@ClassRule
@RegisterExtension
val orchestrator = Tests.ORCHESTRATOR

@JvmStatic
@BeforeClass
@BeforeAll
fun init() {
orchestrator.server.provisionProject(PROJECT_KEY, PROJECT_KEY)
orchestrator.server.associateProjectToQualityProfile(PROJECT_KEY, "plsqlopen", "it-profile")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
package org.sonar.plsqlopen.it

import org.assertj.core.api.Assertions.assertThat
import org.junit.BeforeClass
import org.junit.ClassRule
import org.junit.Test
import org.junit.jupiter.api.BeforeAll
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.RegisterExtension
import org.sonarqube.ws.Measures
import org.sonarqube.ws.client.measures.ComponentRequest
import java.io.File
Expand Down Expand Up @@ -94,14 +94,14 @@ class MetricsTest {
companion object {

@JvmField
@ClassRule
@RegisterExtension
var orchestrator = Tests.ORCHESTRATOR

private const val PROJECT_KEY = "metrics"
private const val FILE_NAME = "$PROJECT_KEY:src/source1.sql"

@JvmStatic
@BeforeClass
@BeforeAll
fun init() {
orchestrator.server.provisionProject(PROJECT_KEY, PROJECT_KEY)
orchestrator.server.associateProjectToQualityProfile(PROJECT_KEY, "plsqlopen", "empty-profile")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,19 @@ package org.sonar.plsqlopen.it

import com.sonar.orchestrator.Orchestrator
import com.sonar.orchestrator.build.SonarScanner
import com.sonar.orchestrator.junit5.OrchestratorExtension
import com.sonar.orchestrator.locator.FileLocation
import org.junit.ClassRule
import org.junit.runner.RunWith
import org.junit.runners.Suite
import org.junit.jupiter.api.extension.RegisterExtension
import org.sonarqube.ws.client.HttpConnector
import org.sonarqube.ws.client.WsClient
import org.sonarqube.ws.client.WsClientFactories
import java.io.File

@RunWith(Suite::class)
@Suite.SuiteClasses(MetricsTest::class, IssueTest::class)
object Tests {

@JvmField
@ClassRule
val ORCHESTRATOR: Orchestrator = Orchestrator.builderEnv()
@RegisterExtension
val ORCHESTRATOR: Orchestrator = OrchestratorExtension.builderEnv()
.useDefaultAdminCredentialsForBuilds(true)
.setSonarVersion(System.getProperty("sonar.runtimeVersion", "LATEST_RELEASE[8.9]"))
.addPlugin(FileLocation.byWildcardMavenFilename(
Expand All @@ -46,7 +43,8 @@ object Tests {
File("../plsql-custom-rules/build/libs"),
"plsql-custom-rules-*.jar"))
.restoreProfileAtStartup(FileLocation.ofClasspath("/org/sonar/plsqlopen/it/it-profile.xml"))
.restoreProfileAtStartup(FileLocation.ofClasspath("/org/sonar/plsqlopen/it/empty-profile.xml")).build()
.restoreProfileAtStartup(FileLocation.ofClasspath("/org/sonar/plsqlopen/it/empty-profile.xml"))
.build()

fun createSonarScanner(): SonarScanner = SonarScanner.create()

Expand Down

0 comments on commit f424ffd

Please sign in to comment.