-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify helper functions for native code
The `cast/helpers.kt` script defines various functions that help us configure tasks that work with native code, such as natively compiled libraries. I ported these from Groovy to Kotlin when I was still fairly new to the latter. I've gotten better with Kotlin since then, and I now see how some of these functions could be simplified. For example, judicious use of extension methods makes some functions easier to call, and also makes it easier for those functions' implementations to access properties of the receiver object. In other cases, some function parameters can be computed from other parameters, thereby making the function easier to call correctly and harder to call incorrectly. None of this constitutes a radical change to the suite of helper functions or how they are used to configure tasks. It's just a bunch of small cleanups and simplifications from 2024-me, who knows Kotlin better than 2022-me.
- Loading branch information
Showing
6 changed files
with
130 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters