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

Fix #30 #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions plugin/src/main/kotlin/com/nishtahir/CargoBuildTask.kt
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,9 @@ open class CargoBuildTask : DefaultTask() {
if (targetIncludes != null) {
spec.include(targetIncludes.asIterable())
} else {
// It's safe to unwrap, since we bailed at configuration time if this is unset.
val libname = libname!!
spec.include("lib${libname}.so")
spec.include("lib${libname}.dylib")
spec.include("${libname}.dll")
spec.include(libname!!)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Huh, is this right for non-linux platforms? macos uses .dylib and windows uses .dll.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh maybe the issue is that I am compiling a binary to be bundled into the apk -- not a library.

Copy link
Contributor

Choose a reason for hiding this comment

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

Right, for bundling an APK that's right, but rust-android-gradle also supports being used for other situations (namely unit tests on the host machine, as discussed in comments below).

Sorry for all the trouble here!

rename { filename -> "lib$filename.so" }
}
}
}
Expand Down