https://github.com/sya-ri/KGit
Kotlin Wrapper Library of JGit
https://github.com/sya-ri/KGit
git gradle jgit kgit kotlin kotlin-wrapper-library
Last synced: 8 months ago
JSON representation
Kotlin Wrapper Library of JGit
- Host: GitHub
- URL: https://github.com/sya-ri/KGit
- Owner: sya-ri
- License: epl-2.0
- Created: 2021-01-08T07:46:11.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-12-13T21:00:13.000Z (11 months ago)
- Last Synced: 2025-03-17T19:46:50.700Z (8 months ago)
- Topics: git, gradle, jgit, kgit, kotlin, kotlin-wrapper-library
- Language: Java
- Homepage:
- Size: 467 KB
- Stars: 33
- Watchers: 1
- Forks: 8
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# KGit
[](https://github.com/sya-ri/KGit/releases/latest)
[](https://search.maven.org/artifact/com.github.sya-ri/kgit)
[](https://ktlint.github.io/)
KGit is Kotlin Wrapper Library of [JGit](https://eclipse.org/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
```kotlin
val git: Git = Git.cloneRepository()
.setURI("https://github.com/sya-ri/KGit")
.setTimeout(60)
.setProgressMonitor(TextProgressMonitor())
.call()
```
#### KGit
```kotlin
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
```groovy
repositories {
mavenCentral()
}
dependencies {
implementation 'com.github.sya-ri:kgit:1.1.0'
}
```
### build.gradle.kts
```kotlin
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
- **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