Skip to content

Commit 141220e

Browse files
authored
Merge pull request #674 from jonbullock/master
Resolve merge conflict for #672
2 parents 1985eda + e0f16f4 commit 141220e

File tree

6 files changed

+19
-32
lines changed

6 files changed

+19
-32
lines changed

build.gradle

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ plugins {
66
id "org.sonarqube" version "3.1.1" apply false
77
id 'com.github.ben-manes.versions' version '0.38.0'
88
id "nebula.optional-base" version "5.0.3" apply false
9+
id 'org.ajoberstar.grgit' version "$grgitVersion"
910
id "io.github.gradle-nexus.publish-plugin" version "1.0.0"
1011
id "com.github.breadmoirai.github-release" version "2.2.12"
1112
}
@@ -57,6 +58,10 @@ allprojects {
5758
toolVersion = jacocoVersion
5859
}
5960

61+
tasks.withType(AbstractArchiveTask) {
62+
preserveFileTimestamps = false
63+
reproducibleFileOrder = true
64+
}
6065
}
6166

6267
/**
@@ -91,6 +96,10 @@ subprojects {
9196
events "passed", "skipped", "failed"
9297
exceptionFormat "full"
9398
}
99+
100+
jacoco {
101+
excludes = ["**/*OrientSqlTokenManager*"]
102+
}
94103
}
95104

96105
dependencies {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ mockitoVersion = 3.8.0
3737

3838
# build dependencies
3939
jacocoVersion = 0.8.6
40-
grgitVersion = 1.6.0
40+
grgitVersion = 4.1.0
4141

4242
org.gradle.caching=true
4343
org.gradle.parallel=true

gradle/application.gradle

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,8 @@
1-
import org.ajoberstar.grgit.Grgit
2-
3-
import java.text.SimpleDateFormat
4-
5-
buildscript {
6-
repositories {
7-
jcenter()
8-
}
9-
dependencies {
10-
classpath "org.ajoberstar:grgit:$grgitVersion"
11-
}
12-
}
13-
141
apply plugin: 'application'
152

163
mainClassName = "org.jbake.launcher.Main"
174
applicationName = "jbake"
185

19-
206
def examplesBase = "$project.buildDir/examples"
217

228
def exampleRepositories = [
@@ -27,16 +13,6 @@ def exampleRepositories = [
2713
"example_project_jade" : "git://github.com/jbake-org/jbake-example-project-jade.git"
2814
]
2915

30-
processResources {
31-
from("src/main/resources"){
32-
include 'default.properties'
33-
expand jbakeVersion: project.version,
34-
timestamp: new SimpleDateFormat("yyyy-MM-dd HH:mm:ssa").format( new Date() )
35-
}
36-
}
37-
38-
39-
4016
//create clone and Zip Task for each repository
4117
exampleRepositories.each { name, repository ->
4218

@@ -49,7 +25,7 @@ exampleRepositories.each { name, repository ->
4925
outputs.dir repositoryName
5026

5127
doLast {
52-
Grgit.clone(dir: repositoryName, uri: repository)
28+
grgit.clone(dir: repositoryName, uri: repository)
5329
}
5430
}
5531

gradle/maven-publishing.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import java.text.SimpleDateFormat
1+
import java.time.format.DateTimeFormatter
22

33
apply plugin: 'maven-publish'
44

5-
Date buildTimeAndDate = new Date()
5+
def buildTimeAndDate = grgit.head().dateTime
66
ext {
7-
buildDate = new SimpleDateFormat('yyyy-MM-dd').format(buildTimeAndDate)
8-
buildTime = new SimpleDateFormat('HH:mm:ss.SSSZ').format(buildTimeAndDate)
7+
buildDate = buildTimeAndDate.format(DateTimeFormatter.ofPattern('yyyy-MM-dd'))
8+
buildTime = buildTimeAndDate.format(DateTimeFormatter.ofPattern('HH:mm:ss.SSSZ'))
99
isReleaseVersion = !version.endsWith("SNAPSHOT")
1010
}
1111

jbake-core/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import java.text.SimpleDateFormat
2+
import java.time.format.DateTimeFormatter
23

34
apply from: "$rootDir/gradle/sonarqube.gradle"
45
apply plugin: 'java-library'
@@ -36,7 +37,6 @@ processResources {
3637
from("src/main/resources") {
3738
include 'default.properties'
3839
expand jbakeVersion: project.version,
39-
timestamp: new SimpleDateFormat("yyyy-MM-dd HH:mm:ssa").format(new Date())
40+
timestamp: grgit.head().dateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss'['VV']'"))
4041
}
4142
}
42-

jbake-dist/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,5 @@ smokeTest {
5050
}
5151

5252
check.dependsOn smokeTest
53+
54+
jar.enabled=false

0 commit comments

Comments
 (0)