Skip to content

Commit

Permalink
Merge pull request #674 from jonbullock/master
Browse files Browse the repository at this point in the history
Resolve merge conflict for #672
  • Loading branch information
jonbullock authored Apr 13, 2021
2 parents 1985eda + e0f16f4 commit 141220e
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 32 deletions.
9 changes: 9 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ plugins {
id "org.sonarqube" version "3.1.1" apply false
id 'com.github.ben-manes.versions' version '0.38.0'
id "nebula.optional-base" version "5.0.3" apply false
id 'org.ajoberstar.grgit' version "$grgitVersion"
id "io.github.gradle-nexus.publish-plugin" version "1.0.0"
id "com.github.breadmoirai.github-release" version "2.2.12"
}
Expand Down Expand Up @@ -57,6 +58,10 @@ allprojects {
toolVersion = jacocoVersion
}

tasks.withType(AbstractArchiveTask) {
preserveFileTimestamps = false
reproducibleFileOrder = true
}
}

/**
Expand Down Expand Up @@ -91,6 +96,10 @@ subprojects {
events "passed", "skipped", "failed"
exceptionFormat "full"
}

jacoco {
excludes = ["**/*OrientSqlTokenManager*"]
}
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ mockitoVersion = 3.8.0

# build dependencies
jacocoVersion = 0.8.6
grgitVersion = 1.6.0
grgitVersion = 4.1.0

org.gradle.caching=true
org.gradle.parallel=true
26 changes: 1 addition & 25 deletions gradle/application.gradle
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
import org.ajoberstar.grgit.Grgit

import java.text.SimpleDateFormat

buildscript {
repositories {
jcenter()
}
dependencies {
classpath "org.ajoberstar:grgit:$grgitVersion"
}
}

apply plugin: 'application'

mainClassName = "org.jbake.launcher.Main"
applicationName = "jbake"


def examplesBase = "$project.buildDir/examples"

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

processResources {
from("src/main/resources"){
include 'default.properties'
expand jbakeVersion: project.version,
timestamp: new SimpleDateFormat("yyyy-MM-dd HH:mm:ssa").format( new Date() )
}
}



//create clone and Zip Task for each repository
exampleRepositories.each { name, repository ->

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

doLast {
Grgit.clone(dir: repositoryName, uri: repository)
grgit.clone(dir: repositoryName, uri: repository)
}
}

Expand Down
8 changes: 4 additions & 4 deletions gradle/maven-publishing.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import java.text.SimpleDateFormat
import java.time.format.DateTimeFormatter

apply plugin: 'maven-publish'

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

Expand Down
4 changes: 2 additions & 2 deletions jbake-core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import java.text.SimpleDateFormat
import java.time.format.DateTimeFormatter

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

2 changes: 2 additions & 0 deletions jbake-dist/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,5 @@ smokeTest {
}

check.dependsOn smokeTest

jar.enabled=false

0 comments on commit 141220e

Please sign in to comment.