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

Add new publishCIPackages target in Gradle to make it easier to control which targets to build on a given platform #1607

Merged
merged 12 commits into from
Dec 19, 2023

Conversation

cmelchior
Copy link
Contributor

@cmelchior cmelchior commented Dec 15, 2023

With this change, it is now possible to define which targets to build using. It does this by introducing a new target publishCIPackages, which can be configured using a number of new Gradle properties:

realm.kotlin.mainHost=true
realm.kotlin.targets=<CommaSeperatedListOfPublications>
realm.kotlin.buildRealmCore=true
realm.kotlin.copyNativeJvmLibs=false

With this it is possible to get fine-grained control over exactly what gets built on a CI runner.

This PR is mostly moving things out of #881, so we can keep the review more focused.

@cmelchior cmelchior marked this pull request as ready for review December 15, 2023 21:39
@cmelchior cmelchior requested review from rorbech, nhachicha and clementetb and removed request for rorbech and nhachicha December 15, 2023 21:39
Copy link
Contributor

@rorbech rorbech left a comment

Choose a reason for hiding this comment

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

Logic seems ok, but implementation feels a bit cumbersome. I think I would have gone for a HostSpecifics-publication (#naming 🤪) and some conditional publishing that only published the host specific packages on publishHostSpecificPublicationTo<Repository>. That feels more aligned with the publishing infrastructure ... and would be really cool for local development if you could just do publicHostSpecificsToMavenLocal and install the artifacts needed on your platform.

But probably not worth redoing now 🤷

packages/build.gradle.kts Outdated Show resolved Hide resolved
packages/build.gradle.kts Outdated Show resolved Hide resolved
@cmelchior cmelchior merged commit fdcd389 into main Dec 19, 2023
2 checks passed
@cmelchior cmelchior deleted the cm/gradle-setup-for-ci branch December 19, 2023 16:05
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants