KGit is Kotlin Wrapper Library of JGit.
- Null Safety Methods
- Command Settings Available Using Lambda Function (No Method Chain)
- Support JGit features:
7.6.0.202603022253-r
val git: Git = Git.cloneRepository()
.setURI("https://github.com/sya-ri/KGit")
.setTimeout(60)
.setProgressMonitor(TextProgressMonitor())
.call()val git: KGit = KGit.cloneRepository {
setURI("https://github.com/sya-ri/KGit")
setTimeout(60)
setProgressMonitor(TextProgressMonitor())
}Tip
- KGit bundles
org.eclipse.jgit:org.eclipse.jgit. - Install the jgit extension library if necessary.
repositories {
mavenCentral()
}
dependencies {
implementation 'com.github.sya-ri:kgit:1.2.0'
}repositories {
mavenCentral()
}
dependencies {
implementation("com.github.sya-ri:kgit:1.2.0")
}- Resolve the latest
org.eclipse.jgit:org.eclipse.jgitversion from Maven Central. - Clone the upstream JGit repository:
git clone "https://eclipse.gerrithub.io/eclipse-jgit/jgit" jgit-src- Check out the tag that matches the Maven Central version exactly. For example:
git -C jgit-src checkout v7.6.0.202603022253-r- Sync only
jgit-src/org.eclipse.jgit/src/org/eclipse/jgit/api/*Command.javaintojgit/org.eclipse.jgit/src/org/eclipse/jgit/api/. - Review the
*Command.javadiffs underorg.eclipse.jgit/src/org/eclipse/jgit/apiand update the Kotlin wrappers insrc/main/kotlin/com/github/syari/kgit. Check not only new command files, but also added, removed, and changed public methods in existing command files. Ignoreapi/errorsand other non-command files for this workflow. If a new command needs aKGitentrypoint, add that wrapper exposure too. - Run the build and fix any remaining wrapper mismatches.
Run the gradle task to check the code format.
gradle lintKotlin
<type>: <subject>
- 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