Skip to content

Conversation

oguzkocer
Copy link
Contributor

This PR renames the native/android folder as native/kotlin which is now also consistent with native/swift.

It also renames the wp_api Gradle module as api:kotlin, and the wp_api_kotlin module as api:android. When these modules are used by consumers, they'll have the rs.wordpress prefix, so the wp prefix wasn't useful. Instead of using api_kotlin & api_android, the submodule structure is preferred in Gradle. (and something we also use in other projects)

Note that there is a good chance I broke something with these changes, but we are still in the early phases of the Kotlin wrapper, so we should be able to quickly address any issues that might arise.

@oguzkocer oguzkocer added this to the 0.1 milestone May 10, 2024
@oguzkocer oguzkocer force-pushed the rename/kotlin-modules-and-paths branch from 0b0f291 to 9e95409 Compare May 10, 2024 19:06
@oguzkocer oguzkocer marked this pull request as ready for review May 10, 2024 19:34
@crazytonyli
Copy link
Contributor

In #77, I have used WordPressAPIInternal as the name of wp_api's Swift API. If I understand correctly, that's the equivlant of rs.wordpress.api.kotlin package. We probably don't need to use a similar name, but just though it's worth mentioning anyways.

I included "internal" in the module name because app developers should not import this "internal" module, even though they technically can. Naming the module as WordPressAPIInternal should be an obvious indicator that the module is designed to be used internally in WordPressAPI (a.k.a the wordpress-rs Swift package).

@oguzkocer
Copy link
Contributor Author

rs.wordpress.api.kotlin is a proper JVM library and is planned to be used externally. Any non-Android JVM client/library should use this package over rs.wordpress.api.android which is a convenience wrapper for Android clients/libraries.

Copy link
Member

@wzieba wzieba left a comment

Choose a reason for hiding this comment

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

Looks good - I find the new naming easy to understand and straightforward 👍

@oguzkocer oguzkocer merged commit a6c3007 into trunk May 13, 2024
@oguzkocer oguzkocer deleted the rename/kotlin-modules-and-paths branch May 13, 2024 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants