-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support
gradle.properties
version file (#5)
The `gradle.properties` file allows for a default version while still allowing for the version to be overridden on the command line. This is a perfect scenario for new-release-version For example: Set the property only in the `gradle.properties` file (i.e. remove it from build.gradle). Also make sure the options come before the command (as mentioned above). gradle.properties contents: ``` version=1.0.12 ``` Version can then be overridden on the command line with: ``` gradle -Pversion=1.0.13 publish ``` Based on the StackOverflow answer https://stackoverflow.com/a/40239092/620196
- Loading branch information
1 parent
9e01a94
commit 21250ef
Showing
4 changed files
with
53 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* This file was generated by the Gradle 'init' task. | ||
* | ||
* This generated file contains a sample Java Library project to get you started. | ||
* For more details take a look at the Java Libraries chapter in the Gradle | ||
* User Manual available at https://docs.gradle.org/6.1.1/userguide/java_library_plugin.html | ||
*/ | ||
|
||
plugins { | ||
// Apply the java-library plugin to add support for Java Library | ||
id 'java-library' | ||
} | ||
|
||
repositories { | ||
// Use jcenter for resolving dependencies. | ||
// You can declare any Maven/Ivy/file repository here. | ||
jcenter() | ||
} | ||
|
||
dependencies { | ||
// This dependency is exported to consumers, that is to say found on their compile classpath. | ||
api 'org.apache.commons:commons-math3:3.6.1' | ||
|
||
// This dependency is used internally, and not exposed to consumers on their own compile classpath. | ||
implementation 'com.google.guava:guava:28.1-jre' | ||
|
||
// Use JUnit test framework | ||
testImplementation 'junit:junit:4.12' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
version=1.3.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters