Skip to content
Permalink
Browse files
… into parrot
  • Loading branch information
daniellansun committed Jan 13, 2017
2 parents 68c8c5f + 465b4c0 commit 2f7e354a3d9869a5ffc3b771faf8c3caf7191a29
Show file tree
Hide file tree
Showing 59 changed files with 505 additions and 219 deletions.
2 NOTICE
@@ -1,5 +1,5 @@
Apache Groovy
Copyright 2003-2016 The Apache Software Foundation
Copyright 2003-2017 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
@@ -42,8 +42,6 @@ buildscript {
//classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.11.0'
classpath "gradle.plugin.org.nosphere.apache:creadur-rat-gradle:0.1.3"
classpath "gradle.plugin.com.github.jk1:gradle-license-report:0.3.2"

classpath files("lib/antlr4-gradle-plugin-0.1.2-SNAPSHOT.jar");
}
}

@@ -63,7 +61,7 @@ buildScan {

apply from: 'gradle/filter.gradle'
apply from: 'gradle/indy.gradle'
apply from: 'gradle/bintray.gradle'
apply from: 'gradle/publish.gradle'
apply plugin: 'javadocHotfix'
apply plugin: "com.github.jk1.dependency-license-report"

@@ -78,8 +76,8 @@ allprojects {
apply plugin: 'java'

buildDir = 'target'
sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceCompatibility = 1.7
targetCompatibility = 1.7

group = 'org.codehaus.groovy'
version = groovyVersion
@@ -172,7 +170,7 @@ ext {
xmlunitVersion = '1.6'
xstreamVersion = '1.4.9'
spockVersion = '1.0-groovy-2.4'
antlr4Version = '4.6.0.3'
isReleaseVersion = !groovyVersion.toLowerCase().endsWith("snapshot")
}

dependencies {
@@ -211,7 +209,6 @@ dependencies {
testCompile "com.thoughtworks.qdox:qdox:$qdoxVersion"

tools "com.googlecode.jarjar:jarjar:$jarjarVersion"
// tools files("lib/jarjar-${jarjarVersion}.jar")
tools "org.jboss.bridger:bridger:$bridgerVersion"

tools("net.sourceforge.cobertura:cobertura:$coberturaVersion") {
@@ -310,8 +307,6 @@ sourceSets {
}
}

apply from: 'subprojects/groovy-parser-antlr4/build.gradle'

// make sure examples can be compiled, even if we don't run them
// todo: reorganize examples so that we can run them too
check {
@@ -449,16 +444,16 @@ allprojects {
tasks.withType(GroovyCompile) {
logger.info("Building ${project.name}:${name} with InvokeDynamic support activated")
groovyOptions.optimizationOptions.indy = true
sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceCompatibility = 1.7
targetCompatibility = 1.7
}
tasks.withType(JavaCompile) {
if (project.name=='performance') {
sourceCompatibility = 1.8
targetCompatibility = 1.8
} else {
sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceCompatibility = 1.7
targetCompatibility = 1.7
}
}
jar {
@@ -471,6 +466,22 @@ compileTestGroovy {
groovyOptions.fork(memoryMaximumSize: groovycTest_mx)
}

// TODO superfluous to check for JDK7 for Gradle version 3.2+ but leave for future?
task checkCompatibility {
doLast {
assert JavaVersion.current().java7Compatible
}
}

if (!JavaVersion.current().java7Compatible) {
logger.lifecycle '''
**************************************** WARNING ********************************************
****** You are running the build with an older JDK. NEVER try to release with 1.6. ******
****** You must use a JDK 1.7+ in order to compile all features of the language. ******
*********************************************************************************************
'''
}

apply from: 'gradle/test.gradle'
apply from: 'gradle/groovydoc.gradle'
apply from: 'gradle/docs.gradle'
@@ -486,14 +497,7 @@ if (file('user.gradle').exists()) {
apply from: 'user.gradle'
}

if (!JavaVersion.current().java8Compatible) {
logger.lifecycle '''
**************************************** WARNING **********************************************
****** You are running the build with an older JDK. NEVER try to release with 1.6. ******
****** You must use a JDK 1.8+ in order to compile all features of the language. ******
***********************************************************************************************
'''
}
apply from: 'gradle/signing.gradle'

licenseReport {
excludeGroups = [
@@ -41,7 +41,7 @@ ext.srcSpec = copySpec {
'cobertura.ser',
'junitvmwatcher*.properties',
'out',
'bintray.properties', // generated by the CI server
'artifactory.properties', // generated by the CI server
'gradle.properties.gz', // generated by the CI server
'**/*.iml', // used by Intellij IDEA
'**/*.ipr', // used by Intellij IDEA
@@ -341,7 +341,7 @@ task jarAll(type: Jar, dependsOn: replaceJarWithJarJar) {
inputs.files(allprojects.jar.archivePath)

ext.metaInfDir = "$buildDir/tmp/groovy-all-metainf"
appendix = 'all'
baseName = 'groovy-all'
includeEmptyDirs = false
if (rootProject.useIndy()) {
classifier = 'indy'
@@ -448,7 +448,7 @@ task sourceAllJar(type: Jar, dependsOn: { modules()*.sourceJar + rootProject.sou
modules()*.sourceJar.each {
with it.rootSpec
}
appendix = 'all'
baseName = 'groovy-all'
classifier = rootProject.useIndy() ? 'indy-sources' : 'sources'
}

@@ -464,13 +464,13 @@ allprojects {
}

task javadocAllJar(type: Jar, dependsOn: javadocAll) {
appendix = 'all'
baseName = 'groovy-all'
classifier = rootProject.useIndy() ? 'indy-javadoc' : 'javadoc'
from javadocAll.destinationDir
}

task groovydocAllJar(type: Jar, dependsOn: groovydocAll) {
appendix = 'all'
baseName = 'groovy-all'
classifier = rootProject.useIndy() ? 'indy-groovydoc' : 'groovydoc'
from groovydocAll.destinationDir
}
@@ -532,7 +532,7 @@ ext.distSpec = copySpec {
}
into('embeddable') {
from jarAll.archivePath
from { new File(jarAll.archivePath.parent, "${jarAll.baseName}-${jarAll.appendix}-${jarAll.version}-indy.jar") }
from { new File(jarAll.destinationDir, "${jarAll.baseName}-${jarAll.version}-indy.jar") }
}
}

@@ -578,7 +578,7 @@ def installDir = {
System.properties.installDirectory ?: "$buildDir/install"
}

task installGroovy(type: Sync, dependsOn: distBin) {
task installGroovy(type: Sync, dependsOn: [checkCompatibility, distBin]) {
description 'Generates a groovy distribution into an install directory'
doLast {
logger.lifecycle "Groovy installed under ${installDir()}"
@@ -589,7 +589,7 @@ task installGroovy(type: Sync, dependsOn: distBin) {

import org.gradle.api.file.DuplicatesStrategy

task dist(type: Zip, dependsOn: [distBin, distSrc, distDoc, syncDoc]) {
task dist(type: Zip, dependsOn: [checkCompatibility, distBin, distSrc, distDoc, syncDoc]) {
description = 'Generates the binary, sources, documentation and full distributions'
baseName = 'apache-groovy'
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
@@ -43,6 +43,7 @@ backports.each { pkg, classList ->
from zipTree(jar.archivePath)
include classList
baseName = "groovy-backports-$pkg"
classifier = ''
}

// the following two jars are empty. No wonder, Maven Central *requires* a javadoc and sources classifier

This file was deleted.

@@ -21,7 +21,7 @@ task doc(dependsOn: ['javadocAll', 'groovydocAll', 'docGDK']) {
if (JavaVersion.current().java7Compatible) {
dependsOn 'asciidocAll', 'assembleAsciidoc'
}
ext.footer = 'Copyright © 2003-2016 The Apache Software Foundation. All rights reserved.'
ext.footer = 'Copyright © 2003-2017 The Apache Software Foundation. All rights reserved.'
ext.title = "Groovy ${groovyVersion}"
}

0 comments on commit 2f7e354

Please sign in to comment.