From 397ce69452a0a3f27a3375c1f529671b204971e7 Mon Sep 17 00:00:00 2001 From: SimY4 Date: Thu, 20 May 2021 22:04:12 +1000 Subject: [PATCH] fix scala 3 publishing. --- xpath-to-xml-scala/build-3.gradle | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/xpath-to-xml-scala/build-3.gradle b/xpath-to-xml-scala/build-3.gradle index 6f145de0..00878d2f 100644 --- a/xpath-to-xml-scala/build-3.gradle +++ b/xpath-to-xml-scala/build-3.gradle @@ -35,15 +35,12 @@ dependencies { testImplementation 'org.assertj:assertj-core' } -jar { - from classesDir -} - def dottyCompilerOptions = [ '-project', project.name, '-project-url', projectUrl, '-project-version', project.version, '-encoding', 'UTF-8', + '-release', '8', '-deprecation', '-explain', // Explain errors in more detail. '-explain-types', // Explain type errors in more detail. @@ -66,6 +63,11 @@ task compileScala(type: JavaExec) { args dottyCompilerOptions + ['-d', classesDir] + sourceSets.main.allSource.filter { it.name.endsWith('.scala') }.files } +jar { + dependsOn compileScala + from classesDir +} + task compileTestScala(type: JavaExec) { dependsOn compileScala, compileTestJava doFirst { @@ -102,5 +104,5 @@ test { javadocJar { dependsOn scaladoc - from scaladoc + from scaladocDir }