mirror of
https://github.com/tribufu/tribufu-java
synced 2026-05-06 06:47:27 +00:00
Migrate back to Kotlin
This commit is contained in:
parent
c85413b7e0
commit
4fd93e904f
7 changed files with 23 additions and 109 deletions
|
|
@ -1,8 +1,8 @@
|
|||
plugins {
|
||||
// Apply the scala Plugin to add support for Scala.
|
||||
scala
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
kotlin("jvm") version "1.4.10"
|
||||
|
||||
// Apply the java-library plugin for API and implementation separation.
|
||||
`java-library`
|
||||
}
|
||||
|
||||
|
|
@ -10,27 +10,15 @@ group = "tribufu"
|
|||
version = "0.0.1"
|
||||
|
||||
repositories {
|
||||
// Use Maven Central for resolving dependencies.
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Use Scala 2.13 in our library project
|
||||
implementation("org.scala-lang:scala-library:2.13.3")
|
||||
testImplementation(kotlin("test-junit"))
|
||||
}
|
||||
|
||||
// This dependency is used internally, and not exposed to consumers on their own compile classpath.
|
||||
implementation("com.google.guava:guava:30.0-jre")
|
||||
|
||||
// Use Scalatest for testing our library
|
||||
testImplementation("junit:junit:4.13.1")
|
||||
testImplementation("org.scalatest:scalatest_2.13:3.2.3")
|
||||
testImplementation("org.scalatestplus:junit-4-13_2.13:3.2.2.0")
|
||||
|
||||
// Need scala-xml at test runtime
|
||||
testRuntimeOnly("org.scala-lang.modules:scala-xml_2.13:1.2.0")
|
||||
|
||||
// This dependency is exported to consumers, that is to say found on their compile classpath.
|
||||
api("org.apache.commons:commons-math3:3.6.1")
|
||||
tasks.test {
|
||||
useJUnit()
|
||||
}
|
||||
|
||||
tasks.jar {
|
||||
|
|
@ -38,3 +26,7 @@ tasks.jar {
|
|||
attributes(mapOf("Implementation-Title" to project.name, "Implementation-Version" to project.version))
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompile>() {
|
||||
kotlinOptions.jvmTarget = "1.8"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue