finnvoor / PlaydateKit

Create games for Playdate using Swift.
https://finnvoor.github.io/PlaydateKit/documentation/playdatekit
Creative Commons Zero v1.0 Universal
199 stars 21 forks source link

Support for multiple package products #104

Closed STREGA closed 1 week ago

STREGA commented 1 week ago

These changes allow a package to have more than one package product. This will allow users to build multiple games or create a simple playground game to test things in. This will also make unrelated products ignored so the package can have products for build tools etc...

PDCPlugin now takes an optional --product argument. -When the argument is provided PDCPlugin will build only that product. -When the argument is not provided PDCPlugin will now look for the first product to include PlaydateKit as a dependency. --When no valid product is found an error will now be thrown instead of a crash.

-Resource copying is updated to only copy resources from the package product being built and it's dependencies. -The build product name will now use the package->product->name instead of the package->name.