Skip to content

Commit 7328ad0

Browse files
authored
Upgraded KotlinDL version and refactor Titanic in IDEA example (#260)
* Added uncompiled version * Set up the Java 11 for sources of this example due to the lowest JDK 11 in KotlinDL
1 parent 0eb1b6e commit 7328ad0

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

examples/idea-examples/titanic/build.gradle.kts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,16 @@ application.mainClass.set("org.jetbrains.kotlinx.dataframe.examples.titanic.ml.T
1212

1313
dependencies {
1414
implementation(project(":core"))
15-
implementation("org.jetbrains.kotlinx:kotlin-deeplearning-api:0.4.0")
16-
implementation("org.jetbrains.kotlinx:kotlin-deeplearning-dataset:0.4.0")
15+
implementation("org.jetbrains.kotlinx:kotlin-deeplearning-api:0.5.1")
16+
implementation("org.jetbrains.kotlinx:kotlin-deeplearning-impl:0.5.1")
17+
implementation("org.jetbrains.kotlinx:kotlin-deeplearning-tensorflow:0.5.1")
18+
implementation("org.jetbrains.kotlinx:kotlin-deeplearning-dataset:0.5.1")
1719
}
1820

1921
// Make IDE aware of the generated code:
2022
kotlin.sourceSets.getByName("main").kotlin.srcDir("build/generated/ksp/main/kotlin/")
2123

24+
2225
dataframes {
2326
schema {
2427
data = "src/main/resources/titanic.csv"
@@ -28,3 +31,12 @@ dataframes {
2831
}
2932
}
3033
}
34+
35+
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
36+
kotlinOptions.jvmTarget = "11"
37+
}
38+
39+
tasks.withType<JavaCompile> {
40+
sourceCompatibility = JavaVersion.VERSION_11.toString()
41+
targetCompatibility = JavaVersion.VERSION_11.toString()
42+
}

0 commit comments

Comments
 (0)