You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I did consider defaults for some of these properties initially. Ultimately, I decided being explicit it better for the following reasons.
You only need to create the snapshot.properties file once. And probably won't ever need to change it again. In most cases it's just a copy paste from the docs.
output-dir: Being explicit about the JVM language makes it clear to Kotlin and Gradle developers that it needs to be changed. If it had a default - it would be confusing for these users as to why it was outputting files into a src/test/java directory. They may quickly abandon it thinking these JVM languages are not supported.
ci-env-var: Although common on cloud CI environments - being explicit here makes the user aware of exactly what environment variable is being used. Perhaps it's not defined on their in house CI system. This makes it clear what is being used - no magic or reading though source code.
snapshot-dir: Being explicit makes it clear that this can be changed if the user doesn't like this particular folder name or coding conventions won't allow it.
At the end of the day - copying 3 lines of code is the same effort as copying 10 lines. I believe the benefits of being explicit outweigh any cons.
Activity
jackmatt2 commentedon Dec 16, 2022
I did consider defaults for some of these properties initially. Ultimately, I decided being explicit it better for the following reasons.
snapshot.propertiesfile once. And probably won't ever need to change it again. In most cases it's just a copy paste from the docs.output-dir: Being explicit about the JVM language makes it clear to Kotlin and Gradle developers that it needs to be changed. If it had a default - it would be confusing for these users as to why it was outputting files into asrc/test/javadirectory. They may quickly abandon it thinking these JVM languages are not supported.ci-env-var: Although common on cloud CI environments - being explicit here makes the user aware of exactly what environment variable is being used. Perhaps it's not defined on their in house CI system. This makes it clear what is being used - no magic or reading though source code.snapshot-dir: Being explicit makes it clear that this can be changed if the user doesn't like this particular folder name or coding conventions won't allow it.At the end of the day - copying 3 lines of code is the same effort as copying 10 lines. I believe the benefits of being explicit outweigh any cons.