Skip to content

Commit dbc6640

Browse files
author
Krystian Panek
committed
Minor improvements
1 parent 91800ea commit dbc6640

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

src/main/kotlin/com/cognifide/gradle/environment/EnvironmentExtension.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ open class EnvironmentExtension(val project: Project) : Serializable {
4646
/**
4747
* Configures environment service health checks.
4848
*/
49+
fun checks(options: HealthChecker.() -> Unit) = healthChecks(options)
50+
4951
fun healthChecks(options: HealthChecker.() -> Unit) = healthChecker.using(options)
5052

5153
val healthChecker by lazy { HealthChecker(this) }

src/main/kotlin/com/cognifide/gradle/environment/health/HealthChecker.kt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,7 @@ class HealthChecker(val environment: EnvironmentExtension) {
6868
}
6969
}
7070

71-
val message = "Environment health check(s) succeed: $count"
72-
if (!verbose) {
73-
logger.lifecycle(message)
74-
} else {
75-
logger.info(message)
76-
}
71+
logger.lifecycle("Environment health check(s) succeed: $count")
7772
} catch (e: EnvironmentException) {
7873
val message = "Environment health check(s) failed. Success ratio: $count:\n" +
7974
all.sortedWith(compareBy({ it.passed }, { it.check.name })).joinToString("\n")

src/main/kotlin/com/cognifide/gradle/environment/tasks/EnvironmentHosts.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ open class EnvironmentHosts : EnvironmentDefaultTask() {
77

88
@TaskAction
99
fun appendHosts() {
10-
logger.lifecycle("Hosts entries to be appended to ${environment.hosts.osFile}:")
10+
logger.lifecycle("Hosts entries to be appended to ${environment.hosts.osFile.get()}:")
1111
logger.quiet(environment.hosts.appendix)
1212
}
1313

0 commit comments

Comments
 (0)