remove Sonarqube, and tidy up build config a little

This commit is contained in:
Adam 2023-07-13 14:17:36 +02:00
parent 60feafa3f9
commit 1b0a5aa208
8 changed files with 29 additions and 104 deletions

View file

@ -17,7 +17,7 @@
plugins {
buildsrc.conventions.base
buildsrc.conventions.sonarqube
id("org.jetbrains.kotlinx.kover")
}
group = "net.thauvin.erik"
@ -27,16 +27,3 @@ dependencies {
kover(projects.urlencoderLib)
kover(projects.urlencoderApp)
}
sonar {
properties {
property("sonar.projectName", rootProject.name)
property("sonar.projectKey", "ethauvin_${rootProject.name}")
property("sonar.organization", "ethauvin-github")
property("sonar.host.url", "https://sonarcloud.io")
property("sonar.sourceEncoding", "UTF-8")
property("sonar.coverage.jacoco.xmlReportPaths",
"${project.rootDir}/lib/build/reports/kover/report.xml,${project.rootDir}/app/build/reports/kover/report.xml")
property("sonar.log.level", "DEBUG")
}
}

View file

@ -8,7 +8,6 @@ dependencies {
implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.8.20")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21")
implementation("org.jetbrains.kotlinx:kover-gradle-plugin:0.7.1")
implementation("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:4.2.0.3129")
}
dependencyLocking {

View file

@ -43,8 +43,8 @@ kotlin {
sourceSets.configureEach {
languageSettings {
// languageVersion =
// apiVersion =
// languageVersion =
// apiVersion =
}
}
}

View file

@ -2,7 +2,6 @@ package buildsrc.conventions.lang
plugins {
id("buildsrc.conventions.lang.kotlin-multiplatform-base")
id("buildsrc.conventions.sonarqube")
}
kotlin {
@ -10,13 +9,3 @@ kotlin {
withJava()
}
}
sonar {
properties {
property("sonar.sources", "src/jvmMain/kotlin")
property("sonar.test", "src/jvmTest/kotlin")
property("sonar.junit.reportPaths", "build/test-results/jvmTest")
property("sonar.surefire.reportsPath", "build/test-results/jvmTest")
}
}

View file

@ -34,7 +34,6 @@ kotlin {
// ├── watchosX64
// └── watchosSimulatorArm64Main
targets {
linuxX64()
mingwX64()
@ -50,7 +49,6 @@ kotlin {
iosSimulatorArm64()
tvosSimulatorArm64()
watchosSimulatorArm64()
}
@Suppress("UNUSED_VARIABLE")
sourceSets {
@ -79,22 +77,22 @@ kotlin {
val iosMain by getting { dependsOn(nativeMain) }
val iosTest by getting { dependsOn(nativeTest) }
// val iosSimulatorArm64Main by getting { dependsOn(iosMain) }
// val iosSimulatorArm64Test by getting { dependsOn(iosTest) }
// val iosSimulatorArm64Main by getting { dependsOn(iosMain) }
// val iosSimulatorArm64Test by getting { dependsOn(iosTest) }
// // Apple - tvOS
// val tvosMain by getting { dependsOn(nativeMain) }
// val tvosTest by getting { dependsOn(nativeTest) }
//
// val tvosSimulatorArm64Main by getting { dependsOn(tvosMain) }
// val tvosSimulatorArm64Test by getting { dependsOn(tvosTest) }
//
// // Apple - watchOS
// val watchosMain by getting { dependsOn(nativeMain) }
// val watchosTest by getting { dependsOn(nativeTest) }
//
// val watchosSimulatorArm64Main by getting { dependsOn(watchosMain) }
// val watchosSimulatorArm64Test by getting { dependsOn(watchosTest) }
// // Apple - tvOS
// val tvosMain by getting { dependsOn(nativeMain) }
// val tvosTest by getting { dependsOn(nativeTest) }
// val tvosSimulatorArm64Main by getting { dependsOn(tvosMain) }
// val tvosSimulatorArm64Test by getting { dependsOn(tvosTest) }
// // Apple - watchOS
// val watchosMain by getting { dependsOn(nativeMain) }
// val watchosTest by getting { dependsOn(nativeTest) }
// val watchosSimulatorArm64Main by getting { dependsOn(watchosMain) }
// val watchosSimulatorArm64Test by getting { dependsOn(watchosTest) }
// val iosArm32Main by getting { dependsOn(desktopMain) }
// val iosArm32Test by getting { dependsOn(nativeTest) }

View file

@ -1,46 +0,0 @@
/*
* Copyright 2001-2023 Geert Bevin (gbevin[remove] at uwyn dot com)
* Copyright 2022-2023 Erik C. Thauvin (erik@thauvin.net)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package buildsrc.conventions
import org.sonarqube.gradle.SonarExtension.SONAR_DEPRECATED_TASK_NAME
import org.sonarqube.gradle.SonarTask
/**
* Convention plugin for SonarQube analysis.
*
* SonarQube depends on an aggregated XML coverage report from
* [Kotlinx Kover](https://github.com/Kotlin/kotlinx-kover).
* See the Kover docs for
* [how to aggregate coverage reports](https://kotlin.github.io/kotlinx-kover/gradle-plugin/#multiproject-build).
*/
plugins {
id("org.sonarqube")
id("org.jetbrains.kotlinx.kover")
}
tasks.withType<SonarTask>().configureEach {
dependsOn(tasks.withType<Test>())
// workaround for https://github.com/Kotlin/kotlinx-kover/issues/394
dependsOn(tasks.matching { it.name == "koverXmlReport" })
}
tasks.matching { it.name == SONAR_DEPRECATED_TASK_NAME }.configureEach {
// this task is deprecated, use 'sonar' instead
group = "other"
}

View file

@ -20,7 +20,6 @@ import org.jetbrains.dokka.gradle.DokkaTask
plugins {
buildsrc.conventions.lang.`kotlin-multiplatform-jvm`
buildsrc.conventions.publishing
buildsrc.conventions.sonarqube
id("application")
id("com.github.ben-manes.versions")
}

View file

@ -20,7 +20,6 @@ import org.jetbrains.dokka.gradle.DokkaTask
plugins {
buildsrc.conventions.lang.`kotlin-multiplatform-jvm`
buildsrc.conventions.publishing
buildsrc.conventions.sonarqube
id("com.github.ben-manes.versions")
}