Added 'now' as a value, to reduce import dependencies in a gradle build file

master Version_3.17
Robinson 2023-06-07 12:11:16 +02:00
parent 4ecd6cc45d
commit 8ae1522ed7
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C
2 changed files with 7 additions and 1 deletions

View File

@ -34,7 +34,7 @@ object Extras {
// set for the project
const val description = "Gradle Plugin to manage various Gradle tasks, such as updating gradle and dependencies"
const val group = "com.dorkbox"
const val version = "3.16"
const val version = "3.17"
// set as project.ext
const val name = "Gradle Utils"

View File

@ -34,6 +34,7 @@ import org.gradle.plugins.ide.idea.model.IdeaLanguageLevel
import org.gradle.util.GradleVersion
import java.io.File
import java.security.MessageDigest
import java.time.Instant
import java.util.*
import kotlin.reflect.KMutableProperty
import kotlin.reflect.KProperty
@ -105,6 +106,11 @@ open class StaticMethodsAndTools(private val project: Project) {
// this is lazy, because it MUST be initialized from a task!
val hasKotlin: Boolean by lazy { hasKotlin(project, debug) }
/**
* Get the time now as a string. This is to reduce the import requirements in a gradle build file
*/
fun now() = Instant.now().toString()
/**
* Shows info if kotlin is enabled, shows exact information as to what the source-set directories are for java and kotlin
*/