https://github.com/develar/j2kt-commiter
Preserve history during convert java to kotlin
https://github.com/develar/j2kt-commiter
Last synced: 2 months ago
JSON representation
Preserve history during convert java to kotlin
- Host: GitHub
- URL: https://github.com/develar/j2kt-commiter
- Owner: develar
- Created: 2015-10-13T11:15:16.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-22T07:41:42.000Z (over 9 years ago)
- Last Synced: 2025-03-31T04:51:36.876Z (3 months ago)
- Language: Kotlin
- Homepage:
- Size: 4.05 MB
- Stars: 14
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[Latest release](https://github.com/develar/j2kt-commiter/releases/latest)
Convert java to kotlin as usual and run script in the idea project dir (`java -jar j2kt-commiter.jar`). VCS mappings are used to support several repositories.
To dry-run (no commits, no file renaming - only log) pass `true` as a first argument: `java -jar j2kt-commiter.jar true`
Converted files will be committed and history is preserved (only and only converted files will be committed — working directory can be dirty).
What script does:
1. kotlin file renamed to java file (foo.kt -> foo.java).
2. first commit.
3. foo.java renamed back to foo.kt.
4. second (and last) commit.Please note — only and only converted files will be committed, so, you should commit another changed files (e.g. if some java file modified to use kotlin API).
If something went wrong, use `git reset HEAD~1` to delete your last commit and VCS -> Local History to restore your changes.