Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into fixentrypreviewco…
Browse files Browse the repository at this point in the history
…mments

* upstream/master:
  Update gradle from 4.7 to 4.8 (#4102)
  Add gradle task downloadDependencies and use it at CircleCI (#4091)
  • Loading branch information
Siedlerchr committed Jun 5, 2018
2 parents 0e57b3b + 2b75110 commit d50bf47
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
16 changes: 16 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -487,3 +487,19 @@ jmh {
iterations = 10
fork = 2
}

// Source: https://stackoverflow.com/a/44168582/873282
task downloadDependencies {
description "Pre-downloads *most* dependencies"
doLast {
configurations.getAsMap().each { name, config ->
println "Retrieving dependencies for $name"
try {
config.files
} catch (e) {
// some cannot be resolved, just log them
project.logger.info e.message
}
}
}
}
18 changes: 7 additions & 11 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,14 @@ dependencies:
- install4j7/bin/install4jc --verbose --license=$INSTALL4J_KEY
#--win-keystore-password $CERTIFICATE_PW --mac-keystore-password $CERTIFICATE_PW
override:
# We do this to decrease build time by using CircleCI's cache. See https://discuss.circleci.com/t/effective-caching-for-gradle/540 for a longer motivation.
- ./gradlew compileJava
- ./gradlew downloadDependencies
cache_directories:
- "~/.install4j7"
- "~/downloads"

test:
override:
- ./gradlew -Pdev=true -Pinstall4jDir="install4j7" release --stacktrace
post:
# save test reports as build artifacts
- mkdir -p $CIRCLE_TEST_REPORTS/junit/
- find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;
- "true"

deployment:
release:
Expand All @@ -34,18 +29,19 @@ deployment:
commands:
# we have to do a clean build as changing gradle's "project.version" does not lead to a rebuild of resources (mirroring project.version)
- ./gradlew -Pinstall4jDir="install4j7" clean release --stacktrace
# upload at all circumstances
- scripts/upload-to-builds.jabref.org.sh
# if upload fails, it is accepted; CircleCI provides deep links to the binaries as fallback.
- timeout 580 scripts/upload-to-builds.jabref.org.sh || exit 0
# generate dependency information. This is not published on our buid server, but can be collected as logged in user at CircleCI
- ./gradlew dependencyUpdates -Drevision=release -DoutputFormatter=json -DoutputDir=build/releases
development:
# match all branches; this is executed, if "release" is not matched - see https://circleci.com/docs/configuration/
branch: /.*/
commands:
# generate binaries
- ./gradlew -Pdev=true -Pinstall4jDir="install4j7" release --stacktrace
# if upload fails, it is accepted; CircleCI provides deep links to the binaries as fallback
- timeout 580 scripts/upload-to-builds.jabref.org.sh || exit 0



general:
artifacts:
- "build/releases"
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit d50bf47

Please sign in to comment.