-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from mainmethod0126/16-we-need-to-develop-a-fe…
…ature-that-allows-optional-selection-for-whether-the-directory-should-be-created-based-on-the-build-date-or-not 16 we need to develop a feature that allows optional selection for whether the directory should be created based on the build date or not
- Loading branch information
Showing
8 changed files
with
219 additions
and
51 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 |
---|---|---|
@@ -1,5 +1,21 @@ | ||
{ | ||
"java.configuration.updateBuildConfiguration": "automatic", | ||
"java.compile.nullAnalysis.mode": "automatic", | ||
"java.dependency.syncWithFolderExplorer": true | ||
} | ||
"java.configuration.updateBuildConfiguration": "automatic", | ||
"java.compile.nullAnalysis.mode": "automatic", | ||
"java.dependency.syncWithFolderExplorer": true, | ||
"java.jdt.ls.java.home": "C:\\Program Files\\Zulu\\zulu-11", | ||
"java.configuration.runtimes": [ | ||
{ | ||
"name": "JavaSE-1.8", | ||
"path": "C:\\Program Files\\Zulu\\zulu-8" | ||
}, | ||
{ | ||
"name": "JavaSE-11", | ||
"path": "C:\\Program Files\\Zulu\\zulu-11", | ||
"default": true | ||
}, | ||
{ | ||
"name": "JavaSE-17", | ||
"path": "C:\\Program Files\\Zulu\\zulu-17" | ||
} | ||
] | ||
} |
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
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
64 changes: 64 additions & 0 deletions
64
...inmethod0126/gradle/simple/versioning/extension/SimpleSemanticVersionPluginExtension.java
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,64 @@ | ||
package io.github.mainmethod0126.gradle.simple.versioning.extension; | ||
|
||
import org.gradle.api.Project; | ||
|
||
import io.github.mainmethod0126.gradle.simple.versioning.utils.DateUtils; | ||
|
||
/** | ||
* | ||
* I wanted to create it as a singleton object, but it seemed like we would | ||
* always have to pass the 'project' object as an argument when calling | ||
* {@code getInstance()} from outside. Therefore, I created the object to be | ||
* conveniently used after calling the initial {@code initExtension()} function. | ||
* | ||
* warn! : This class was not designed with consideration for multi-threading | ||
* and is not thread-safe. Please be cautious when using it in a multi-threaded | ||
* environment. | ||
*/ | ||
public class SimpleSemanticVersionPluginExtension { | ||
|
||
/** | ||
* This is not a singleton object, but rather a global variable used for the | ||
* convenience of users. | ||
*/ | ||
private static SimpleSemanticVersionPluginExtension extension; | ||
|
||
public static void init(Project project) { | ||
if (extension == null) { | ||
extension = project.getExtensions().create("ssv", | ||
SimpleSemanticVersionPluginExtension.class); | ||
} | ||
} | ||
|
||
public static SimpleSemanticVersionPluginExtension getExtension() { | ||
return extension; | ||
} | ||
|
||
private String buildDate = DateUtils.getCurrentDate(DateUtils.DateUnit.DAY); | ||
private boolean isDateInBuildArtifactDirPath = false; | ||
private String applicationVersion = "0.0.0"; | ||
|
||
public boolean isDateInBuildArtifactDirPath() { | ||
return isDateInBuildArtifactDirPath; | ||
} | ||
|
||
public void setDateInBuildPath(boolean isDateInBuildArtifactDirPath) { | ||
this.isDateInBuildArtifactDirPath = isDateInBuildArtifactDirPath; | ||
} | ||
|
||
public String getBuildDate() { | ||
return buildDate; | ||
} | ||
|
||
public void setBuildDate(String buildDate) { | ||
this.buildDate = buildDate; | ||
} | ||
|
||
public String getApplicationVersion() { | ||
return applicationVersion; | ||
} | ||
|
||
public void setApplicationVersion(String applicationVersion) { | ||
this.applicationVersion = applicationVersion; | ||
} | ||
} |
Oops, something went wrong.