Skip to content

sya-ri/KGit

Repository files navigation

KGit

GitHub release (latest by date) maven-central ktlint

KGit is Kotlin Wrapper Library of JGit.

  • Null Safety Methods
  • Command Settings Available Using Lambda Function (No Method Chain)
  • Support JGit features: 7.0.0.202409031743-r

Examples

Clone Repository

JGit

val git: Git = Git.cloneRepository()
                  .setURI("https://github.com/sya-ri/KGit")
                  .setTimeout(60)
                  .setProgressMonitor(TextProgressMonitor())
                  .call()

KGit

val git: KGit = KGit.cloneRepository {
    setURI("https://github.com/sya-ri/KGit")
    setTimeout(60)
    setProgressMonitor(TextProgressMonitor())
}

Installation

Tip

  • KGit bundles org.eclipse.jgit:org.eclipse.jgit.
  • Install the jgit extension library if necessary.

build.gradle

repositories {
    mavenCentral()
}

dependencies {
    implementation 'com.github.sya-ri:kgit:1.1.0'
}

build.gradle.kts

repositories {
    mavenCentral()
}

dependencies {
    implementation("com.github.sya-ri:kgit:1.1.0")
}

Develop

Git Commit

Before Commit

Run the gradle task to check the code format.

gradle lintKotlin

Template

<type>: <subject>

Type

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, etc)
  • refactor: A code change that neither fixes a bug nor adds a feature
  • perf: A code change that improves performance
  • test: Adding missing or correcting existing tests
  • chore: Changes to the build process or auxiliary tools and libraries such as documentation generation