melix / jmh-gradle-plugin

Integrates the JMH benchmarking framework with Gradle
Apache License 2.0
662 stars 88 forks source link

Use List instead of ListProperty for `benchmarkParameters` values #206

Open jrhee17 opened 2 years ago

jrhee17 commented 2 years ago

Motivation

ex) https://github.com/line/armeria/pull/3811

It seems like most usages assume that the parameter values are List rather than ListProperty ref: https://github.com/search?l=Gradle&p=5&q=benchmarkParameters&type=Code

Using previous code naively, the following exception is raised:

> Error while evaluating property 'benchmarkParameters' of task ':benchmarks:jmh'
   > Failed to calculate the value of task ':benchmarks:jmh' property 'benchmarkParameters'.
      > Failed to query the value of extension 'jmh' property 'benchmarkParameters'.
         > Cannot get the value of a property of type java.util.Map with value type org.gradle.api.provider.ListProperty as the source contains a value of type java.util.ArrayList.

A workaround exists so I wouldn't say this is critical, but I was wondering if this API change was intentional.

Modification