Migrate Library to Kotlin

This commit is contained in:
GuilhermeWerner 2021-06-12 11:25:00 -03:00
parent 8a3eb4809e
commit 85ca2b7701
12 changed files with 81 additions and 79 deletions

View file

@ -1,6 +1,6 @@
plugins {
// Apply the scala Plugin to add support for Scala.
id "scala"
// Apply the org.jetbrains.kotlin.jvm Plugin to add support for Kotlin.
id "org.jetbrains.kotlin.jvm"
// Apply the java-library plugin for API and implementation separation.
id "java-library"
@ -15,26 +15,21 @@ repositories {
}
dependencies {
// Use Scala 2.13 in our library project
implementation "org.scala-lang:scala-library:2.13.3"
// Align versions of all Kotlin components
implementation platform("org.jetbrains.kotlin:kotlin-bom")
// Use the Kotlin JDK 8 standard library.
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
// 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"
// Use the Kotlin test library.
testImplementation "org.jetbrains.kotlin:kotlin-test"
// Need scala-xml at test runtime
testRuntimeOnly "org.scala-lang.modules:scala-xml_2.13:1.2.0"
// Use the Kotlin JUnit integration.
testImplementation "org.jetbrains.kotlin:kotlin-test-junit"
// 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.named("jar") {
manifest {
attributes("Implementation-Title": "TribuFu", "Implementation-Version": project.version)
}
}