remove Sonarqube, and tidy up build config a little
This commit is contained in:
parent
60feafa3f9
commit
1b0a5aa208
8 changed files with 29 additions and 104 deletions
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
buildsrc.conventions.base
|
buildsrc.conventions.base
|
||||||
buildsrc.conventions.sonarqube
|
id("org.jetbrains.kotlinx.kover")
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "net.thauvin.erik"
|
group = "net.thauvin.erik"
|
||||||
|
@ -27,16 +27,3 @@ dependencies {
|
||||||
kover(projects.urlencoderLib)
|
kover(projects.urlencoderLib)
|
||||||
kover(projects.urlencoderApp)
|
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")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -8,7 +8,6 @@ dependencies {
|
||||||
implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.8.20")
|
implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.8.20")
|
||||||
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21")
|
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21")
|
||||||
implementation("org.jetbrains.kotlinx:kover-gradle-plugin:0.7.1")
|
implementation("org.jetbrains.kotlinx:kover-gradle-plugin:0.7.1")
|
||||||
implementation("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:4.2.0.3129")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencyLocking {
|
dependencyLocking {
|
||||||
|
|
|
@ -43,8 +43,8 @@ kotlin {
|
||||||
|
|
||||||
sourceSets.configureEach {
|
sourceSets.configureEach {
|
||||||
languageSettings {
|
languageSettings {
|
||||||
// languageVersion =
|
// languageVersion =
|
||||||
// apiVersion =
|
// apiVersion =
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@ package buildsrc.conventions.lang
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("buildsrc.conventions.lang.kotlin-multiplatform-base")
|
id("buildsrc.conventions.lang.kotlin-multiplatform-base")
|
||||||
id("buildsrc.conventions.sonarqube")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
|
@ -10,13 +9,3 @@ kotlin {
|
||||||
withJava()
|
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")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -34,23 +34,21 @@ kotlin {
|
||||||
// ├── watchosX64
|
// ├── watchosX64
|
||||||
// └── watchosSimulatorArm64Main
|
// └── watchosSimulatorArm64Main
|
||||||
|
|
||||||
targets {
|
linuxX64()
|
||||||
linuxX64()
|
|
||||||
|
|
||||||
mingwX64()
|
mingwX64()
|
||||||
|
|
||||||
macosX64()
|
macosX64()
|
||||||
macosArm64()
|
macosArm64()
|
||||||
|
|
||||||
// https://kotlinlang.org/docs/multiplatform-share-on-platforms.html#use-target-shortcuts
|
// https://kotlinlang.org/docs/multiplatform-share-on-platforms.html#use-target-shortcuts
|
||||||
ios() // iosArm64, iosX64
|
ios() // iosArm64, iosX64
|
||||||
watchos() // watchosArm32, watchosArm64, watchosX64
|
watchos() // watchosArm32, watchosArm64, watchosX64
|
||||||
tvos() // tvosArm64, tvosX64
|
tvos() // tvosArm64, tvosX64
|
||||||
|
|
||||||
iosSimulatorArm64()
|
iosSimulatorArm64()
|
||||||
tvosSimulatorArm64()
|
tvosSimulatorArm64()
|
||||||
watchosSimulatorArm64()
|
watchosSimulatorArm64()
|
||||||
}
|
|
||||||
|
|
||||||
@Suppress("UNUSED_VARIABLE")
|
@Suppress("UNUSED_VARIABLE")
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
@ -79,22 +77,22 @@ kotlin {
|
||||||
val iosMain by getting { dependsOn(nativeMain) }
|
val iosMain by getting { dependsOn(nativeMain) }
|
||||||
val iosTest by getting { dependsOn(nativeTest) }
|
val iosTest by getting { dependsOn(nativeTest) }
|
||||||
|
|
||||||
// val iosSimulatorArm64Main by getting { dependsOn(iosMain) }
|
// val iosSimulatorArm64Main by getting { dependsOn(iosMain) }
|
||||||
// val iosSimulatorArm64Test by getting { dependsOn(iosTest) }
|
// val iosSimulatorArm64Test by getting { dependsOn(iosTest) }
|
||||||
|
|
||||||
// // Apple - tvOS
|
// // Apple - tvOS
|
||||||
// val tvosMain by getting { dependsOn(nativeMain) }
|
// val tvosMain by getting { dependsOn(nativeMain) }
|
||||||
// val tvosTest by getting { dependsOn(nativeTest) }
|
// val tvosTest by getting { dependsOn(nativeTest) }
|
||||||
//
|
|
||||||
// val tvosSimulatorArm64Main by getting { dependsOn(tvosMain) }
|
// val tvosSimulatorArm64Main by getting { dependsOn(tvosMain) }
|
||||||
// val tvosSimulatorArm64Test by getting { dependsOn(tvosTest) }
|
// val tvosSimulatorArm64Test by getting { dependsOn(tvosTest) }
|
||||||
//
|
|
||||||
// // Apple - watchOS
|
// // Apple - watchOS
|
||||||
// val watchosMain by getting { dependsOn(nativeMain) }
|
// val watchosMain by getting { dependsOn(nativeMain) }
|
||||||
// val watchosTest by getting { dependsOn(nativeTest) }
|
// val watchosTest by getting { dependsOn(nativeTest) }
|
||||||
//
|
|
||||||
// val watchosSimulatorArm64Main by getting { dependsOn(watchosMain) }
|
// val watchosSimulatorArm64Main by getting { dependsOn(watchosMain) }
|
||||||
// val watchosSimulatorArm64Test by getting { dependsOn(watchosTest) }
|
// val watchosSimulatorArm64Test by getting { dependsOn(watchosTest) }
|
||||||
|
|
||||||
// val iosArm32Main by getting { dependsOn(desktopMain) }
|
// val iosArm32Main by getting { dependsOn(desktopMain) }
|
||||||
// val iosArm32Test by getting { dependsOn(nativeTest) }
|
// val iosArm32Test by getting { dependsOn(nativeTest) }
|
||||||
|
|
|
@ -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"
|
|
||||||
}
|
|
|
@ -20,7 +20,6 @@ import org.jetbrains.dokka.gradle.DokkaTask
|
||||||
plugins {
|
plugins {
|
||||||
buildsrc.conventions.lang.`kotlin-multiplatform-jvm`
|
buildsrc.conventions.lang.`kotlin-multiplatform-jvm`
|
||||||
buildsrc.conventions.publishing
|
buildsrc.conventions.publishing
|
||||||
buildsrc.conventions.sonarqube
|
|
||||||
id("application")
|
id("application")
|
||||||
id("com.github.ben-manes.versions")
|
id("com.github.ben-manes.versions")
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,6 @@ import org.jetbrains.dokka.gradle.DokkaTask
|
||||||
plugins {
|
plugins {
|
||||||
buildsrc.conventions.lang.`kotlin-multiplatform-jvm`
|
buildsrc.conventions.lang.`kotlin-multiplatform-jvm`
|
||||||
buildsrc.conventions.publishing
|
buildsrc.conventions.publishing
|
||||||
buildsrc.conventions.sonarqube
|
|
||||||
id("com.github.ben-manes.versions")
|
id("com.github.ben-manes.versions")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue