spoon {
// The number of separate shards to create.
if (project.hasProperty('spoonNumShards')) {
numShards = project.spoonNumShards
}
// The shardIndex option to specify which shard to run.
if (project.hasProperty('spoonShardIndex')) {
shardIndex = project.spoonShardIndex
}
}
spoon {
// The number of separate shards to create.
if (project.hasProperty('spoonNumShards')) {
numShards = Integer.valueOf(project.spoonNumShards)
}
// The shardIndex option to specify which shard to run.
if (project.hasProperty('spoonShardIndex')) {
shardIndex = Integer.valueOf(project.spoonShardIndex)
}
}
Ask:
Avoid this issue by having the spoon gradle plugin validate its input and throw an exception when numShards/shardIndex, are not integers.
I have the following code:
I ran the following command
Expected output:
Actual output:
To fix this,
Integer.valueOf(..)
is needed.Ask: Avoid this issue by having the spoon gradle plugin validate its input and throw an exception when
numShards
/shardIndex
, are not integers.Thanks!