Skip to content
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

feat: multiplatform module for Android and iOS #595

Merged
merged 1 commit into from
Jan 3, 2020

Conversation

adityastic
Copy link
Collaborator

Fixes #575

@adityastic adityastic force-pushed the development branch 2 times, most recently from 0562064 to 6ea54c4 Compare January 2, 2020 15:09
@adityastic adityastic added the WIP label Jan 2, 2020
@adityastic adityastic changed the title WIP: Multiplatform Module feat: multiplatform module for Android and iOS Jan 2, 2020
@auto-label auto-label bot added the feature label Jan 2, 2020
@adityastic adityastic marked this pull request as ready for review January 2, 2020 16:47
@adityastic adityastic changed the title feat: multiplatform module for Android and iOS [WIP] feat: multiplatform module for Android and iOS Jan 2, 2020
@auto-label auto-label bot removed the feature label Jan 2, 2020
@adityastic
Copy link
Collaborator Author

@iamareebjamal I plan on creating another branch to push the latest SharedFramework which we would download when compiling badge-magic-ios , let me know your suggestions on this

@iamareebjamal
Copy link
Member

Sounds good but why not do it in one repo

@adityastic
Copy link
Collaborator Author

Sounds good but why not do it in one repo

yes, that is an amazing idea, we can shift iOS directly here and maintain both the apps right here itself

@adityastic
Copy link
Collaborator Author

@iamareebjamal we would then have to manage travis to use macOS and manually download android sdk, gradle, jdk and the rest of things inside a android docker. Let me know your thoughts, If it is worth the effort

@iamareebjamal
Copy link
Member

iamareebjamal commented Jan 2, 2020

You can use environments to differentiate between both. Not sure how easy it is in Travis but here is an example of GitHub Actions - https://github.com/korlibs/klock

Another: https://travis-ci.com/fossasia/flask-rest-jsonapi/builds/130125460

@adityastic
Copy link
Collaborator Author

@iamareebjamal the catch with environments is that they run concurrently, we might want to synchronously run our project on an android image to build our iOS-framework then run it on OS X image to build iOS with the built framework.

@adityastic adityastic force-pushed the development branch 2 times, most recently from 8b7b69e to 418e58c Compare January 2, 2020 23:07
@adityastic
Copy link
Collaborator Author

@iamareebjamal nvm, I managed to sync it HAHA

@adityastic adityastic changed the title [WIP] feat: multiplatform module for Android and iOS feat: multiplatform module for Android and iOS Jan 3, 2020
@auto-label auto-label bot added the feature label Jan 3, 2020
@adityastic adityastic force-pushed the development branch 3 times, most recently from 9ff340b to 980e9c5 Compare January 3, 2020 01:05
@adityastic
Copy link
Collaborator Author

@iamareebjamal Changes:

  1. Shifted some of the logic to shared module.
  2. Removed Moshi and used kotlin serializer so now we can handle same classes in any platform.
  3. changed travis to build android then iOS.

Next Steps: Add iOS project tomorrow

@adityastic
Copy link
Collaborator Author

@iamareebjamal please review

@@ -10,10 +10,10 @@ import androidx.appcompat.widget.AppCompatImageView
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.RecyclerView
import com.google.android.material.chip.Chip
import data.BadgeConfig
import data.ConfigInfo
import helpers.JSONHelper
Copy link
Member

Choose a reason for hiding this comment

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

Why not prepending org.fossasia.badgemagic and using same package structure in common module as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep, it would be perfect

@adityastic adityastic merged commit c74f5c4 into fossasia:development Jan 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kotlin Multiplatform Discussion
2 participants