-
Notifications
You must be signed in to change notification settings - Fork 6
Project initialization #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -0,0 +1,3 @@ | |||
object KMPJsonLogicEngine { | |||
fun evaluate(expression: String, data: Map<String, String>) = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trzeba bedzie jeszcez dogadac jaki typ bedzie szedł jako expression (rozmawialismy o tym na dejli)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I think it's better to define some interface public interface and implement it in
KMPJsonLogicEngine
. - Let's try to replace expression type
String
withMap<String, List<Any>>
, as we decided at the meeting. - How about returning/throwing the error when the evaluation failed?
- Do we need KMP prefix? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 👍
- 👍 but it probably will be
Map<String, Any>
since there are operators which have only one parameter and does not require passing them in array e.g.{"var":"a"}
to retrieve data from registry or{"!": true}
- 👍 - and I guess this error would be catched in MBox libraries, right?
- 👍 I think we don't need it
The other thing is that this function probably will also return Any, not Boolean (or maybe String?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PaulinaSadowskaAllegro
2. You're right
3. Yes
Maybe it's better to return String
, because in data
we also have String
values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did the basics, wdyt about introducing these changes by people who are working on it at the moment? Lets keep the scope narrow and discuss in next PRs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- we should put everything we can that will be 'usable' outside as interface 👍
- Map<String, Any> should be fine too 👍
- we probably will need to make own error type. Not sure how ios handles those (checked vs uncheched in java and kotlin)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need readme (maybe with info that this project is still in progress?) and link to license. You can find info about readme and licencse in JIRA task or check other repo for reference, e.g. : https://github.com/allegro/hermes
build.gradle.kts
Outdated
} | ||
|
||
group = "pl.allegro.mobile" | ||
version = "1.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope, nope nope ;) maybe we could use axion-release?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I think for now, before we're ready to ship this in production - we'll need to use 0.X.Y versions. IMO 1.0.0 should be released only when initial, production-ready version is ready to ship.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, with axion the very first version will be 0.0.1
# json-logic-kmp | ||
JsonLogicKMP | ||
====== | ||
Kotlin multiplatform [JsonLogic](https://jsonlogic.com/) expressions evaluation engine. Targets iOS and JVM(also Android). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing space before (also Android)
WHAT & WHY
Multiplatform json logic project structure. It targets ios, jvm(including android).
For now jvm dependencies should be publsihed via ./gradlew publishToMavenLocal and used through mavenLocal() in projects.
To generate xcode framework files build the project and run ./createXCFrameworks.sh. This script will generate xcframework files inside build/bin/ios/xcframeworks