Skip to content

Commit 2eb1488

Browse files
authored
Migrate to Kotlin (#97)
1 parent ff0adec commit 2eb1488

File tree

218 files changed

+5399
-6553
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

218 files changed

+5399
-6553
lines changed

README.adoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,25 @@ This project contains:
2020

2121
== How to use?
2222

23-
You can download latest stable from http://mvnrepository.com/artifact/ru.bozaro.gitlfs[Maven Central].
23+
You can download the latest stable from http://mvnrepository.com/artifact/ru.bozaro.gitlfs[Maven Central].
2424

2525
=== Downloading object from Git LFS server
2626

2727
[source,java]
2828
----
29-
include::gitlfs-client/src/test/java/ru/bozaro/gitlfs/client/Examples.java[tags=download]
29+
include::gitlfs-client/src/test/kotlin/ru/bozaro/gitlfs/client/Examples.kt[tags=download]
3030
----
3131

3232
=== Uploading object to Git LFS server
3333

3434
[source,java]
3535
----
36-
include::gitlfs-client/src/test/java/ru/bozaro/gitlfs/client/Examples.java[tags=upload]
36+
include::gitlfs-client/src/test/kotlin/ru/bozaro/gitlfs/client/Examples.kt[tags=upload]
3737
----
3838

3939
=== Embedded LFS server
4040

41-
See link:gitlfs-server/src/test/java/ru/bozaro/gitlfs/server/ServerTest.java[] for example.
41+
See link:gitlfs-server/src/test/kotlin/ru/bozaro/gitlfs/server/ServerTest.kt[] for example.
4242

4343
== Changelog
4444

build.gradle.kts

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import de.marcphilipp.gradle.nexus.NexusPublishExtension
22
import org.ajoberstar.grgit.Grgit
33
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
44
import org.gradle.plugins.ide.idea.model.IdeaLanguageLevel
5+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
56
import java.time.Duration
67

78
val ossrhUsername: String? = System.getenv("OSSRH_USERNAME")
@@ -17,6 +18,7 @@ plugins {
1718
id("de.marcphilipp.nexus-publish") version "0.4.0" apply false
1819
id("io.codearte.nexus-staging") version "0.30.0"
1920
id("org.ajoberstar.grgit") version "4.1.0"
21+
kotlin("jvm") version "1.5.21" apply false
2022
idea
2123
}
2224

@@ -26,6 +28,7 @@ allprojects {
2628

2729
apply(plugin = "idea")
2830
apply(plugin = "com.github.ben-manes.versions")
31+
apply(plugin = "org.jetbrains.kotlin.jvm")
2932

3033
repositories {
3134
mavenCentral()
@@ -34,6 +37,10 @@ allprojects {
3437

3538
val javaVersion = JavaVersion.VERSION_11
3639

40+
tasks.withType<KotlinCompile> {
41+
kotlinOptions.jvmTarget = javaVersion.toString()
42+
}
43+
3744
idea {
3845
project.jdkName = javaVersion.name
3946
project.languageLevel = IdeaLanguageLevel(javaVersion)

gitlfs-client/build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ description = "Java Git-LFS client library"
33
dependencies {
44
api(project(":gitlfs-common"))
55
api("org.apache.httpcomponents:httpclient:4.5.13")
6-
implementation("org.slf4j:slf4j-api:1.7.32")
6+
implementation("org.slf4j:slf4j-api:2.0.0-alpha1")
77

88
testImplementation("org.yaml:snakeyaml:1.29")
9-
testRuntimeOnly("org.slf4j:slf4j-simple:1.7.32")
9+
testRuntimeOnly("org.slf4j:slf4j-simple:2.0.0-alpha1")
1010
}

gitlfs-client/src/main/java/ru/bozaro/gitlfs/client/AuthHelper.java

-67
This file was deleted.

gitlfs-client/src/main/java/ru/bozaro/gitlfs/client/BatchDownloader.java

-47
This file was deleted.

gitlfs-client/src/main/java/ru/bozaro/gitlfs/client/BatchSettings.java

-73
This file was deleted.

gitlfs-client/src/main/java/ru/bozaro/gitlfs/client/BatchUploader.java

-75
This file was deleted.

0 commit comments

Comments
 (0)