You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by cc...@apache.org on 2017/12/12 20:56:38 UTC
[17/19] groovy git commit: Fix backport of build from `master`
Fix backport of build from `master`
Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/56a8e3d8
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/56a8e3d8
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/56a8e3d8
Branch: refs/heads/GROOVY_2_6_X
Commit: 56a8e3d814013be83a9881ed8ea5aad9f44305cd
Parents: 4281d61
Author: Cedric Champeau <cc...@apache.org>
Authored: Tue Dec 12 08:13:52 2017 +0100
Committer: Cedric Champeau <cc...@apache.org>
Committed: Tue Dec 12 21:55:47 2017 +0100
----------------------------------------------------------------------
build.gradle | 29 ++++++++++++-----------------
gradle/test.gradle | 2 +-
2 files changed, 13 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/groovy/blob/56a8e3d8/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 41dd00b..1b3628e 100644
--- a/build.gradle
+++ b/build.gradle
@@ -51,14 +51,16 @@ buildscript {
plugins {
id 'com.gradle.build-scan' version '1.10.2'
- id 'me.champeau.buildscan-recipes' version '0.1.7'
+ id 'me.champeau.buildscan-recipes' version '0.2.0'
}
buildScan {
licenseAgreementUrl = 'https://gradle.com/terms-of-service'
licenseAgree = 'yes'
publishAlways()
+}
+buildScanRecipes {
recipe 'git-commit', baseUrl: 'https://github.com/apache/groovy/tree'
recipe 'teamcity', baseUrl: 'https://ci.groovy-lang.org', guest: 'true'
recipes 'git-status', 'gc-stats', 'teamcity', 'travis-ci'
@@ -87,7 +89,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' }
}
@@ -343,14 +345,14 @@ processResources.doLast {
include 'groovy/inspect/swingui/AstBrowserProperties.groovy',
'org/codehaus/groovy/tools/groovydoc/gstringTemplates/GroovyDocTemplateInfo.java'
}
- into sourceSets.main.output.classesDir
+ into sourceSets.main.java.outputDir
}
}
compileJava {
doLast {
ant.java(classname:'org.jboss.bridger.Bridger', classpath: rootProject.configurations.tools.asPath, outputproperty: 'stdout') {
- arg(value: "${sourceSets.main.output.classesDir.canonicalPath}/org/codehaus/groovy/runtime/DefaultGroovyMethods.class")
+ arg(value: "${sourceSets.main.java.outputDir.canonicalPath}/org/codehaus/groovy/runtime/DefaultGroovyMethods.class")
}
ant.echo('Bridger: ' + ant.properties.stdout)
}
@@ -442,8 +444,8 @@ allprojects {
task compileGroovyWithIndy(type: GroovyCompile) {
source = sourceSets.main.groovy
classpath = compileGroovy.classpath
- sourceCompatibility = 1.8
- targetCompatibility = 1.8
+ sourceCompatibility = 1.7
+ targetCompatibility = 1.7
groovyOptions.optimizationOptions['indy'] = true
destinationDir = file("$buildDir/classes/indy")
}
@@ -457,7 +459,8 @@ allprojects {
rootProject.bootstrapJar.archivePath
)
- classpath = classpath + groovyClasspath
+ // TODO: this null check was required after adding JMH plugin to performance project
+ classpath = (classpath != null) ? classpath + groovyClasspath : groovyClasspath
}
}
@@ -467,11 +470,11 @@ compileTestGroovy {
task checkCompatibility {
doLast {
- assert JavaVersion.current().isJava8Compatible()
+ assert JavaVersion.current().java8Compatible
}
}
-if (!JavaVersion.current().isJava8Compatible()) {
+if (!JavaVersion.current().java8Compatible) {
logger.lifecycle '''
**************************************** WARNING ********************************************
****** You are running the build with an older JDK. NEVER try to release with 1.7. ******
@@ -504,14 +507,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')
http://git-wip-us.apache.org/repos/asf/groovy/blob/56a8e3d8/gradle/test.gradle
----------------------------------------------------------------------
diff --git a/gradle/test.gradle b/gradle/test.gradle
index 9bb27c7..df0ff06 100644
--- a/gradle/test.gradle
+++ b/gradle/test.gradle
@@ -134,7 +134,7 @@ ext.extModuleOutputDir = file("$buildDir/testFixtures/extmodule")
ext.extModuleRepoDir = file("$extModuleOutputDir/repo")
task compileTestExtensionModule(type: JavaCompile) {
- classpath = files(jar.archivePath)
+ classpath = files(jar)
source fileTree("$extModuleFixtureDir/src/main/java")
destinationDir = file("$extModuleOutputDir/classes")
sourceCompatibility = 1.6