aboutsummaryrefslogtreecommitdiff
path: root/buildSrc/src/main/kotlin/org/jetbrains/BintrayPublishing.kt
blob: 78e4257f9b2894218a584a35d3c7ef7d0193197c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package org.jetbrains

import com.jfrog.bintray.gradle.BintrayExtension
import org.gradle.api.Project
import org.gradle.kotlin.dsl.provideDelegate

fun Project.configureBintrayPublication(vararg publications: String) {
    val dokka_version: String by this
    val dokka_publication_channel: String by this
    extensions.configure<BintrayExtension>("bintray") {
        user = System.getenv("BINTRAY_USER")
        key = System.getenv("BINTRAY_KEY")

        pkg = PackageConfig().apply {
            repo = dokka_publication_channel
            name = "dokka"
            userOrg = "kotlin"
            desc = "Dokka, the Kotlin documentation tool"
            vcsUrl = "https://github.com/kotlin/dokka.git"
            setLicenses("Apache-2.0")
            version = VersionConfig().apply {
                name = dokka_version
            }
        }
        setPublications(*publications)
    }
}