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 22plugins {
33 id ' com.github.sherter.google-java-format' version ' 0.8'
44 id ' maven-publish'
5+ id ' org.ajoberstar.grgit' version ' 4.1.0'
56}
67println (" Notice: current gradle version is " + gradle. gradleVersion)
78// Additional attribute definition
@@ -272,9 +273,8 @@ jar {
272273
273274 manifest {
274275 try {
275- def repo = grgit. open()
276+ def repo = grgit. open(currentDir : project . rootDir )
276277 if (repo != null ) {
277- def user = System . getProperty(" user.name" )
278278 def date = new Date (). format(" yyyy-MM-dd'T'HH:mm:ssZ" )
279279 def branch = repo. branch. getCurrent(). getName()
280280 def commit = repo. head(). getAbbreviatedId(40 )
@@ -292,7 +292,7 @@ jar {
292292 logger. info(" => commit: {}" , commit)
293293 }
294294 } 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 )
296296 }
297297 } from sourceSets. main. output
298298
You can’t perform that action at this time.
0 commit comments