Skip to content

Commit

Permalink
jacoco on windows
Browse files Browse the repository at this point in the history
Signed-off-by: Hailong Cui <[email protected]>
  • Loading branch information
Hailong-am committed Jan 16, 2024
1 parent 2c08e10 commit aab32a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions build-tools/opensearchplugin-coverage.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ allprojects{

testClusters.integTest {
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
// Replacing build with absolute path to fix the error "error opening zip file or JAR manifest missing : /build/tmp/expandedArchives/..../jacocoagent.jar"
// jvmArgs " ${dummyIntegTest.jacoco.getAsJvmArg()}".replace('build',"${buildDir}")
jvmArgs " ${dummyIntegTest.jacoco.getAsJvmArg()}"
} else {
jvmArgs " ${dummyIntegTest.jacoco.getAsJvmArg()}".replace('javaagent:','javaagent:/')
}
Expand Down
5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ run {

task ktlint(type: JavaExec, group: "verification") {
description = "Check Kotlin code style."
main = "com.pinterest.ktlint.Main"
mainClass = "com.pinterest.ktlint.Main"
classpath = configurations.ktlint
args "src/**/*.kt"
// to generate report in checkstyle format prepend following args:
Expand All @@ -522,9 +522,10 @@ check.dependsOn ktlint

task ktlintFormat(type: JavaExec, group: "formatting") {
description = "Fix Kotlin code style deviations."
main = "com.pinterest.ktlint.Main"
mainClass = "com.pinterest.ktlint.Main"
classpath = configurations.ktlint
args "-F", "src/**/*.kt"
jvmArgs "--add-opens=java.base/java.lang=ALL-UNNAMED"
}

compileKotlin { kotlinOptions.freeCompilerArgs = ['-Xjsr305=strict'] }
Expand Down

0 comments on commit aab32a2

Please sign in to comment.