Because I don't know sbt...
./gradlew clean test npm_i npm_run_build
[[toc]]
initialize new scala
project:
mkdir gradle-scala-library-howto
cd gradle-scala-library-howto/
gradle init --type scala-library --package com.github.daggerok --project-name gradle-scala-library-howto --dsl kotlin
add to build.gradle.kts
file these lines for better developer experience on tests execution:
import org.gradle.api.tasks.testing.logging.TestLogEvent.*
tasks {
withType<Test> {
testLogging {
showExceptions = true
showStandardStreams = true
events(PASSED, SKIPPED, FAILED)
}
}
}
add to build.gradle.kts
file these lines for better developer experience on tests execution:
plugins {
// Add Gradle NodeJS support
id("com.moowork.node") version "1.3.1"
}
node {
download = true
}
prepare everything together with npm scrips and use gradle instead:
./gradlew npm_i # npm i
./gradlew npm_run build # npm run build
create .gitignore
file:
.idea/
*.iml
*.ipr
*.iws
*.log*
.gradle/
build/
/out/
.DS_Store
node_modules/
.vuepress/dist/
just see .travis.yml file as a the reference...