Skip to content

Thizzer/kt-git-repository

Repository files navigation

Kotlin Git Repository

Kotlin library for generating Git object content.

Note: To be used as actual object- and packfiles, the generated content has to be compressed.

Installation

Maven

<dependency>
	<groupId>com.thizzer.kt-git-repository</groupId>
	<artifactId>kt-git-repository</artifactId>
	<version>1.2.0</version>
</dependency>

Gradle

Groovy

implementation group: 'com.thizzer.kt-git-repository', name: 'kt-git-repository', version: '1.2.0'

Kotlin

implementation("com.thizzer.kt-git-repository:kt-git-repository:1.2.0")

Usage

val repository = gitRepository {
    branch("main") {
        commit("Initial commit.") {
            file("README.md", "New and shiny README.md file.")
        }
    }
}