Skip to content

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

Merged
merged 4 commits into from
Jan 20, 2022
Merged

Project initialization #2

merged 4 commits into from
Jan 20, 2022

Conversation

KTGypsy
Copy link
Contributor

@KTGypsy KTGypsy commented Jan 17, 2022

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

@KTGypsy KTGypsy changed the title Initialized project with configured script and gradle Project initialization Jan 17, 2022
@@ -0,0 +1,3 @@
object KMPJsonLogicEngine {
fun evaluate(expression: String, data: Map<String, String>) = true
Copy link
Collaborator

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)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. I think it's better to define some interface public interface and implement it in KMPJsonLogicEngine.
  2. Let's try to replace expression type String with Map<String, List<Any>>, as we decided at the meeting.
  3. How about returning/throwing the error when the evaluation failed?
  4. Do we need KMP prefix? 🤔

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 👍
  2. 👍 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}
  3. 👍 - and I guess this error would be catched in MBox libraries, right?
  4. 👍 I think we don't need it

The other thing is that this function probably will also return Any, not Boolean (or maybe String?)

Copy link
Collaborator

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

Copy link
Contributor Author

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

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. we should put everything we can that will be 'usable' outside as interface 👍
  2. Map<String, Any> should be fine too 👍
  3. we probably will need to make own error type. Not sure how ios handles those (checked vs uncheched in java and kotlin)

Copy link
Collaborator

@PaulinaSadowskaAllegro PaulinaSadowskaAllegro left a 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"
Copy link

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?

Copy link
Collaborator

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.

Copy link
Contributor Author

@KTGypsy KTGypsy Jan 19, 2022

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).
Copy link
Collaborator

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)

@KTGypsy KTGypsy merged commit da5da6c into main Jan 20, 2022
@KTGypsy KTGypsy deleted the project-init branch January 20, 2022 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants