kotlin 1.3.60, gradle 6, junit5
This commit is contained in:
parent
af1e79ddba
commit
8071d33c44
@ -7,7 +7,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = "scientifik"
|
||||
version = "0.2.2"
|
||||
version = "0.2.4"
|
||||
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
@ -16,7 +16,7 @@ repositories {
|
||||
maven("https://dl.bintray.com/kotlin/kotlin-eap")
|
||||
}
|
||||
|
||||
val kotlinVersion = "1.3.50"
|
||||
val kotlinVersion = "1.3.60"
|
||||
|
||||
// Add plugins used in buildSrc as dependencies, also we should specify version only here
|
||||
dependencies {
|
||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
33
gradlew
vendored
33
gradlew
vendored
@ -125,8 +125,8 @@ if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
@ -154,19 +154,19 @@ if $cygwin ; then
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((i+1))
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
(0) set -- ;;
|
||||
(1) set -- "$args0" ;;
|
||||
(2) set -- "$args0" "$args1" ;;
|
||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
@ -175,14 +175,9 @@ save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=$(save "$@")
|
||||
APP_ARGS=`save "$@"`
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
|
@ -6,4 +6,5 @@ object Scientifik {
|
||||
const val coroutinesVersion = "1.3.2"
|
||||
const val atomicfuVersion = "0.12.11"
|
||||
const val serializationVersion = "0.13.0"
|
||||
const val JVM_VERSION = "11"
|
||||
}
|
||||
|
@ -36,12 +36,10 @@ open class ScientifikJSPlugin : Plugin<Project> {
|
||||
tasks.apply {
|
||||
val browserWebpack by getting(KotlinWebpack::class) {
|
||||
afterEvaluate {
|
||||
val destination = listOf(archiveBaseName, archiveAppendix, archiveVersion, archiveClassifier)
|
||||
.filter { it != null && it.isNotBlank() }
|
||||
.joinToString("-")
|
||||
val destination = listOf(name, version.toString()).joinToString("-")
|
||||
destinationDirectory = destinationDirectory?.resolve(destination)
|
||||
}
|
||||
archiveFileName = "main.bundle.js"
|
||||
outputFileName = "main.bundle.js"
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
|
@ -6,6 +6,7 @@ import org.gradle.api.plugins.JavaBasePlugin
|
||||
import org.gradle.api.publish.PublishingExtension
|
||||
import org.gradle.api.publish.maven.MavenPublication
|
||||
import org.gradle.api.tasks.bundling.Jar
|
||||
import org.gradle.api.tasks.testing.Test
|
||||
import org.gradle.kotlin.dsl.*
|
||||
import org.jetbrains.dokka.gradle.DokkaTask
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
|
||||
@ -22,7 +23,7 @@ open class ScientifikJVMPlugin : Plugin<Project> {
|
||||
|
||||
tasks.withType<KotlinCompile> {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
jvmTarget = "11"
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,7 +40,9 @@ open class ScientifikJVMPlugin : Plugin<Project> {
|
||||
languageSettings.applySettings()
|
||||
dependencies {
|
||||
implementation(kotlin("test"))
|
||||
implementation(kotlin("test-junit"))
|
||||
//implementation(kotlin("test-junit"))
|
||||
implementation(kotlin("test-junit5"))
|
||||
implementation("org.junit.jupiter:junit-jupiter:5.5.2")
|
||||
}
|
||||
}
|
||||
|
||||
@ -60,6 +63,8 @@ open class ScientifikJVMPlugin : Plugin<Project> {
|
||||
}
|
||||
|
||||
pluginManager.withPlugin("org.jetbrains.dokka") {
|
||||
logger.info("Adding dokka functionality to project ${this@with.name}")
|
||||
|
||||
val dokka by tasks.getting(DokkaTask::class) {
|
||||
outputFormat = "html"
|
||||
outputDirectory = "$buildDir/javadoc"
|
||||
@ -83,9 +88,9 @@ open class ScientifikJVMPlugin : Plugin<Project> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
tasks.withType<Test>(){
|
||||
useJUnitPlatform()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import org.gradle.api.publish.PublishingExtension
|
||||
import org.gradle.api.publish.maven.MavenPublication
|
||||
import org.gradle.api.tasks.Copy
|
||||
import org.gradle.api.tasks.bundling.Jar
|
||||
import org.gradle.api.tasks.testing.Test
|
||||
import org.gradle.kotlin.dsl.*
|
||||
import org.jetbrains.dokka.gradle.DokkaTask
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
|
||||
@ -27,7 +28,7 @@ open class ScientifikMPPlugin : Plugin<Project> {
|
||||
jvm {
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
jvmTarget = "11"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -57,7 +58,9 @@ open class ScientifikMPPlugin : Plugin<Project> {
|
||||
val jvmTest by getting {
|
||||
dependencies {
|
||||
implementation(kotlin("test"))
|
||||
implementation(kotlin("test-junit"))
|
||||
//implementation(kotlin("test-junit"))
|
||||
implementation(kotlin("test-junit5"))
|
||||
implementation("org.junit.jupiter:junit-jupiter:5.5.2")
|
||||
}
|
||||
}
|
||||
val jsMain by getting {
|
||||
@ -79,6 +82,7 @@ open class ScientifikMPPlugin : Plugin<Project> {
|
||||
}
|
||||
|
||||
pluginManager.withPlugin("org.jetbrains.dokka") {
|
||||
logger.info("Adding dokka functionality to project ${this@run.name}")
|
||||
val dokka by tasks.getting(DokkaTask::class) {
|
||||
outputFormat = "html"
|
||||
outputDirectory = "$buildDir/javadoc"
|
||||
@ -112,14 +116,11 @@ open class ScientifikMPPlugin : Plugin<Project> {
|
||||
|
||||
tasks.apply {
|
||||
val jsBrowserWebpack by getting(KotlinWebpack::class) {
|
||||
archiveClassifier = "js"
|
||||
project.afterEvaluate {
|
||||
val destination = listOf(archiveBaseName, archiveAppendix, archiveVersion, archiveClassifier)
|
||||
.filter { it != null && it.isNotBlank() }
|
||||
.joinToString("-")
|
||||
afterEvaluate {
|
||||
val destination = listOf(name, version.toString()).joinToString("-")
|
||||
destinationDirectory = destinationDirectory?.resolve(destination)
|
||||
}
|
||||
archiveFileName = "main.bundle.js"
|
||||
outputFileName = "main.bundle.js"
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
@ -138,6 +139,10 @@ open class ScientifikMPPlugin : Plugin<Project> {
|
||||
|
||||
findByName("assemble")?.dependsOn(installJsDist)
|
||||
}
|
||||
|
||||
withType<Test>(){
|
||||
useJUnitPlatform()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user