Skip to content

Commit

Permalink
feat: bump all plugins and dependencies to latest versions (#14)
Browse files Browse the repository at this point in the history
BREAKING CHANGE
some of these changes are not working with older version of the plugins (eg. sonarqube).

Co-authored-by: May, Markus <mmay@conet.de>
  • Loading branch information
triplem and May, Markus authored Jan 26, 2023
1 parent 9468303 commit d30e3f3
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 25 deletions.
14 changes: 7 additions & 7 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ dependencies {
implementation(kotlin("gradle-plugin", kotlinVersion))
implementation(kotlin("bom", kotlinVersion))
implementation(kotlin("reflect"))
implementation(kotlin("stdlib-jdk8"))
implementation("org.jetbrains.dokka:dokka-gradle-plugin:$kotlinVersion") {
implementation(kotlin("stdlib"))
implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.7.20") {
exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk8")
}
implementation("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.3")
implementation("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.19.0") {
implementation("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.5.0.2730")
implementation("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.22.0") {
exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk8")
}
implementation("org.owasp:dependency-check-gradle:6.5.3")
implementation("org.asciidoctor:asciidoctor-gradle-jvm:3.3.2")
implementation("com.bmuschko:gradle-docker-plugin:6.7.0")
implementation("org.owasp:dependency-check-gradle:8.0.1")
implementation("org.asciidoctor:asciidoctor-gradle-jvm:4.0.0-alpha.1")
implementation("com.bmuschko:gradle-docker-plugin:9.1.0")
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import io.gitlab.arturbosch.detekt.Detekt
import org.owasp.dependencycheck.reporting.ReportGenerator
import org.sonarqube.gradle.SonarQubeTask
import org.sonarqube.gradle.SonarTask

plugins {
id("org.javafreedom.verification.jacoco-consumer-conventions")
Expand Down Expand Up @@ -47,15 +47,15 @@ subprojects {
sonarTestSources.add("src/testIntegration")
val testDirs = sonarTestSources.filter { baseDir.resolve(it).exists() }.joinToString()

sonarqube {
sonar {
properties {
property("sonar.sources", "src/main")
property("sonar.kotlin.detekt.reportPaths", reportsDir)
property("sonar.tests", testDirs)
}
}

tasks.withType<SonarQubeTask>().configureEach {
tasks.withType<SonarTask>().configureEach {
shouldRunAfter("detekt")
}
}
Expand All @@ -69,8 +69,7 @@ dependencyCheck {

// remove plugin dependencies, for configs see
// https://docs.gradle.org/current/userguide/java_plugin.html#sec:java_plugin_and_dependency_management
val validConfigurations = listOf("compileClasspath", "runtimeClasspath", "testCompileClasspath",
"testRuntimeClasspath", "default")
val validConfigurations = listOf("compileClasspath", "runtimeClasspath", "default")
scanConfigurations = configurations.names
.filter { validConfigurations.contains(it) }
.toList()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ detekt {
dependencies {
constraints {
// Define dependency versions as constraints
implementation("org.apache.commons:commons-text:1.9")
implementation("org.apache.commons:commons-text:1.10.0")
}

// Align versions of all Kotlin components
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))

// Use the Kotlin JDK 8 standard library.
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlin:kotlin-stdlib")

// Add additonal dependencies useful for development
implementation("io.github.microutils:kotlin-logging:2.1.21")
implementation("io.github.microutils:kotlin-logging:3.0.4")
testImplementation("com.willowtreeapps.assertk:assertk-jvm:0.25")
testImplementation(kotlin("test"))
testImplementation(kotlin("test-junit5"))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.javafreedom.verification

import org.sonarqube.gradle.SonarQubeTask
import org.sonarqube.gradle.SonarTask

plugins {
`java-library`
Expand All @@ -10,7 +10,7 @@ plugins {
val github_org: String by project
val github_project_url = "https://github.com/${github_org}/${rootProject.name}"

sonarqube {
sonar {
properties {
// See https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Gradle#AnalyzingwithSonarQubeScannerforGradle-Configureanalysisproperties
property("sonar.sourceEncoding", "UTF-8")
Expand All @@ -29,10 +29,6 @@ sonarqube {
}
}

tasks.withType<SonarQubeTask>().configureEach {
tasks.withType<SonarTask>().configureEach {
dependsOn(project.tasks.named("aggregateJacocoTestReport"))
}

//tasks.named("check") {
// dependsOn("sonarqube")
//}
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ github_org=triplem
org.gradle.jvmargs=-XX:MaxMetaspaceSize=512m
org.gradle.caching=true

kotlinVersion=1.6.10
junitVersion=5.8.2
kotlinVersion=1.8.0
junitVersion=5.9.2
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit d30e3f3

Please sign in to comment.