File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 2
2
plugins {
3
3
id ' com.github.sherter.google-java-format' version ' 0.8'
4
4
id ' maven-publish'
5
+ id ' org.ajoberstar.grgit' version ' 4.1.0'
5
6
}
6
7
println (" Notice: current gradle version is " + gradle. gradleVersion)
7
8
// Additional attribute definition
@@ -272,9 +273,8 @@ jar {
272
273
273
274
manifest {
274
275
try {
275
- def repo = grgit. open()
276
+ def repo = grgit. open(currentDir : project . rootDir )
276
277
if (repo != null ) {
277
- def user = System . getProperty(" user.name" )
278
278
def date = new Date (). format(" yyyy-MM-dd'T'HH:mm:ssZ" )
279
279
def branch = repo. branch. getCurrent(). getName()
280
280
def commit = repo. head(). getAbbreviatedId(40 )
@@ -292,7 +292,7 @@ jar {
292
292
logger. info(" => commit: {}" , commit)
293
293
}
294
294
} catch (Exception e) {
295
- // logger.warn(' .git not exist, cannot found commit info' )
295
+ logger. warn(' .git not exist, cannot found commit info, e: {} ' , e )
296
296
}
297
297
} from sourceSets. main. output
298
298
You can’t perform that action at this time.
0 commit comments