Exit Full View

FooCAD / build.gradle.kts

// foocad (top-level)

plugins {
    kotlin("jvm") version "1.9.10"
    id("org.jetbrains.dokka") version "1.9.10"
    application
}

repositories {
    mavenCentral()
}

val foocadVersion: String by project

allprojects {
    apply(plugin = "org.jetbrains.dokka")
    version = foocadVersion
    group = "uk.co.nickthecoder"

    repositories {
        mavenCentral()
        // My other projects hosted on gitlab.com
        maven {
            name = "feather"
            url = uri("https://gitlab.com/api/v4/projects/16531834/packages/maven")
        }
        maven {
            name = "glok"
            url = uri("https://gitlab.com/api/v4/projects/46354938/packages/maven")
        }
    }
}

dependencies {
    val featherVersion: String by project
    val glokVersion: String by project
    val junitVersion: String by project

    implementation(project(":foocad-core"))
    implementation(project(":foocad-build"))
    implementation(project(":foocad-construction"))

    implementation("uk.co.nickthecoder:glok-model:$glokVersion")
    implementation("uk.co.nickthecoder:glok-core:$glokVersion")
    implementation("uk.co.nickthecoder:glok-dock:$glokVersion")
    implementation("uk.co.nickthecoder:feather-core:$featherVersion")
    implementation("uk.co.nickthecoder:feather-glok:$featherVersion")
    implementation("uk.co.nickthecoder:feather-runtime:$featherVersion")

    testImplementation("junit:junit:$junitVersion")
}

application {
    mainClass.set("uk.co.nickthecoder.foocad.FooCAD")
}

tasks.dokkaHtmlMultiModule {
    moduleName.set("FooCAD")
}

task<Exec>("publishDokka") {
    dependsOn(":dokkaHtmlMultiModule")
    commandLine("./publishDokka.feathers", "build/dokka/htmlMultiModule/", "../api/foocad-$foocadVersion")
}

task<Exec>("publishZip") {
    dependsOn(":distZip")
    commandLine("cp", "build/distributions/foocad-${foocadVersion}.zip", "../download/")
}

task<Exec>("ntc") {
    dependsOn(":publishDokka", ":publishZip")
    commandLine("echo", "Done")
}

defaultTasks("installDist")