Skip to content

Instantly share code, notes, and snippets.

View mkobit's full-sized avatar
🧀

Mike Kobit mkobit

🧀
  • Chicago
  • 22:02 (UTC -05:00)
View GitHub Profile
@mkobit
mkobit / build.gradle.kts
Last active December 14, 2022 00:29
Run Kotlin REPL with built source code and main classpath in Gradle
// Assuming Kotlin plugin is applied...
// Run as: ./gradlew kotlinRepl --console plain --no-daemon
val kotlinRepl by tasks.creating {
description = "Starts Kotlin REPL with compiled main classes and runtime classpath"
val mainSourceSet = java.sourceSets["main"]
dependsOn(mainSourceSet.output)
doFirst {
val buildscriptClasspath = rootProject.buildscript.configurations["classpath"]
@mkobit
mkobit / build.gradle
Created July 31, 2017 16:17
Gradle - Pin Groovy version in codenarc configuration CodeNarc
// The 'codenarc' plugin has a configuration with a dynamic Groovy dependency.
// This can be different that the actual version you are using.
// codenarc - The CodeNarc libraries to be used for this project.
// \--- org.codenarc:CodeNarc:0.27.0
// +--- org.gmetrics:GMetrics:0.7
// | +--- org.codehaus.groovy:groovy:[2.1.0,) -> 2.5.0-beta-1
// | +--- org.codehaus.groovy:groovy-xml:[2.1.0,) -> 2.5.0-beta-1
// | | \--- org.codehaus.groovy:groovy:2.5.0-beta-1
// | \--- org.codehaus.groovy:groovy-ant:[2.1.0,) -> 2.5.0-beta-1
// | +--- org.codehaus.groovy:groovy:2.5.0-beta-1