mirror of
https://github.com/irmen/ksim65.git
synced 2025-01-23 12:29:54 +00:00
create more start scripts
This commit is contained in:
parent
af99bfdc13
commit
02dca20f8d
@ -1,3 +1,5 @@
|
||||
import org.gradle.api.internal.plugins.UnixStartScriptGenerator
|
||||
import org.gradle.api.internal.plugins.WindowsStartScriptGenerator
|
||||
import org.jetbrains.dokka.gradle.DokkaTask
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
import kotlin.math.max
|
||||
@ -7,10 +9,10 @@ import java.util.Properties
|
||||
plugins {
|
||||
// Apply the Kotlin JVM plugin to add support for Kotlin on the JVM.
|
||||
kotlin("jvm") version "1.3.50"
|
||||
`maven-publish`
|
||||
application
|
||||
id("org.jetbrains.dokka") version "0.9.18"
|
||||
id("com.jfrog.bintray") version "1.7.3"
|
||||
id("maven-publish")
|
||||
id("application")
|
||||
}
|
||||
|
||||
val versionProps = Properties().also {
|
||||
@ -40,31 +42,51 @@ dependencies {
|
||||
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.1.0")
|
||||
}
|
||||
|
||||
tasks {
|
||||
named<Test>("test") {
|
||||
// Enable JUnit 5 (Gradle 4.6+).
|
||||
useJUnitPlatform()
|
||||
// Always run tests, even when nothing changed.
|
||||
dependsOn("cleanTest")
|
||||
// Show test results.
|
||||
testLogging.events("failed")
|
||||
|
||||
// parallel tests.
|
||||
systemProperty("junit.jupiter.execution.parallel.enabled", "true")
|
||||
systemProperty("junit.jupiter.execution.parallel.mode.default", "concurrent")
|
||||
maxParallelForks = max(1, Runtime.getRuntime().availableProcessors() / 2)
|
||||
}
|
||||
|
||||
withType<KotlinCompile> {
|
||||
kotlinOptions.jvmTarget = "1.8"
|
||||
}
|
||||
|
||||
named<DokkaTask>("dokka") {
|
||||
outputFormat = "html"
|
||||
outputDirectory = "$buildDir/kdoc"
|
||||
skipEmptyPackages = true
|
||||
}
|
||||
}
|
||||
|
||||
val c64emuScript by tasks.registering(CreateStartScripts::class) {
|
||||
outputDir = File(project.buildDir, "bin")
|
||||
applicationName = "c64emu"
|
||||
mainClassName = "razorvine.c64emu.C64MainKt"
|
||||
classpath = project.tasks["jar"].outputs.files + project.configurations.runtimeClasspath.get()
|
||||
}
|
||||
|
||||
val ehbasicScript by tasks.registering(CreateStartScripts::class) {
|
||||
outputDir = File(project.buildDir, "bin")
|
||||
applicationName = "ehbasic"
|
||||
mainClassName = "razorvine.examplemachines.EhBasicMainKt"
|
||||
classpath = project.tasks["jar"].outputs.files + project.configurations.runtimeClasspath.get()
|
||||
}
|
||||
|
||||
application {
|
||||
applicationName = "ksim65vm"
|
||||
mainClassName = "razorvine.examplemachines.MachineMainKt"
|
||||
}
|
||||
|
||||
tasks.named<Test>("test") {
|
||||
// Enable JUnit 5 (Gradle 4.6+).
|
||||
useJUnitPlatform()
|
||||
// Always run tests, even when nothing changed.
|
||||
dependsOn("cleanTest")
|
||||
// Show test results.
|
||||
testLogging.events("failed")
|
||||
|
||||
// parallel tests.
|
||||
systemProperty("junit.jupiter.execution.parallel.enabled", "true")
|
||||
systemProperty("junit.jupiter.execution.parallel.mode.default", "concurrent")
|
||||
maxParallelForks = max(1, Runtime.getRuntime().availableProcessors() / 2)
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompile> {
|
||||
kotlinOptions.jvmTarget = "1.8"
|
||||
}
|
||||
|
||||
tasks.named<DokkaTask>("dokka") {
|
||||
outputFormat = "html"
|
||||
outputDirectory = "$buildDir/kdoc"
|
||||
skipEmptyPackages = true
|
||||
applicationDistribution.into("bin") {
|
||||
from(c64emuScript, ehbasicScript)
|
||||
fileMode = 493
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user