Exit Full View

Glok / glok-model / build.gradle.kts

// glok-model

plugins {
    kotlin("multiplatform")
    id("maven-publish")
    id("org.jetbrains.dokka")
}

repositories {
    mavenCentral()
}

val glokVersion: String by project
group = "uk.co.nickthecoder"
version = glokVersion

kotlin {

    // Not supported in earlier versions of Kotlin plugin.
    //withSourcesJar(publish = false)

    jvm {
        jvmToolchain(11)
    }

    js(IR) {
        browser()
    }

    sourceSets {
        val jvmMain by getting {
            dependencies {
                implementation(kotlin("reflect"))
            }
        }
    }
}

tasks.dokkaHtmlPartial {
    dokkaSourceSets {
        configureEach {
            includeNonPublic.set(false)
            skipDeprecated.set(true)
            reportUndocumented.set(false)
            skipEmptyPackages.set(true)
            suppressInheritedMembers.set(true)
        }
    }
}

publishing {
    repositories {
        maven {
            // 46354938 is the GitLab project ID of project nickthecoder/glok
            url = uri("https://gitlab.com/api/v4/projects/46354938/packages/maven")
            credentials(HttpHeaderCredentials::class) {
                name = "Private-Token"
                value = providers.gradleProperty("gitLabPrivateToken").get()
                // The password is stored in ~/.gradle/gradle.properties
            }
            authentication {
                create<HttpHeaderAuthentication>("header")
            }
        }
    }
}