Created
November 28, 2019 04:18
-
-
Save koterpillar/edea748d363cb73a795c8ed3970e1b9f to your computer and use it in GitHub Desktop.
Enable Scala kind projector in a Gradle build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This enables kind projector (https://github.com/typelevel/kind-projector) in a Gradle build. | |
// Versions used: Gradle 6.0.1, Scala 2.13.1. | |
ext { | |
scalaVersionFull = '2.13.1' | |
scalaVersion = '2.13' | |
} | |
configurations { | |
kindProjectorPlugin | |
} | |
dependencies { | |
implementation "org.scala-lang:scala-library:${scalaVersionFull}" | |
kindProjectorPlugin group: 'org.typelevel', name: "kind-projector_${scalaVersionFull}", version: '0.11.0' | |
} | |
tasks.withType(ScalaCompile) { | |
scalaCompileOptions.additionalParameters = [ | |
"-Xplugin:" + configurations.kindProjectorPlugin.asPath, | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For anyone searching for what this looks like in Kotlin DSL:
build.gradle.kts: