-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repacked the intellij-agent artifact to kover-jvm-agent #550
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the Kover agent is supposed to be used by end users, some documentation for it is needed (at least for argsfile setup)
build-logic/src/main/kotlin/kotlinx/kover/conventions/kover-fat-jar-conventions.gradle.kts
Show resolved
Hide resolved
kover-gradle-plugin/src/main/kotlin/kotlinx/kover/gradle/plugin/dsl/KoverVersions.kt
Show resolved
Hide resolved
kover-jvm-agent/src/main/java/kotlinx/kover/jvmagent/KoverJvmAgentPremain.java
Show resolved
Hide resolved
kover-jvm-agent/src/main/java/kotlinx/kover/jvmagent/IntellijIntegration.java
Outdated
Show resolved
Hide resolved
// no-op | ||
} | ||
|
||
public static boolean isBoolean(String value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can safely move this to KoverJvmAgentPremain
without creating unnecessary utils class
} else if (line.length() == 0) { | ||
// skip empty line | ||
} else { | ||
throw new IllegalArgumentException("Unrecognized line in Kover arguments file: " + line); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If args file is supposed to be filled by user (and from commit message I suppose it is), it would be nice to mention in the exception what valid values are. E.g. Line must start with one of prefixes: ${listOf(FILE_PATH_ATTRIBUTE, APPEND_ATTRIBUTE, ...}
kover-jvm-agent/src/main/java/kotlinx/kover/jvmagent/KoverJvmAgentPremain.java
Outdated
Show resolved
Hide resolved
build-logic/src/main/kotlin/kotlinx/kover/conventions/kover-publishing-conventions.gradle.kts
Show resolved
Hide resolved
User can use the JVM agent separately, with the name kover and without mentioning IntelliJ, as well as reduce the number of parameters and properties required to transfer to the agent. Now Kover Gradle Plugin uses kover-jvm-agent with the same version. To do this, the transfer of staging repositories was added to the functional tests. The common logic of publishing was also extracted into a separate convention plugin. Resolves #464
kover-jvm-agent/docs/index.md
Outdated
## Getting a readable report | ||
To get a readable coverage report, you need to: | ||
1. [Connect JVM agent on JVM start](#connecting-the-jvm-agent) | ||
2. Terminate the JVM application. When application finished, the binary report file will be saved |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2. Terminate the JVM application. When application finished, the binary report file will be saved | |
2. Run your JVM application and wait until it exits. When the application is finished, the binary report file will be saved. |
(also add dots for other items)
## Kover JVM arguments file | ||
The arguments file is a set of settings, each of which is written on a new line. | ||
Line format: `argument_name=argument_value` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add info like report.file argument is required, while the rest are optional
.
- `exclude` - specify which classes do not need to be modified when loading. For such classes, the coverage will always be 0. | ||
|
||
It is acceptable to use `*` and `?` wildcards, `*` means any number of arbitrary characters (including no chars), `?` means one arbitrary character. | ||
- `exclude.regex` - specify which classes do not need to be modified when loading. For such classes, the coverage will always be 0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is exclude.regex
simply combined with exclude
or something else happens? Please add info to the doc, e.g. "It is possible to use exclude
and exclude.regex
at the same time"
kover-jvm-agent/docs/index.md
Outdated
|
||
It is acceptable to specify regex. | ||
|
||
Example of arguments file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example of arguments file | |
Example of arguments file: |
@@ -0,0 +1,9 @@ | |||
package kotlinx.kover.jvmagent; | |||
|
|||
public class ParseUtils { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this file can be deleted completely
User can use the JVM agent separately, with the name kover and without mentioning IntelliJ, as well as reduce the number of parameters and properties required to transfer to the agent.
Now Kover Gradle Plugin uses kover-jvm-agent with the same version. To do this, the transfer of staging repositories was added to the functional tests. The common logic of publishing was also extracted into a separate convention plugin.
Resolves #464