Slackbot
12/21/2023, 11:45 AMVampire
12/21/2023, 2:10 PMChris Lee
12/21/2023, 2:19 PMVampire
12/21/2023, 2:34 PMAli Al-Baity
12/21/2023, 2:49 PMVampire
12/21/2023, 2:52 PMAli Al-Baity
12/21/2023, 3:03 PMAli Al-Baity
12/21/2023, 5:04 PMdoFirst {} but was getting a NullPointerExceptionChris Lee
12/21/2023, 5:05 PMdoFirst, doLast, or @Action on custom tasks - you can simply do System.getProperty("whatever")Vampire
12/21/2023, 5:05 PMVampire
12/21/2023, 5:08 PMVampire
12/21/2023, 5:08 PMVampire
12/21/2023, 5:09 PMVampire
12/21/2023, 5:09 PMproject at execution timeVampire
12/21/2023, 5:09 PMVampire
12/21/2023, 5:09 PMSystem.getPropertyChris Lee
12/21/2023, 5:09 PMproviders.systemProperty is equivalent, in a doFirst, to project.providers.systemProperty - as Vampire noted, you can’t use project at execution time.Vampire
12/21/2023, 5:10 PMAli Al-Baity
12/21/2023, 5:11 PMChris Lee
12/21/2023, 5:11 PMAli Al-Baity
12/21/2023, 5:13 PMSystem.getProperty but the cache is still not re-used, it's re-calculatedAli Al-Baity
12/21/2023, 5:14 PMtasks.register<Task>("someTask") {
doFirst {
System.getProperty("someProperty")
}
}Chris Lee
12/21/2023, 5:14 PMAli Al-Baity
12/21/2023, 5:15 PMChris Lee
12/21/2023, 5:16 PMAli Al-Baity
12/21/2023, 5:17 PM17:15:32: Executing ':server:someTask --configuration-cache -DsomeProperty=someVale --stacktrace'...
Calculating task graph as configuration cache cannot be reused because system property 'someProperty' has changed.
Kotlin DSL property assignment is an incubating feature.
Finished applying the Genesis Settings plugin
> Configure project :server
Applying product details creator plugin to reporting-distribution
> Task :server:someTask
BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed
Configuration cache entry stored.Vampire
12/21/2023, 5:19 PMgetProperty line completely and then try againVampire
12/21/2023, 5:19 PMVampire
12/21/2023, 5:20 PMChris Lee
12/21/2023, 5:21 PMBuild configuration inputs include:
• System properties used during the configuration phase
Ali Al-Baity
12/21/2023, 5:21 PMAli Al-Baity
12/21/2023, 5:22 PMVampire
12/21/2023, 5:22 PMCopy codeKotlin DSL property assignment is an incubating feature.
Vampire
12/21/2023, 5:23 PMVampire
12/21/2023, 5:23 PMAli Al-Baity
12/21/2023, 5:24 PM