Exit Full View

Glok / glok-dock / build.gradle.kts

// glok-dock

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

repositories {
    mavenCentral()
}

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


kotlin {
    jvmToolchain(11)
}

kotlin {

    // withSourcesJar(publish = false)
    jvm {
        jvmToolchain(11)
    }

    js(IR) {
        browser()
    }

    sourceSets {
        val commonMain by getting {
            dependencies {
                implementation(project(":glok-model"))
                implementation(project(":glok-core"))
            }
        }
        val jsMain by getting {
            dependencies {
                implementation(project(":glok-model"))
                implementation(project(":glok-core"))
            }
        }
        val jvmMain by getting {
            dependencies {
                implementation(project(":glok-model"))
                implementation(project(":glok-core"))
            }
        }
    }

}

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")
            }
        }
    }
}