Я получаю сообщение об ошибке, считывающее свойство с точечной нотой от gradle.properties
. Почему?
Если я использую version
вместо build.version
, все в порядке.
Спасибо заранее.
FAIL CASE
gradle.properties
build.version=2.0.1
build.gradle
apply plugin: 'java'
task testProperties << {
println "***************** TEST **********************"
println build.version
println "*********************************************"
}
ОФОРМЛЕНИЕ
... $ gradle devTest
:devTest
***************** TEST **********************
:devTest FAILED
FAILURE: Build failed with an exception.
* Where:
Build file '..../build.gradle' line: 50
* What went wrong:
Execution failed for task ':devTest'.
> Could not find property 'version' on task ':build'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or<br> --debug option to get more log output.
BUILD FAILED
CASE
gradle.properties
version=2.0.1
build.gradle
apply plugin: 'java'
task testProperties << {
println "***************** TEST **********************"
println version
println "*********************************************"
}
ОФОРМЛЕНИЕ
... $ gradle devTest
:devTest
***************** TEST **********************
2.0.1
*********************************************
BUILD SUCCESSFUL