Skip to content

Commit

Permalink
chore: Main.javaとMainViewController.javaをKotlinに書き換えた #62 (#63)
Browse files Browse the repository at this point in the history
* add kotlin

* kotlinのビルド設定を追加

* vscodeの設定

* Main.javaをKotlinで書き直した

* MainViewController -> Kotlin

* kotlin text

* kotlinのformat設定を追加

* コードフォーマットにかけた

* ktlintを削除

* 再フォーマット
  • Loading branch information
jiro4989 authored Dec 26, 2021
1 parent 068a55e commit 0832644
Show file tree
Hide file tree
Showing 8 changed files with 718 additions and 673 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "automatic"
}
21 changes: 21 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ plugins {

// Code coverage
id 'jacoco'

id "org.jetbrains.kotlin.jvm" version "1.6.0"
}

apply plugin: 'org.junit.platform.gradle.plugin'
Expand Down Expand Up @@ -85,6 +87,11 @@ dependencies {
implementation "org.openjfx:javafx-controls:16"
implementation "org.openjfx:javafx-graphics:16"
implementation "org.openjfx:javafx-swing:16"

implementation platform('org.jetbrains.kotlin:kotlin-bom')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
testImplementation "org.jetbrains.kotlin:kotlin-test"
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit'
}

sourceCompatibility = 16
Expand All @@ -99,6 +106,14 @@ compileJava {
options.encoding = 'UTF-8'
}

compileKotlin {
kotlinOptions.jvmTarget = "16"
}

compileTestKotlin {
kotlinOptions.jvmTarget = "16"
}

javafx {
modules = [
'javafx.controls',
Expand Down Expand Up @@ -156,6 +171,11 @@ spotless {
removeUnusedImports()
}

kotlin {
ktfmt('0.15')
//diktat('0.4.0')
}

groovyGradle {
target '*.gradle'
greclipse().configFile("$rootDir/greclipse.properties")
Expand Down Expand Up @@ -256,6 +276,7 @@ spotlessApply.dependsOn(['clean'])
versionSet.dependsOn(['spotlessApply'])
test.dependsOn('spotlessApply')
compileJava.dependsOn(['versionSet'])
compileKotlin.dependsOn(['versionSet'])
jacocoTestReport.dependsOn(['test'])

dumpDependencies.dependsOn(['cleanDependencies'])
Expand Down
69 changes: 0 additions & 69 deletions src/main/java/com/jiro4989/tkfm/Main.java

This file was deleted.

Loading

0 comments on commit 0832644

Please sign in to comment.