File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
src/main/java/me/qoomon/gradle/gitversioning Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ plugins {
11
11
}
12
12
13
13
group ' me.qoomon'
14
- version ' 1.2.2 '
14
+ version ' 1.2.3 '
15
15
16
16
sourceCompatibility = JavaVersion . VERSION_1_8
17
17
targetCompatibility = JavaVersion . VERSION_1_8
Original file line number Diff line number Diff line change @@ -26,14 +26,15 @@ public void apply(@Nonnull Project rootProject) {
26
26
rootProject .afterEvaluate (evaluatedProject -> {
27
27
28
28
GitRepoSituation repoSituation = GitUtil .situation (rootProject .getProjectDir ());
29
- String providedBranch = getOption (rootProject , "git.branch" );
30
- if (providedBranch != null ) {
31
- repoSituation .setHeadBranch (providedBranch .isEmpty () ? null : providedBranch );
32
- }
33
29
String providedTag = getOption (rootProject , "git.tag" );
34
30
if (providedTag != null ) {
31
+ repoSituation .setHeadBranch (null );
35
32
repoSituation .setHeadTags (providedTag .isEmpty () ? emptyList () : singletonList (providedTag ));
36
33
}
34
+ String providedBranch = getOption (rootProject , "git.branch" );
35
+ if (providedBranch != null ) {
36
+ repoSituation .setHeadBranch (providedBranch .isEmpty () ? null : providedBranch );
37
+ }
37
38
38
39
GitVersionDetails gitVersionDetails = GitVersioning .determineVersion (repoSituation ,
39
40
ofNullable (config .commit )
You can’t perform that action at this time.
0 commit comments