RFR: 7902924: Add build script for jtreg plugin [v4]
Bradford Wetmore
wetmore at openjdk.java.net
Wed May 5 20:26:57 UTC 2021
On Wed, 5 May 2021 14:10:21 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> This patch adds support for building the jtreg plugin with gradle.
>>
>> This is a much more stable way to build the plugin, as the IntelliJ build dependency is automatically downloaded by gradle.
>>
>> The build relies on the IntelliJ support for gradle-ized plugins:
>>
>> https://github.com/JetBrains/gradle-intellij-plugin
>>
>> Which is officially supported by JetBrains, see:
>>
>> https://plugins.jetbrains.com/docs/intellij/gradle-build-system.html
>>
>>
>> The only thing that needs to be done by developers before firing up a gradle build, is to specify the path of a jtreg root in the gradle.properties file. Everything else should work out of the box.
>>
>> I have also updated build instructions to reflect the new build system.
>>
>> Please let me know if this is an improvement over the build steps we had before (I think it is, but I have not tested this extensively).
>
> Maurizio Cimadamore has updated the pull request incrementally with two additional commits since the last revision:
>
> - Update jtreg root to point to non-existent folder
> - Exclude IntelliJ project files
I am not a reviewer for this project, just an interested user. I only read the README.md file and tried out the new build instructions.
plugins/idea/README.md line 2:
> 1: # jtreg plugin for IntelliJ IDE
> 2: ##### *Maurizio Cimadamore and Chris Hegarty, September 2016, version 0.4*
Can you change the wording of the version number in the README.md file so that it's clear that the version number is of the README, not the resulting binary. Or better yet, maybe also include the version of the current binary?
plugins/idea/README.md line 53:
> 51:
> 52: > Note: the property `intellijVersion` can be used to specify which IDE version should the plugin depend on (defaults to `2021.1`).
> 53:
Please mention that if you're behind a proxy, you'll need to configure the Java network settings.
`-Dhttps.proxyhost=<yourProxy> -Dhttps.proxyPort=<yourProxyPort>`
plugins/idea/README.md line 60:
> 58: ### Installing the plugin
> 59:
> 60: To install the plugin in your IDE, first you need to build a plugin module file (a `.jar` file), as described in the previous section.
Several comments here:
1. The addition in the filename "-gradle" is a little confusing, is it really necessary?
2. There are two jar files in my resulting build directory, you have to compare them to know they are the same. Just adds a speedbump for someone trying for the first time.
./build/libs/jtreg-plugin-gradle-1.12.jar
./build/idea-sandbox/plugins/jtreg-plugin-gradle/lib/jtreg-plugin-gradle-1.12.jar
3. IntelliJ can also install a .zip file, but you said to install the jar file. Is it possible to not build the .zip file?
./build/distributions/jtreg-plugin-gradle-1.12.zip
4. Lastly, I built the plugin with my default JDK 16 (60.0), but apparently Intellij IDEA 2021.1 only recognized up to JDK 11 (55.0) and hung after throwing up a popup. You might want to -target 11?
plugins/idea/README.md line 101:
> 99:
> 100: > Note: debugging only works with a _single_ test action (e.g. `@run` or `@compile`). If multiple test actions are present, debugging will not work correctly. This is a known issue. To workaround, please manually remove the test actions that do not need to be debugged.
> 101:
That is, once a `@compile file.java` has been built, `@compile` can be temporarily removed from the test source so the debugger can debug the `@run test`.
You might also include that @build isn't counted as a test action, and can coexist with an @run.
-------------
PR: https://git.openjdk.java.net/jtreg/pull/9
More information about the jtreg-dev
mailing list