A Mill plugin for testing your Giter8 templates. Modeled after the Giter8 sbt plugin.
- This plugin assumes that your Giter8 template is following the src
layout, meaning that it expects your template to be in
src/main/g8. - If using a
default.propertiesproperty file it needs to be located atsrc/main/g8/default-properties.
A minimal example structure
.
├── build.sc
├── mill
├── README.md
└── src
└── main
└── g8
├── build.sc
├── default.properties
├── mill
└── example
└── src
└── $package$
└── Main.scala
Assuming the above requirements are true, then to use this plugin you'll want to
include the plugin and extend the G8Module like so:
import $ivy.`io.chris-kipp::mill-giter8::0.2.0`
import io.kipp.mill.giter8.G8Module
object g8 extends G8Module {
override def validationTargets =
Seq("example.compile", "example.fix", "example.reformat")
}You can then run mill g8.validate which will first check to ensure your
project can be generated from the current template and then ensure the
validationTargets can run against your generated project.
generate- This will test the generation of your project.validate- This will both check the generation of your project and also run thevalidationTargetsagainst it.validationTargets- ASeqof targets that you'd like run against your project.