Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cb40661

Browse files
tamasvajkigfoo
authored andcommitted
Reintroduce sealed interfaces for generated DB types
1 parent c4ad2f3 commit cb40661

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

java/kotlin-extractor/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,17 @@ tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
1919
kotlinOptions {
2020
jvmTarget = "1.8"
2121
freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
22+
// enable the below for building with kotlinVersion=1.4.32:
23+
// languageVersion = "1.5"
2224
}
2325
}
2426

2527
sourceSets {
2628
main {
2729
kotlin {
2830
excludes = ["utils/versions/v_1_4/*.kt"]
31+
// change the above line to the below for building with kotlinVersion=1.4.32:
32+
//excludes = ["utils/versions/default/*.kt"]
2933
}
3034
}
3135
}

java/kotlin-extractor/generate_dbscheme.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def genTable(kt, relname, columns, enum = None, kind = None, num = None, typ = N
171171
genTable(kt, relname, columns, enum, kind, num, typ)
172172

173173
for typ in sorted(supertypes):
174-
kt.write('interface Db' + upperFirst(typ))
174+
kt.write('sealed interface Db' + upperFirst(typ))
175175
# Sorting makes the output deterministic.
176176
names = sorted(supertypes[typ])
177177
if names:

0 commit comments

Comments
 (0)