Implement language settings API for Kotlin source sets
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||
* that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.gradle.plugin
|
||||
|
||||
interface LanguageSettingsBuilder {
|
||||
var languageVersion: String?
|
||||
|
||||
var apiVersion: String?
|
||||
|
||||
var progressiveMode: Boolean
|
||||
|
||||
fun enableLanguageFeature(name: String)
|
||||
|
||||
val enabledLanguageFeatures: Set<String>
|
||||
}
|
||||
+8
-5
@@ -9,19 +9,22 @@ import groovy.lang.Closure
|
||||
import org.gradle.api.Named
|
||||
import org.gradle.api.file.SourceDirectorySet
|
||||
import org.jetbrains.kotlin.gradle.plugin.HasKotlinDependencies
|
||||
import org.jetbrains.kotlin.gradle.plugin.LanguageSettingsBuilder
|
||||
|
||||
interface KotlinSourceSet : Named, HasKotlinDependencies {
|
||||
val kotlin: SourceDirectorySet
|
||||
fun kotlin(configureClosure: Closure<Any?>): SourceDirectorySet
|
||||
|
||||
val resources: SourceDirectorySet
|
||||
|
||||
fun kotlin(configureClosure: Closure<Any?>): SourceDirectorySet
|
||||
val languageSettings: LanguageSettingsBuilder
|
||||
fun languageSettings(configureClosure: Closure<Any?>): LanguageSettingsBuilder
|
||||
|
||||
fun dependsOn(other: KotlinSourceSet)
|
||||
val dependsOn: Set<KotlinSourceSet>
|
||||
|
||||
companion object {
|
||||
const val COMMON_MAIN_SOURCE_SET_NAME = "commonMain"
|
||||
const val COMMON_TEST_SOURCE_SET_NAME = "commonTest"
|
||||
}
|
||||
|
||||
fun dependsOn(other: KotlinSourceSet)
|
||||
|
||||
val dependsOn: Set<KotlinSourceSet>
|
||||
}
|
||||
Reference in New Issue
Block a user