Open joshsh opened 6 years ago
Note: this has also become a minor problem for templated, automated builds, where we have a fresh checkout on every execution, and expect to be able to simply ./gradlew clean release
. Instead, the build job has to be customized to use -PetaSendMetrics=false
(as the build does not succeed otherwise, and because the sending of metrics may be seen as a security concern).
@joshsh For your first post, maybe you can specify in your docs that users installing Eta for the first time should run using that extra flag?
For your second post: You can customize your build.gradle
so that is checks the environment variables to detect whether it's running in CI, and if so, default to etaSendMetrics = false
. Note that the etaSendMetrics = false
is a valid command in the build.gradle
file as well. The -P
flag is just another way to do it without hardcoding it into the file.
I solved this problem by adding ext.etaSendMetrics = 'false'
to my build.gradle
file.
The plugin expects a String value. I got an error without the quotation marks.
@joshsh I gave this some thought and realized the main problem here is that this is treated as a build failure w/ an exception which gives a confusing message. Would it help instead if it just printed the message without so much noise?
@arminha I've filed #41 to account for your observation about string vs boolean.
I have created a gradle-eta build for my Haskell-based project so users don't have to install the Haskell Tool Stack; ideally, they just type
./gradlew run
and a JVM build commences. However, new users are running into the following build failure:I realize that users just need to run
./gradlew run -PetaSendMetrics=true
or./gradlew run -PetaSendMetrics=false
once to get around the issue, but this is not immediately obvious. The best I can do is hard-code-PetaSendMetrics=false
into a script.Is it possible to default to not sending metrics, but include an info message that invites users to use
-PetaSendMetrics=true
on a subsequent run?