Skip to content

Commit

Permalink
fix gradle run (#717)
Browse files Browse the repository at this point in the history
Signed-off-by: Hailong Cui <[email protected]>
  • Loading branch information
Hailong-am committed Jul 24, 2023
1 parent 3369795 commit fc488cf
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
3 changes: 3 additions & 0 deletions notifications/build-tools/merged-coverage.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ allprojects {

task jacocoReport(type: JacocoReport, group: 'verification') {
description = 'Generates an aggregate report from all subprojects'
onlyIf {
gradle.taskGraph.hasTask("jacocoTestReport")
}
gradle.projectsEvaluated {
subprojects.each {
jacocoReport.dependsOn it.tasks.withType(JacocoReport)
Expand Down
2 changes: 1 addition & 1 deletion notifications/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ buildscript {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}"
classpath "org.jetbrains.kotlin:kotlin-allopen:${kotlin_version}"
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.22.0"
classpath "org.jacoco:org.jacoco.agent:0.8.5"
classpath "org.jacoco:org.jacoco.agent:0.8.7"
}
}

Expand Down
2 changes: 0 additions & 2 deletions notifications/core-spi/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ repositories {
}

apply plugin: 'opensearch.java'
apply plugin: 'opensearch.testclusters'
apply plugin: 'opensearch.java-rest-test'
apply plugin: 'org.jetbrains.kotlin.jvm'
apply plugin: 'org.jetbrains.kotlin.plugin.allopen'

Expand Down
13 changes: 5 additions & 8 deletions notifications/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,6 @@ publishing {
}
}

tasks.register('integTest', RestIntegTestTask) {
description = "Run tests against a cluster that has security enabled"
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath
systemProperty 'tests.security.manager', 'false'
}

tasks.named("check").configure { dependsOn(integTest) }
check.dependsOn jacocoTestReport

// turn off javadoc as it barfs on Kotlin code
Expand All @@ -107,6 +99,11 @@ test {
systemProperty 'tests.security.manager', 'false'
}

// disable for core, we don't need to run test cluster
run {
onlyIf { false }
}

//TODO: see if this can be only set at top level and apply to subprojects, or we remove from top project if possible
configurations.configureEach {
if (it.state != Configuration.State.UNRESOLVED) return
Expand Down

0 comments on commit fc488cf

Please sign in to comment.