Replace deprecated gradle configurations
This commit is contained in:
parent
183ea9a234
commit
1e487d1468
@ -19,6 +19,7 @@ plugins {
|
||||
allprojects {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
}
|
||||
|
||||
plugins.withType<KotlinPluginWrapper> {
|
||||
@ -42,8 +43,8 @@ dependencies {
|
||||
val SourceSet.kotlin: SourceDirectorySet
|
||||
get() = withConvention(KotlinSourceSet::class) { kotlin }
|
||||
|
||||
fun BintrayExtension.pkg(configure: BintrayExtension.PackageConfig.() -> Unit): Any? {
|
||||
return pkg(closureOf(configure))
|
||||
fun BintrayExtension.pkg(configure: BintrayExtension.PackageConfig.() -> Unit) {
|
||||
pkg(delegateClosureOf(configure))
|
||||
}
|
||||
|
||||
val dokka by tasks.existing(DokkaTask::class) {
|
||||
@ -54,16 +55,16 @@ val dokka by tasks.existing(DokkaTask::class) {
|
||||
}
|
||||
|
||||
dokka {
|
||||
kotlinTasks(closureOf<Any?> { emptyList() })
|
||||
sourceDirs = sourceSets["main"].kotlin.srcDirs
|
||||
outputFormat = "javadoc"
|
||||
outputDirectory = "$buildDir/docs/javadoc"
|
||||
kotlinTasks(::defaultKotlinTasks)
|
||||
}
|
||||
|
||||
val javadocJar by tasks.registering(Jar::class) {
|
||||
group = LifecycleBasePlugin.BUILD_GROUP
|
||||
description = "Assembles a jar archive containing the Javadoc API documentation."
|
||||
classifier = "javadoc"
|
||||
archiveClassifier.set("javadoc")
|
||||
dependsOn(dokka)
|
||||
from(dokka.get().outputDirectory)
|
||||
}
|
||||
@ -71,7 +72,7 @@ val javadocJar by tasks.registering(Jar::class) {
|
||||
val sourcesJar by tasks.registering(Jar::class) {
|
||||
group = LifecycleBasePlugin.BUILD_GROUP
|
||||
description = "Assembles a jar archive containing the main classes with sources."
|
||||
classifier = "sources"
|
||||
archiveClassifier.set("sources")
|
||||
from(sourceSets["main"].allSource)
|
||||
}
|
||||
|
||||
@ -85,9 +86,12 @@ publishing {
|
||||
}
|
||||
}
|
||||
|
||||
val bintrayUser: String? by project
|
||||
val bintrayKey: String? by project
|
||||
|
||||
bintray {
|
||||
user = project.findProperty("bintrayUser")?.toString() ?: ""
|
||||
key = project.findProperty("bintrayKey")?.toString() ?: ""
|
||||
user = bintrayUser
|
||||
key = bintrayKey
|
||||
setPublications("mavenJava")
|
||||
|
||||
pkg {
|
||||
@ -105,6 +109,6 @@ val bintrayUpload by tasks.existing(BintrayUploadTask::class) {
|
||||
dependsOn(javadocJar)
|
||||
}
|
||||
|
||||
tasks.named<Task>("afterReleaseBuild") {
|
||||
tasks.named("afterReleaseBuild") {
|
||||
dependsOn(bintrayUpload)
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ dependencies {
|
||||
implementation(project(":"))
|
||||
implementation(kotlin("stdlib-jdk8"))
|
||||
implementation("ch.qos.logback:logback-classic:1.2.3")
|
||||
implementation("io.ktor:ktor-server-core:${ktorVersion}")
|
||||
implementation("io.ktor:ktor-server-netty:${ktorVersion}")
|
||||
implementation("io.ktor:ktor-gson:${ktorVersion}")
|
||||
implementation("io.ktor:ktor-server-core:$ktorVersion")
|
||||
implementation("io.ktor:ktor-server-netty:$ktorVersion")
|
||||
implementation("io.ktor:ktor-gson:$ktorVersion")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user