You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@freemarker.apache.org by dd...@apache.org on 2017/05/23 09:45:52 UTC
incubator-freemarker git commit: Trying make Travis working again
Repository: incubator-freemarker
Updated Branches:
refs/heads/3 8d00e4da4 -> b10d83046
Trying make Travis working again
Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/b10d8304
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/b10d8304
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/b10d8304
Branch: refs/heads/3
Commit: b10d83046be6d226c4ad5eea03b36563e5087aa0
Parents: 8d00e4d
Author: ddekany <dd...@apache.org>
Authored: Tue May 23 11:45:38 2017 +0200
Committer: ddekany <dd...@apache.org>
Committed: Tue May 23 11:45:38 2017 +0200
----------------------------------------------------------------------
.travis.yml | 5 +++++
build.gradle | 32 +++++++++++++++++++++++++++-----
2 files changed, 32 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/b10d8304/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..968f652
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,5 @@
+language: java
+jdk:
+ - oraclejdk8
+after_success:
+ - ./gradlew jacocoTestReport coveralls
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/b10d8304/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 0f56664..43f30f9 100644
--- a/build.gradle
+++ b/build.gradle
@@ -50,11 +50,33 @@ ext.bannedLibraries = [
['bootClasspathJava7', 'bootClasspathJava8'].each {
if (!project.hasProperty(it)) {
- throw new org.gradle.api.GradleScriptException("The ${it} property must be set. " +
- "This error usually occurs because you have missed this step (described in README.md): " +
- "Copy gradle.properties.sample into gradle.properties and modify it to fit your environment. " +
- "(Alternatively, you can pass the property to gradle with -P${it}=\"...\".)",
- null);
+ String allowEnvVarName = "freemarker_build_allow_no_boot_classpath"
+ def allow = System.getenv(allowEnvVarName)
+ if (allow != null && !allow.trim().isEmpty()) {
+ allow = allow.trim()
+ if (allow == "true") {
+ allow = true
+ } else if (allow == "false") {
+ allow = false
+ } else {
+ new GradleScriptException("The value of the ${allowEnvVarName} environment " +
+ "variable must be \"true\" or \"false\" but was: " + allow, null)
+ }
+ } else {
+ allow = false;
+ }
+
+ if (allow) {
+ ext[it] = null
+ logger.warn "Using null for ${it}; do NOT use this build for production!"
+ } else {
+ throw new GradleScriptException("The ${it} property must be set. " +
+ "This error usually occurs because you have missed this step (described in README.md): " +
+ "Copy gradle.properties.sample into gradle.properties and modify it to fit your environment. " +
+ "(Alternatively, you can pass the property to gradle with -P${it}=\"...\", or set the " +
+ "${allowEnvVarName} environment variable to \"true\".)",
+ null);
+ }
}
}