Explicit misconfiguration signalization

This commit is contained in:
Kirill Shmakov
2019-06-15 12:47:56 +03:00
parent 47afd9ec1c
commit ae45bbcead
2 changed files with 11 additions and 4 deletions
+1 -1
View File
@@ -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()
+10 -3
View File
@@ -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