groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cchamp...@apache.org
Subject [1/3] groovy git commit: Remove dynamic check for "build in China"
Date Sun, 12 Nov 2017 12:05:21 GMT
Repository: groovy
Updated Branches:
  refs/heads/master 1c42f421e -> 7bda79a5f


Remove dynamic check for "build in China"

This commit removes the dynamic check to see if the build is done from China. We shouldn't
introduce
adhoc tests for this. It has been replaced with a property that can be set in the `gradle.properties`
local file for users affected by the problem.

The check introduced a *1 minute* slow down for each build, which is unacceptable.


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/3d780dca
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/3d780dca
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/3d780dca

Branch: refs/heads/master
Commit: 3d780dcaf5e2f376a95877edcdb57a387d250e97
Parents: 1c42f42
Author: Cedric Champeau <cchampeau@apache.org>
Authored: Sun Nov 12 12:17:09 2017 +0100
Committer: Cedric Champeau <cchampeau@apache.org>
Committed: Sun Nov 12 12:24:33 2017 +0100

----------------------------------------------------------------------
 build.gradle | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/3d780dca/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 92b4173..8ee9b2b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -90,7 +90,7 @@ allprojects {
     group = 'org.codehaus.groovy'
     version = groovyVersion
     repositories {
-        if (isBuildInChina()) {
+        if (rootProject.hasProperty('buildInChina')) {
             // Try to use Aliyun maven repository when building in China
             maven { url 'http://maven.aliyun.com/nexus/content/groups/public' }
         }
@@ -519,14 +519,6 @@ licenseReport {
     ]
 }
 
-def isBuildInChina() {
-    try {
-        return !InetAddress.getByName('www.twitter.com').isReachable(3000)
-    } catch(e) {
-        return true
-    }
-}
-
 // UNCOMMENT THE FOLLOWING TASKS IF YOU WANT TO RUN LICENSE CHECKING
 //task licenseFormatCustom(type:nl.javadude.gradle.plugins.license.License) {
 //    source = fileTree(dir:"src").include ("**/*.java",'**/*.groovy','**/*.html','**/*.css','**/*.xml','**/*.properties','**/*.properties')


Mime
View raw message