gradle / gradle/gradle-native

Allow C++ and Swift library binaries to be installed into a location other than the build output location

Open
#142 15 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
94
Forks
7
PR merge metrics
No merged PRs in 30d

Description

Currently, on Linux and MacOs, we don't do anything special to allow library binaries to be relocated on the file system and so as a result they are not. This is something we have intentionally ignored for now so as to make progress on other things, as the binaries remain mostly usable while everything is happening on the build machine.

However, when publishing to a binary repository the binaries leave the build machine and typically end up in a location that is different to where they were built, rendering them unusable.

This issue also affects build caching to some degree. While the caching can happily deal with binaries that are not relocatable, it is much more effective when the binaries can be reused into different locations.

For this story, change the C++ and Swift plugins to drive the linker so that library binaries can be relocated on the file system. This is an unblocking story, so assume for this story that the libraries are used only by executables built by Gradle. Out of scope are libraries consumed in other ways or executables that are packaged in some other way than the `install` task.

Contributor guide

Open the contributing guide

Research direction

Start with the C++ and Swift plugins, focusing on how they drive the linker and how the install task handles library binaries. Verify behavior by moving installed binaries away from the build output location and using them from Gradle-built executables. Done means the libraries remain usable after relocation, while non-Gradle consumers and other packaging methods remain out of scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, swift
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.