nscn.polaris2.protoc.mill

Members list

Type members

Classlikes

trait ProtocModule extends ScalaModule

Generates Scala 3 sources from .proto files.

Generates Scala 3 sources from .proto files.

Mix into a ScalaModule and put the schemas in protobuf/:

object app extends ScalaModule, ProtocModule {
 def scalaVersion = "3.9.0"
 // .proto files live in `app/protobuf` by default
}

The generated sources join generatedSources and mill-protoc-runtime joins mvnDeps, so a consumer declares neither.

Adding to mvnDeps or generatedSources in a module that mixes this in must go through super:

def mvnDeps = Task { super.mvnDeps() ++ Seq(mvn"...") }

A bare def mvnDeps = Seq(...) compiles cleanly - Mill's build-file compiler inserts override for you - and silently drops the runtime, which surfaces much later as unresolved nscn.polaris2.protoc.runtime.* symbols.

Attributes

Companion
object
Supertypes
trait ScalaModule
trait ScalaModuleApi
trait ScalaModuleBase
trait JavaModule
trait JavaModuleApi
trait JdkCommandsModule
trait AssemblyModule
trait SemanticDbJavaModule
trait SemanticDbJavaModuleApi
trait OfflineSupportModule
trait GenIdeaModule
trait GenIdeaModuleApi
trait RunModule
trait RunModuleApi
trait DefaultTaskModule
trait JavaModuleBase
trait BspModule
trait BspModuleApi
trait WithJvmWorkerModule
trait JavaHomeModule
trait CoursierModule
trait Module
trait ModuleApi
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
object ProtocModule

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type