Added init keyword to builtins, maven projects and stdlib

This commit is contained in:
Stanislav Erokhin
2015-04-01 03:58:05 +03:00
parent 7cac6e3c5e
commit 6ab83c9b8c
8 changed files with 18 additions and 17 deletions
@@ -66,7 +66,7 @@ class KDocConfig() {
*/
public var includeProtected: Boolean = true
{
init {
// add some common defaults
addPackageLink("http://docs.oracle.com/javase/6/docs/api/", "java", "org.w3c.dom", "org.xml.sax", "org.omg", "org.ietf.jgss")
addPackageLink("http://kentbeck.github.com/junit/javadoc/latest/", "org.junit", "junit")
@@ -15,7 +15,7 @@ import org.jetbrains.kotlin.template.escapeHtml
class Html2CompilerPlugin(private val compilerArguments: KDocArguments) : Doclet {
private val docOutputRoot: File
{
init {
val docOutputDir = compilerArguments.docConfig.docOutputDir
if (docOutputDir.isEmpty()) {
throw IllegalArgumentException("empty doc output dir")
@@ -992,7 +992,7 @@ class KPackage(
class KType(val jetType: JetType, model: KModel, val klass: KClass?, val arguments: MutableList<KType> = ArrayList<KType>())
: KNamed(klass?.name ?: jetType.toString()!!, model, jetType.getConstructor().getDeclarationDescriptor()!!) {
{
init {
if (klass != null) {
this.wikiDescription = klass.wikiDescription
}
@@ -209,7 +209,7 @@ public open class Kotlin2JsCompile() : AbstractKotlinCompile<K2JSCompilerArgumen
public val sourceMap: Boolean
get() = kotlinOptions.sourceMap
{
init {
getOutputs().file(MethodClosure(this, "getOutputFile"))
}
@@ -255,7 +255,7 @@ public open class KDoc() : SourceTask() {
public var destinationDir: File? = null
{
init {
// by default, output dir is not defined in options
kdocArgs.docConfig.docOutputDir = ""
}
@@ -16,8 +16,9 @@ trait KotlinSourceSet {
open class KotlinSourceSetImpl(displayName: String?, resolver: FileResolver?): KotlinSourceSet {
private val kotlin: DefaultSourceDirectorySet = DefaultSourceDirectorySet(displayName + " Kotlin source", resolver);
{
private val kotlin: DefaultSourceDirectorySet = DefaultSourceDirectorySet(displayName + " Kotlin source", resolver)
init {
kotlin.getFilter()?.include("**/*.java", "**/*.kt")
}