Explicit misconfiguration signalization
This commit is contained in:
@@ -122,7 +122,7 @@ allprojects {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: These classes should be omitted once Gradle plugin supports local.properties
|
||||
// TODO: hide these classes in special gradle plugin for kotlin-ultimate which will support local.properties
|
||||
class LocalBuildPropertiesProvider(private val project: Project) {
|
||||
private val localProperties: Properties = Properties()
|
||||
|
||||
|
||||
@@ -62,12 +62,19 @@ class KotlinBuildProperties(
|
||||
|
||||
val isTeamcityBuild: Boolean = getBoolean("teamcity") || System.getenv("TEAMCITY_VERSION") != null
|
||||
|
||||
val intellijUltimateEnabled: Boolean = kotlinUltimateExists && (getBoolean("intellijUltimateEnabled") || isTeamcityBuild)
|
||||
val intellijUltimateEnabled: Boolean
|
||||
get() {
|
||||
val explicitlyEnabled = getBoolean("intellijUltimateEnabled")
|
||||
if (!kotlinUltimateExists && explicitlyEnabled) {
|
||||
error("intellijUltimateEnabled property is set, while kotlin-ultimate repository is not provided")
|
||||
}
|
||||
return kotlinUltimateExists && (explicitlyEnabled || isTeamcityBuild)
|
||||
}
|
||||
}
|
||||
|
||||
private const val extensionName = "kotlinBuildFlags"
|
||||
|
||||
class ProjectProperties(val project: Project): PropertiesProvider {
|
||||
class ProjectProperties(val project: Project) : PropertiesProvider {
|
||||
override val rootProjectDir: File
|
||||
get() = project.projectDir
|
||||
|
||||
@@ -80,7 +87,7 @@ val Project.kotlinBuildProperties: KotlinBuildProperties
|
||||
rootProject.extensions.add(extensionName, it)
|
||||
}
|
||||
|
||||
class SettingsProperties(val settings: Settings): PropertiesProvider {
|
||||
class SettingsProperties(val settings: Settings) : PropertiesProvider {
|
||||
override val rootProjectDir: File
|
||||
get() = settings.rootDir
|
||||
|
||||
|
||||
Reference in New Issue
Block a user