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/17 14:02:09 UTC
[58/62] [abbrv] groovy git commit: Replace filter with regular
expression rename
Replace filter with regular expression rename
Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/386389d2
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/386389d2
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/386389d2
Branch: refs/heads/GROOVY_2_6_X
Commit: 386389d25c13bd4104a05dacc4ad981019200c35
Parents: e3dfcfd
Author: Cedric Champeau <cc...@apache.org>
Authored: Fri Dec 15 08:33:39 2017 +0100
Committer: Cedric Champeau <cc...@apache.org>
Committed: Sun Dec 17 14:53:15 2017 +0100
----------------------------------------------------------------------
.../codehaus/groovy/gradle/CacheableJar.groovy | 29 ++++++++++++++++++++
gradle/assemble.gradle | 8 +++---
2 files changed, 33 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/groovy/blob/386389d2/buildSrc/src/main/groovy/org/codehaus/groovy/gradle/CacheableJar.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/codehaus/groovy/gradle/CacheableJar.groovy b/buildSrc/src/main/groovy/org/codehaus/groovy/gradle/CacheableJar.groovy
new file mode 100644
index 0000000..fa4b5f2
--- /dev/null
+++ b/buildSrc/src/main/groovy/org/codehaus/groovy/gradle/CacheableJar.groovy
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.codehaus.groovy.gradle
+
+import groovy.transform.CompileStatic
+import org.gradle.api.tasks.CacheableTask
+import org.gradle.api.tasks.bundling.Jar
+
+@CompileStatic
+@CacheableTask
+class CacheableJar extends Jar {
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/groovy/blob/386389d2/gradle/assemble.gradle
----------------------------------------------------------------------
diff --git a/gradle/assemble.gradle b/gradle/assemble.gradle
index d51a8d1..e56fd2b 100644
--- a/gradle/assemble.gradle
+++ b/gradle/assemble.gradle
@@ -167,7 +167,7 @@ allprojects {
}
from("$projectDir/notices/NOTICE-JARJAR")
from(generateReleaseInfo)
- rename { String filename -> filename == 'LICENSE-JARJAR' ? 'LICENSE' : filename == 'NOTICE-JARJAR' ? 'NOTICE' : filename }
+ rename '([A-Z]+)-(.*)', '$1'
}
arch.exclude '**/package-info.class'
@@ -314,7 +314,7 @@ subprojects { sp ->
} else {
from "${rootProject.projectDir}/notices/NOTICE-BASE"
}
- rename { String filename -> filename == 'LICENSE-BASE' ? 'LICENSE' : filename == 'NOTICE-BASE' ? 'NOTICE' : filename }
+ rename '([A-Z]+)-(.*)', '$1'
}
exclude '**/package-info.class'
}
@@ -356,7 +356,7 @@ ext.distSpec = copySpec {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from("$projectDir/licenses/LICENSE-BINZIP")
from("$projectDir/notices/NOTICE-BINZIP")
- rename { String filename -> filename == 'LICENSE-BINZIP' ? 'LICENSE' : filename == 'NOTICE-BINZIP' ? 'NOTICE' : filename }
+ rename '([A-Z]+)-(.*)', '$1'
exclude { it.file.name =~ /-raw/ }
into('lib') {
from jarjar
@@ -498,7 +498,7 @@ task dist(type: Zip, dependsOn: [checkCompatibility, distBin, distSrc, distDoc,
into "groovy-$version"
from("$projectDir/licenses/LICENSE-SDK")
from("$projectDir/notices/NOTICE-SDK")
- rename { String filename -> filename == 'LICENSE-SDK' ? 'LICENSE' : filename == 'NOTICE-SDK' ? 'NOTICE' : filename }
+ rename '([A-Z]+)-(.*)', '$1'
with distSpec
into('doc') {
with docSpec