tidy up build config files
This commit is contained in:
parent
b2316b0029
commit
ae8ffb91bb
2 changed files with 25 additions and 68 deletions
|
@ -1,9 +1,21 @@
|
|||
import buildsrc.utils.Rife2TestListener
|
||||
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
||||
import org.gradle.api.tasks.testing.logging.TestLogEvent
|
||||
import org.jetbrains.dokka.gradle.DokkaTask
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
import org.jetbrains.dokka.gradle.DokkaTask
|
||||
|
||||
plugins {
|
||||
buildsrc.conventions.lang.`kotlin-jvm`
|
||||
|
@ -14,7 +26,6 @@ plugins {
|
|||
description = "A simple defensive library to encode/decode URL components"
|
||||
|
||||
val deployDir = project.layout.projectDirectory.dir("deploy")
|
||||
val mainClassName = "net.thauvin.erik.urlencoder.UrlEncoder"
|
||||
|
||||
dependencies {
|
||||
// testImplementation("com.willowtreeapps.assertk:assertk-jvm:0.25")
|
||||
|
@ -32,22 +43,6 @@ java {
|
|||
}
|
||||
|
||||
tasks {
|
||||
withType<KotlinCompile>().configureEach {
|
||||
kotlinOptions.jvmTarget = java.targetCompatibility.toString()
|
||||
}
|
||||
|
||||
test {
|
||||
addTestListener(Rife2TestListener(project.properties["testsBadgeApiKey"]?.toString()))
|
||||
}
|
||||
|
||||
withType<Test>().configureEach {
|
||||
useJUnitPlatform()
|
||||
testLogging {
|
||||
exceptionFormat = TestExceptionFormat.FULL
|
||||
events = setOf(TestLogEvent.PASSED, TestLogEvent.SKIPPED, TestLogEvent.FAILED)
|
||||
}
|
||||
}
|
||||
|
||||
withType<GenerateMavenPom>().configureEach {
|
||||
destination = file("$projectDir/pom.xml")
|
||||
}
|
||||
|
@ -59,13 +54,12 @@ tasks {
|
|||
withType<DokkaTask>().configureEach {
|
||||
dokkaSourceSets {
|
||||
named("main") {
|
||||
moduleName.set("UrlEncoder API")
|
||||
moduleName.set("UrlEncoder Library")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val copyToDeploy by registering(Sync::class) {
|
||||
description = "Copies all needed files to the 'deploy' directory."
|
||||
group = PublishingPlugin.PUBLISH_TASK_GROUP
|
||||
from(configurations.runtimeClasspath) {
|
||||
exclude("annotations-*.jar")
|
||||
|
@ -79,10 +73,6 @@ tasks {
|
|||
group = PublishingPlugin.PUBLISH_TASK_GROUP
|
||||
dependsOn(build, copyToDeploy)
|
||||
}
|
||||
|
||||
"sonar" {
|
||||
dependsOn(koverReport)
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue