tut icon indicating copy to clipboard operation
tut copied to clipboard

Gradle Integration Possibility

Open neilchaudhuri opened this issue 8 years ago • 3 comments

I know this isn't something people are clamoring for, but how hard would it be to integrate tut with Gradle rather than SBT? I am on a project currently where Gradle is the build tool of choice, but I would love to use tut.

Thanks.

neilchaudhuri avatar Feb 14 '17 16:02 neilchaudhuri

@neilchaudhuri I am sure this is no longer an issue for you, but since official Gradle integration still doesn't seem to exist, here is what I did:

repositories {  maven {  url 'https://dl.bintray.com/tpolecat/maven/'  }  }
dependencies {  runtime "org.tpolecat:tut-core_2.12:0.6.10" }
configurations.all {  resolutionStrategy {  force 'org.scala-lang:scala-library:2.12.7' }  }
task tut(type: JavaExec) {
  main = 'tut.TutMain'
  args = ["$projectDir/tut", "$projectDir/examples", ".*\\.(md|markdown|txt|htm|html)"]
  classpath = sourceSets.main.runtimeClasspath
}

dubinsky avatar Jan 14 '19 07:01 dubinsky

Thanks for the tip!

tpolecat avatar Jan 14 '19 16:01 tpolecat

@tpolecat my pleasure

I am not sure why do I need to force scala-library version to 2.12.7 used by Tut 0.6.10 when my project uses 2.12.8, but if I don't, I get java.lang.NoClassDefFoundError: scala/math/Ordering$$anon$9... Maybe nsc is sensitive to the minor version binary incompatibilities? Maybe it's time to release a version of Tut that uses Scala 2.12.8 :)

Also, since publishing to Maven Central (https://github.com/tpolecat/tut/issues/210) isn't yet happening, maybe you can (re-)link your personal Bintray repository https://dl.bintray.com/tpolecat/maven/org/tpolecat/tut-core_2.12/ to JCenter? The latest at https://jcenter.bintray.com/org/tpolecat/ is tut-core_2.10/...

Thanks!

dubinsky avatar Jan 21 '19 22:01 dubinsky