Commit Graph

9 Commits

Author SHA1 Message Date
Vladimir Sitnikov 1ee08f4e28 chore: use Gradle toolchains for JDK provisioning
It enables automatic JDK provisioning (e.g. download), and it enables
using different JDKs for executing Gradle and for building JMeter

Java version can be specified when building with -PjdkVersion=11

You could use ./gradlew -q javaToolchains to list the detected toolchains.

See https://docs.gradle.org/8.0/userguide/toolchains.html#sec:consuming

Fixes https://github.com/apache/jmeter/issues/5986
2023-06-24 18:49:05 +03:00
Vladimir Sitnikov cabc3fbe15 chore: use testFixtures sourceset instead of depending on all the test classes
This change enables cleaner separation between "actual tests" and "support classes for the tests".

For instance, `:src:core` might provide dummy samplers like `ThreadSleep` for testing purposes.
`ThreadSleep` would depend on `src/test/main` (since it would `extend AbstractSampler`),
 and other modules (e.g. tests in `:src:protocols:http`) might need that `ThreadSleep` sampler.

It won't be practical to create `core-testkit` modules for every module,
so we move those reusable test classes to `testFixtures/...` source set.

See https://docs.gradle.org/current/userguide/java_testing.html#sec:java_test_fixtures
2023-06-08 13:37:07 +03:00
Vladimir Sitnikov 5f6bb607be chore: reduce verbosity of the build logs
Ignore "missing javadoc" warnings
2023-06-04 08:54:44 +03:00
Vladimir Sitnikov e609610160 chore: remove unused build-logic.testing.gradle.kts 2023-05-19 11:32:02 +03:00
Vladimir Sitnikov eedabdd6c0
feat: use ServiceLoader to find implementations instead of searching classes in jars (#5885)
ServiceLoader is Java standard approach for locating implementaitons,
and it allows pluggability without relying on a filesystem layout.

Fixes https://github.com/apache/jmeter/issues/5883
2023-05-11 16:20:17 +03:00
Vladimir Sitnikov 0a193334c4 chore: add --release 8 when compiling with Java 10+ so the generated bytecode uses Java 8 methods only
For instance, overrides like java.nio.DoubleBuffer#clear() do not exist in Java 8,
so without "--release 8" the bytecode will not execute in Java 8.
With --release 8, javac compiles the call to java.nio.Buffer#clear() which
exists in Java 8.
2023-05-01 16:48:00 +03:00
Vladimir Sitnikov 3443047c88 Use © instead of © for javadoc footer to better support non-UTF-8 encodings
By default, javadoc uses defaultCharset encoding which is not reliable with non-latin characters
2023-04-30 09:19:47 +03:00
Vladimir Sitnikov d50c11e8ec chore: create separate BOM for dependencies used in tests
Moving test versions for testing dependencies to a separate BOM
would make it slightly easier for the consumers to work with regular JMeter dependencies.

In other words, JMeter should not require a specific JUnit 5 version,
so JUnit5 should not be a part of the regular dependencies.
2023-04-28 20:00:40 +03:00
Vladimir Sitnikov a9ec76d067 chore: factor build-logic so it is easier to reuse
See https://docs.gradle.org/current/userguide/structuring_software_products.html
2023-04-27 14:26:05 +03:00