diff --git a/build.gradle b/build.gradle index b6bc5ff..3698d71 100644 --- a/build.gradle +++ b/build.gradle @@ -51,6 +51,7 @@ dependencies { testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version" } +//noinspection GroovyAssignabilityCheck tasks.withType(JavaCompile) { options.encoding = 'UTF-8' } jar { from { configurations.library.collect { it.isDirectory() ? it : zipTree(it) } } } @@ -88,12 +89,16 @@ dokka { task dokkaJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask) { outputFormat = 'html' - outputDirectory = "$buildDir/javadoc" + outputDirectory = javadoc.destinationDir } -artifacts { - fatJar - sourcesJar - dokkaJavadoc +task javadok(type: Jar, dependsOn: dokkaJavadoc) { + classifier = 'javadoc' + from javadoc.destinationDir } +artifacts { + archives fatJar + archives sourcesJar + archives javadok +} diff --git a/src/org/frice/Initializer.kt b/src/org/frice/Initializer.kt index 6b8bd1d..2848a6d 100644 --- a/src/org/frice/Initializer.kt +++ b/src/org/frice/Initializer.kt @@ -18,6 +18,11 @@ import javax.swing.UIManager import javax.swing.WindowConstants import kotlin.concurrent.thread +/** + * You're not expected to use this class yourself. + * @author ice1000 + * @since v1.5.0 + */ @Suppress("ClassName") object `{-# LANGUAGE Initializer #-}` { init { @@ -49,6 +54,13 @@ fun launch(game: GameFX) = launchFx(game) fun launchFx(game: Class) = launchFx(game.newInstance()) +/** + * GameFX launcher. + * This is actually redundant, just to avoid naming conflict + * + * @author ice1000 + * @since v1.5.0 + */ fun launchFx(game: GameFX) { `{-# LANGUAGE Initializer #-}` FManager.useJfx = true @@ -79,6 +91,13 @@ fun launch(game: Game) { FLog.v("Engine thread successfully created.") } +/** + * Game launcher. + * For Game/GameFX. + * + * @author ice1000 + * @since v1.5.0 + */ fun launch(c: Class) = c.newInstance().let { instance -> `{-# LANGUAGE Initializer #-}` when (instance) {