31 lines
941 B
Kotlin
31 lines
941 B
Kotlin
import org.gradle.kotlin.dsl.kotlin
|
|
|
|
plugins {
|
|
id("ltd.lulz.plugin.core-plugin")
|
|
kotlin("jvm")
|
|
}
|
|
|
|
tasks.register("projectInfo") {
|
|
group = "lulz"
|
|
description = "Prints project information"
|
|
|
|
val groupValue = project.group.toString()
|
|
val nameValue = project.name
|
|
val versionValue = project.version.toString()
|
|
val descriptionValue = project.description ?: "N/A"
|
|
|
|
doLast {
|
|
println()
|
|
println("UTC Time: ${info.utcTimestamp}")
|
|
println()
|
|
println("Project group: $groupValue")
|
|
println("Project name: $nameValue\"")
|
|
println("Project version: $versionValue")
|
|
println("Project description: $descriptionValue")
|
|
println()
|
|
println("Gradle version: ${GradleVersion.current().version}")
|
|
println("Java JVM version: ${JavaVersion.current()}")
|
|
println("Java toolchain version: ${java.toolchain.languageVersion.orNull ?: "N/A"}")
|
|
}
|
|
}
|