Skip to content

hilouisc/kake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

Kake is a dependency manager and task runner for the Kotlin programming language.

This project is in the proof of concept phase so things will change quickly, and the code is only intended to work on my machine for now.

Dependency Management

// project.json
{
    "groupId": "dev.louisc",
    "artifactId": "kake",
    "version": "0.0.0",
    "main": "dev.louisc.kake.MainKt",
    "repositories": [
        "https://repo.maven.apache.org/maven2/",
        "https://jcenter.bintray.com/"
    ],
    "dependencies": {
        "compile": [
            "com.fasterxml.jackson.core:jackson-databind:2.9.9.3",
            "commons-cli:commons-cli:1.4",
            "org.apache.maven:maven-model:3.6.2",
            "org.jetbrains.kotlin:kotlin-stdlib:1.3.50",
            "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.1"
        ],
        "test": [
            "org.assertj:assertj-core:3.13.2",
            "org.junit.jupiter:junit-jupiter-api:5.5.1",
            "org.junit.jupiter:junit-jupiter-engine:5.5.1"
        ],
        "runtime": [],
        "provided": []
    },
    "taskDependencies": []
}

The dependency resolution strategy is to take whichever dependency is higher in the dependency tree. The top level dependencies (declared in the project.json file) are at level 1, their immediate transient dependencies are at level 2, and so on.

Task Running

Kake comes with some standard task:

  • clean
  • compile
  • test
  • start
  • package
  • publish
kake [option...] [command]

    -h --help                   Prints this help text
    -v --version                Prints the tool's version

    init                        Initializes the project with a project.json file

    install                     Installs dependencies listed in the project.json file

    list                        Lists all task

    run [option...] [task...]   Runs the specified task

        -q --quiet              Supresses the run's console output
        
    Ex: kake run --quiet clean compile test run
// Kakefile.kts
import dev.louisc.kake.task.TaskManager
import dev.louisc.kake.task.parallel
import dev.louisc.kake.task.series

val clean = Task("clean") { println("Task 'clean' is running!") }

val lint = Task("lint") { println("Task 'lint' is running!") }

val compile = Task("compile") { println("Task 'compile' is running!") }

val test = Task("test") { println("Task 'test' is running!") }

val build = Task("build", series(clean, lint, compile, test)) { println("Task 'build' is running!") }

TaskManager.add(
    clean,
    lint,
    compile,
    test,
    build
)

About

Kotlin dependency manager and task runner

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages