Skip to content
This repository has been archived by the owner on Mar 2, 2022. It is now read-only.

Support macOS #5

Open
ghost opened this issue Jul 22, 2021 · 4 comments
Open

Support macOS #5

ghost opened this issue Jul 22, 2021 · 4 comments

Comments

@ghost
Copy link

ghost commented Jul 22, 2021

In addition to the iOS target I would also need logging support on macOS (macosX64 target).

@cjbrooks12
Copy link
Member

This would be a very welcome addition! I've never done anything with macOS native targets so I'm not quite sure what all would be required to get this enabled, but I would gladly accept a PR to get it set up.

This project is set up already to use HMPP, so is there a sourceSet that would be able to service both iOS and native macOS targets, or would it just need a new one specifically for macOS?

@ghost
Copy link
Author

ghost commented Jul 22, 2021

Looking at the Kermit lib they managed to define a single darwinMain sourceSet for both, but in my project I just added macosX64("macos") { } below iOS { } and copied iosMain to macosMain. That was all that I needed to do. Actually I tried to prepare a PR for you with that, but I cancelled that due to tooling issues - Android Studio won't compile your project for me and it was hard enough to get mine compiled. All that beta stuff. ;)

I think it should be easy for you to add the macOS target. Implementation can be the same.

@cjbrooks12
Copy link
Member

Cool, yeah I was hoping it would be pretty easy for that. Do you mind pushing that branch up somewhere so I can take a look? It should be pretty easy for me to get that integrated and released (probably sometime this weekend)

@ghost
Copy link
Author

ghost commented Jul 22, 2021

Change the build.gradle.kts like this: https://github.com/AshStefanOltmann/clog/commit/46ccbd0e6a5615240ad13a0555f36e06d5af8e44

And copy iosMain to macosMain

That should be all that's needed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant