Giter VIP home page Giter VIP logo

mill-jacoco's Introduction

mill-jacoco - Coverage Reporting for Mill

Mill plugin to collect test coverage data with JaCoCo and generate reports.

Quickstart

You need at least Mill 0.9.7 to use mill-jacoco.

To enable coverage data generation with JaCoCo, you need to add the JacocoTestModule to your tests.

import mill._
import mill.scalalib._
import mill.define._

// Load the plugin from Maven Central via ivy/coursier
import $ivy.`de.tototec::de.tobiasroeser.mill.jacoco::0.0.4`
import de.tobiasroeser.mill.jacoco.JacocoTestModule

object main extends JavaModule {
  object test extends super.Tests with JacocoTestModule
}

To generate JaCoCo reports, run:

mill de.tobiasroeser.mill.jacoco.Jacoco/jacocoReportFull

Download

You can download binary releases from Maven Central.

Please make sure to use the correct mill platform suffix matching your used mill version.

License

This project is published under the Apache License, Version 2.0.

About

mill

Mill is a Scala-based open source build tool. In my opinion the best build tool for the JVM. It is fast, reliable and easy to understand.

me

Iā€™m a professional software developer and love to write and use open source software. Iā€™m actively developing and maintaining mill as well as several mill plugins.

If you like my work, please star it on GitHub. You can also support me via GitHub Sponsors.

Contributing

If you found a bug or have a feature request, please open a new issue on GitHub. I also accept pull requests on GitHub.

Releases / Changelog

0.0.4 - 2024-02-06

  • Better detect Mill test modules to exclude their files / classes from coverage reports. Requires at least Mill 0.11.7.

0.0.3 - 2023-06-24

  • Support for Mill 0.11

  • Dependency updates

0.0.2 - 2022-04-12

  • Support for Mill 0.10

0.0.1 - 2021-10-16

  • Initial Release

mill-jacoco's People

Contributors

dependabot[bot] avatar lefou avatar scala-steward avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

scala-steward

mill-jacoco's Issues

[feature request] being able to detect all test modules

These two lines indicate mill-jacoco only support test package in test name:

excludeSources = "__.test.allSources",
excludeCompiled = "__.test.compile"

for other packages foo extends Tests or bar extends Tests cannot be detected by Jacobo.
a cursed idea is finding a directory having testFramework(or some internal test api) to automatically detect the test packages

Mill failed to resolve Jacoco in command

Here is my environment

Mill Build Tool version 0.9.9
Java version: 17, vendor: Homebrew, runtime: /opt/homebrew/Cellar/openjdk/17/libexec/openjdk.jdk/Contents/Home
Default locale: en_US, platform encoding: UTF-8
OS name: "Mac OS X", version: 12.0.1, arch: aarch64

build.sc compiled successfully.

but mill cannot resolve:

mill -i 'de.tototec.mill.jacoco.Jacoco/generateReportFull'
Cannot resolve external module de.tototec.mill.jacoco.Jacoco

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.