restructure project to Kotlin Multiplatform
- custom POM location removed (there are now two POMs, one for the 'Kotlin Multiplatform' publication, and another for Kotlin/JVM, and more are on the way, which would lead to a cluttered build dir) - renamed the directories (the directory name is how Kotlin Multiplatform chooses the published artifact ID, and there's no an easier way to change it.) - updated README examples, and link to `-jvm` variant guide
This commit is contained in:
parent
4df6d3f599
commit
dce203845e
16 changed files with 59 additions and 243 deletions
74
urlencoder-lib/build.gradle.kts
Normal file
74
urlencoder-lib/build.gradle.kts
Normal file
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
* 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-multiplatform-jvm`
|
||||
buildsrc.conventions.publishing
|
||||
buildsrc.conventions.sonarqube
|
||||
id("com.github.ben-manes.versions")
|
||||
}
|
||||
|
||||
description = "A simple defensive library to encode/decode URL components"
|
||||
|
||||
val deployDir = project.layout.projectDirectory.dir("deploy")
|
||||
|
||||
kotlin {
|
||||
sourceSets {
|
||||
jvmTest {
|
||||
dependencies {
|
||||
//implementation("com.willowtreeapps.assertk:assertk-jvm:0.25")
|
||||
//implementation("org.junit.jupiter:junit-jupiter:5.9.1")
|
||||
implementation(kotlin("test"))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
base {
|
||||
archivesName.set("${rootProject.name}-lib")
|
||||
}
|
||||
|
||||
tasks {
|
||||
|
||||
clean {
|
||||
delete(deployDir)
|
||||
}
|
||||
|
||||
withType<DokkaTask>().configureEach {
|
||||
dokkaSourceSets.configureEach {
|
||||
moduleName.set("UrlEncoder Library")
|
||||
}
|
||||
}
|
||||
|
||||
val copyToDeploy by registering(Sync::class) {
|
||||
group = PublishingPlugin.PUBLISH_TASK_GROUP
|
||||
from(configurations.runtimeClasspath) {
|
||||
exclude("annotations-*.jar")
|
||||
}
|
||||
from(jvmJar)
|
||||
into(deployDir)
|
||||
}
|
||||
|
||||
register("deploy") {
|
||||
description = "Copies all needed files to the 'deploy' directory."
|
||||
group = PublishingPlugin.PUBLISH_TASK_GROUP
|
||||
dependsOn(build, copyToDeploy)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue