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 support of multiple native outputs #186

Merged
merged 4 commits into from
Dec 2, 2023
Merged

Conversation

pomadchin
Copy link
Member

This PR modifies all build tools behavior to put all the possible project outputs into the res artifact.

See #185 (comment)

Closes #185

@datben could you check if it works for you?

I'll try it on my repos as well later to ensure that nothing is broken with this change.

@pomadchin
Copy link
Member Author

I tested it on a project https://github.com/datben/jni-test, as the result it puts two binaries into the jar. The behavior looks legit!

@datben
Copy link

datben commented Dec 2, 2023

@pomadchin how can i add this branch in my sbt plugin, i tried this : addSbtPlugin("com.github.sbt" % "sbt-jni" % "1.6.0+40-911e3587-SNAPSHOT" from "https://github.com/sbt/sbt-jni.git#feature/list-files") but it doesnt work (i am not very familiar with sbt plugins)

@pomadchin
Copy link
Member Author

pomadchin commented Dec 2, 2023

@datben we don't not push to artifactory from branches; the easiest way to test like any scala project: clone, checkout branch, sbt publishLocal => use the published version (bump version up in the plugins.sbt file)

$ git clone [email protected]:sbt/sbt-jni.git; cd sbt-jnil; git checkout feature/list-files
$ sbt publishLocal
# bump plugin version here https://github.com/datben/jni-test/blob/master/project/plugins.sbt#L1

@datben
Copy link

datben commented Dec 2, 2023

@pomadchin lIt looks fine on my side, but perhaps you could consider adding a parameter to allow or disallow multiple outputs (defaulting to false) to avoid it being potentially a breaking change

@pomadchin pomadchin force-pushed the feature/list-files branch 2 times, most recently from 10c68b5 to c0d88ef Compare December 2, 2023 19:30
…elease so there is no implicit behavior change
@pomadchin
Copy link
Member Author

pomadchin commented Dec 2, 2023

@datben makes sense 👍

Added a new key:

nativeMultipleOutputs := {false | true} // false by default

@pomadchin pomadchin merged commit 035b96e into main Dec 2, 2023
11 checks passed
@pomadchin pomadchin deleted the feature/list-files branch December 2, 2023 20:10
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.

Cargo workspace
2 participants