kscript icon indicating copy to clipboard operation
kscript copied to clipboard

Kotlin options in script don't make it into packaging

Open vsajip opened this issue 3 years ago • 3 comments

This line https://github.com/holgerbrandl/kscript/blob/dc827753adf707cf31cd220716e85139cae2d9cd/src/main/kotlin/kscript/app/code/GradleTemplates.kt#L44 fails to pick up Kotlin options declared like this: https://github.com/holgerbrandl/kscript/blob/dc827753adf707cf31cd220716e85139cae2d9cd/test/resources/package_example.kts#L1

I see that the Script has these two fields: https://github.com/holgerbrandl/kscript/blob/dc827753adf707cf31cd220716e85139cae2d9cd/src/main/kotlin/kscript/app/model/Script.kt#L21-L22 However the kotlinOpts seems not to be used, at least in the Gradle template generation, How come?

vsajip avatar Jun 10 '22 19:06 vsajip

Also, I can't see how the original Gradle capsule plugin would have got the information (like the -Xmx setting). Any pointers?

vsajip avatar Jun 10 '22 19:06 vsajip

Some small improvements are already in 4.1 branch. Please have a look.

aartiPl avatar Jun 10 '22 19:06 aartiPl

I compared branches - there's little to no overlap. Anyway, I've updated my code to pick up those flags now.

vsajip avatar Jun 10 '22 21:06 vsajip