-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add use-case 5 : Baleen as multiplatform
- Loading branch information
1 parent
7c92888
commit ce10b1a
Showing
12 changed files
with
131 additions
and
65 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Preparation for version 2 | ||
|
||
Do test driven development for version 2 | ||
|
||
```bash | ||
./gradlew build -Pversion2 | ||
./gradlew :baleen-v2:build -Pversion2 | ||
|
||
``` | ||
|
||
## Use Case 1 - Given we have the data, we define the schema manually and validate the data | ||
|
||
[UseCase1Test.kt](baleen-v2-tests/src/test/kotlin/com/shoprunner/baleen/version2/UseCase1Test.kt) | ||
|
||
## Use Case 2 - Given we have the data, we learn the schema and validate the data | ||
|
||
[UseCase2Test.kt](baleen-v2-tests/src/test/kotlin/com/shoprunner/baleen/version2/UseCase2Test.kt) | ||
|
||
## Use Case 3 - Given a external schema (Avro, XSD, Json-Schema, Kotlin data class), build Baleen schema and validate the data | ||
|
||
[UseCase3Test.kt](baleen-v2-tests/src/test/kotlin/com/shoprunner/baleen/version2/UseCase3Test.kt) | ||
|
||
## Use Case 4 - Given a Baleen schema, create external schema (Avro, XSD, Json-Schema, Kotlin data class) and validate the data with the external schema | ||
|
||
[UseCase4Test.kt](baleen-v2-tests/src/test/kotlin/com/shoprunner/baleen/version2/UseCase4Test.kt) | ||
|
||
## Use Case 5 - Baleen is multiplatform and can be run on JVM, in Javascript from node and from the browser, and from Python via Cinteropt | ||
|
||
[baleen-v2/build.gradle](baleen-v2/build.gradle) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
src/commonMain | ||
src/commonTest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
plugins { | ||
id 'org.jetbrains.kotlin.multiplatform' | ||
} | ||
|
||
kotlin { | ||
// Targets | ||
jvm() // Creates a JVM target with the default name 'jvm' | ||
js() // JS target named 'js' | ||
|
||
sourceSets { | ||
commonMain { | ||
kotlin { | ||
srcDir project(":baleen").file("src/main/kotlin") | ||
} | ||
|
||
dependencies { | ||
implementation kotlin('stdlib-common') | ||
} | ||
} | ||
commonTest { | ||
// kotlin { | ||
// srcDir project(":baleen").file("src/test/kotlin") | ||
// } | ||
|
||
dependencies { | ||
implementation kotlin('test-common') | ||
implementation kotlin('test-annotations-common') | ||
} | ||
} | ||
|
||
jvmTest { | ||
dependencies { | ||
implementation kotlin('test-junit') | ||
} | ||
} | ||
} | ||
} | ||
|
||
if (!project.hasProperty("version2")) { | ||
project.tasks.each { | ||
it.onlyIf { false } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters