Skip to content

Commit

Permalink
fix coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
wagyourtail committed Jun 19, 2024
1 parent 665801a commit 8c5e69f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ abstract class CoverageRunTask : ConventionTask() {

init {
group = "jvmdg"
coverageReports = project.files(temporaryDir.resolve("coverage"))
coverageReports = project.files(project.layout.buildDirectory.asFile.get().resolve("coverage"))
}

@TaskAction
Expand All @@ -42,7 +42,7 @@ abstract class CoverageRunTask : ConventionTask() {
it.languageVersion.set(JavaLanguageVersion.of(javaVersion.get().majorVersion))
}.get().executablePath.asFile.absolutePath

spec.workingDir = temporaryDir
spec.workingDir = project.layout.buildDirectory.asFile.get()
spec.mainClass.set("xyz.wagyourtail.jvmdg.coverage.ApiCoverageChecker")
spec.classpath = classpath
spec.jvmArgs("-Djvmdg.java-api=${apiJar.get().asFile.absolutePath}", "-Djvmdg.quiet=true")
Expand Down
2 changes: 1 addition & 1 deletion java-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ val genCtSym by tasks.registering(GenerateCtSymTask::class) {

val coverageReport by tasks.registering(CoverageRunTask::class) {
group = "jvmdg"
dependsOn(coverageApiJar, genCtSym)
dependsOn(coverageApiJar, genCtSym, tasks.getByName("compileCoverageJava"))
apiJar.set(coverageApiJar.get().archiveFile.get().asFile)
classpath = coverage.runtimeClasspath
ctSym.set(genCtSym.get().ctSym)
Expand Down
1 change: 0 additions & 1 deletion src/shared/java/xyz/wagyourtail/jvmdg/util/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import java.io.InputStream;
import java.lang.invoke.MethodHandles;
import java.lang.reflect.Field;
import java.net.URI;
import java.nio.file.FileSystem;
import java.nio.file.FileSystems;
import java.nio.file.Files;
Expand Down

0 comments on commit 8c5e69f

Please sign in to comment.