You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2021/02/15 07:04:22 UTC
[groovy] 01/02: GROOVY-9941: Make Gradle build fully
cacheable(closes #1488)
This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
commit 27b6d5fa68c015a478e3d6efeefe631a52af4390
Author: Sergio Delgado <sd...@gradle.com>
AuthorDate: Thu Feb 11 11:56:13 2021 +0100
GROOVY-9941: Make Gradle build fully cacheable(closes #1488)
---
build.gradle | 2 +-
.../groovy/org.apache.groovy-asciidoctor.gradle | 3 +-
.../groovy/org.apache.groovy-documented.gradle | 2 +-
.../groovy/gradle/DistributionExtension.groovy | 5 ++-
gradle/verification-metadata.xml | 46 ++++------------------
settings.gradle | 13 +++++-
subprojects/groovy-test/build.gradle | 2 +-
7 files changed, 27 insertions(+), 46 deletions(-)
diff --git a/build.gradle b/build.gradle
index c566c9e..55059bd 100644
--- a/build.gradle
+++ b/build.gradle
@@ -87,7 +87,7 @@ groovyLibrary {
],
['META-INF/NOTICE', 'META-INF/INDEX.LIST'],
[
- (rootProject.file('notices/NOTICE-GROOIDJARJAR').absolutePath): 'META-INF/NOTICE'
+ (project.relativePath(rootProject.file('notices/NOTICE-GROOIDJARJAR'))): 'META-INF/NOTICE'
]
)
}
diff --git a/buildSrc/src/main/groovy/org.apache.groovy-asciidoctor.gradle b/buildSrc/src/main/groovy/org.apache.groovy-asciidoctor.gradle
index bfe94c2..c817eba 100644
--- a/buildSrc/src/main/groovy/org.apache.groovy-asciidoctor.gradle
+++ b/buildSrc/src/main/groovy/org.apache.groovy-asciidoctor.gradle
@@ -56,6 +56,7 @@ asciidoctor {
from("${rootProject.projectDir}/src/spec/doc/assets") {
include 'css/style.css'
}
+ from("$buildDir/tmp/asciidoctor-assets")
into 'assets'
}
attributes 'source-highlighter': 'prettify',
@@ -110,7 +111,7 @@ asciidoctor.onlyIf { project.file('src/spec/doc').exists() }
def asciidoctorAssets = tasks.register("asciidoctorAssets", Copy) {
from project.fileTree('src/spec/doc/assets')
- into "${asciidoctor.outputDir}/assets"
+ into "$buildDir/tmp/asciidoctor-assets"
}
asciidoctor.dependsOn asciidoctorAssets
diff --git a/buildSrc/src/main/groovy/org.apache.groovy-documented.gradle b/buildSrc/src/main/groovy/org.apache.groovy-documented.gradle
index c1d337b..c6231ce 100644
--- a/buildSrc/src/main/groovy/org.apache.groovy-documented.gradle
+++ b/buildSrc/src/main/groovy/org.apache.groovy-documented.gradle
@@ -55,7 +55,7 @@ tasks.withType(Javadoc).configureEach {
locale = 'en_US'
encoding = 'UTF-8'
version = true
- overview = rootProject.file('src/main/java/overviewj.html')
+ overview = project.relativePath(rootProject.file('src/main/java/overviewj.html'))
footer = 'Copyright © 2003-2021 The Apache Software Foundation. All rights reserved.'
source = sharedConfiguration.targetJavaVersion.get()
links('https://docs.oracle.com/javase/8/docs/api/',
diff --git a/buildSrc/src/main/groovy/org/apache/groovy/gradle/DistributionExtension.groovy b/buildSrc/src/main/groovy/org/apache/groovy/gradle/DistributionExtension.groovy
index 552562f..3e2794d 100644
--- a/buildSrc/src/main/groovy/org/apache/groovy/gradle/DistributionExtension.groovy
+++ b/buildSrc/src/main/groovy/org/apache/groovy/gradle/DistributionExtension.groovy
@@ -23,6 +23,7 @@ import org.gradle.api.Project
import org.gradle.api.file.CopySpec
import org.gradle.api.model.ObjectFactory
import org.gradle.api.provider.ListProperty
+import org.gradle.api.tasks.PathSensitivity
import javax.inject.Inject
@@ -48,8 +49,8 @@ class DistributionExtension {
def src = project.project(p).layout.projectDirectory.file(
"src/main/java/${className.replace('.', '/')}.java"
).asFile
- docgen.inputs.file(src)
- src.absolutePath
+ docgen.inputs.file(src).withPathSensitivity(PathSensitivity.RELATIVE)
+ project.relativePath(src)
}
)
}
diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml
index 4bc9451..98538ae 100644
--- a/gradle/verification-metadata.xml
+++ b/gradle/verification-metadata.xml
@@ -1,42 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<!--
- This file declares the dependency verification metadata for dependencies used by Groovy.
- When you upgrade a dependency, verification is likely to fail so you will need to update
- it.
-
- If, for whatever reason, verification fails for you, DO NOT DISABLE IT but follow the
- troubleshooting guide at https://docs.gradle.org/current/userguide/dependency_verification.html
-
- This build uses PGP verification and SHA512 checksum verification for unsigned artifacts:
-
- ./gradlew -write-verification-metadata sha512,pgp -export-keys <tasks>
-
- Then check the diff, remove the unnecessary entries (for old dependencies) and make sure
- the new ones are correct.
-
- Do not remove this header.
-
--->
<verification-metadata xmlns="https://schema.gradle.org/dependency-verification" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://schema.gradle.org/dependency-verification https://schema.gradle.org/dependency-verification/dependency-verification-1.0.xsd">
<configuration>
<verify-metadata>false</verify-metadata>
@@ -73,8 +35,10 @@
<trusting group="^org[.]apache($|([.].*))" regex="true"/>
<trusting group="org.apache.commons"/>
</trusted-key>
+ <trusted-key id="314fe82e5a4c5377bca2edec5208812e1e4a6db0" group="com.gradle"/>
<trusted-key id="31fae244a81d64507b47182e1b2718089ce964b8" group="com.thoughtworks.qdox" name="qdox" version="1.12.1"/>
<trusted-key id="32d98ffd50617f6ed7e6abd236feecf06c2da10b" group="biz.aQute.bnd" name="biz.aQute.bndlib" version="4.0.0"/>
+ <trusted-key id="34441e504a937f43eb0daef96a65176a0fb1cd0b" group="org.apache.groovy"/>
<trusted-key id="36390de6a0e61ee4c7b4ba02c1d3063467f1ebd1" group="org.asciidoctor"/>
<trusted-key id="3690c240ce51b4670d30ad1c38ee757d69184620" group="org.tukaani" name="xz" version="1.6"/>
<trusted-key id="416952b945b78a34c6c7678562ebfc78fe4156d1" group="org.jruby"/>
@@ -109,7 +73,6 @@
<trusted-key id="7615ad56144df2376f49d98b1669c4bb543e0445" group="com.google.errorprone"/>
<trusted-key id="7616eb882daf57a11477aaf559a252fb1199d873" group="com.google.code.findbugs" name="jsr305" version="3.0.2"/>
<trusted-key id="77993d3295698c46912e83984b2277c6358670ee" group="org.assertj" name="assertj-core" version="3.16.1"/>
- <trusted-key id="34441e504a937f43eb0daef96a65176a0fb1cd0b" group="org.apache.groovy"/>
<trusted-key id="7faa0f2206de228f0db01ad741321490758aad6f" group="org.codehaus.groovy"/>
<trusted-key id="82f833963889d7ed06f1e4dc6525fd70cc303655" group="org.apache.maven.shared" name="maven-filtering" version="1.1"/>
<trusted-key id="842afb86375d805422835bfd82b5574242c20d6f">
@@ -315,6 +278,11 @@
<sha512 value="58569ababcb2e54b8b140a6f44d898d31c88d454346787c4536bd25752a0ba8165d00d1f49977adbc66214aa27cfea2c338e7b75fa075ab6246685e54ce14b7d" origin="Generated by Gradle because artifact wasn't signed"/>
</artifact>
</component>
+ <component group="com.github.spotbugs" name="spotbugs-annotations" version="4.1.3">
+ <artifact name="spotbugs-annotations-4.1.3.jar">
+ <pgp value="9857c388d7d1d9d031274cd0a5def5a76f94a471"/>
+ </artifact>
+ </component>
<component group="com.github.spotbugs" name="spotbugs-annotations" version="4.1.4">
<artifact name="spotbugs-annotations-4.1.4.jar">
<pgp value="9857c388d7d1d9d031274cd0a5def5a76f94a471"/>
diff --git a/settings.gradle b/settings.gradle
index 36fcf16..224a197 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -19,14 +19,25 @@
import org.gradle.util.GradleVersion
plugins {
- id "com.gradle.enterprise" version "3.4.1"
+ id "com.gradle.enterprise" version "3.5.1"
+ id "com.gradle.common-custom-user-data-gradle-plugin" version "1.1.1"
}
gradleEnterprise {
buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
apply from: 'gradle/build-scans.gradle'
+ captureTaskInputFiles = true
+ tag 'ge-trial'
}
+
+ server = "https://54.229.163.175"
+ allowUntrustedServer = true
+}
+
+buildCache {
+ local { enabled = true }
+ remote(HttpBuildCache) {enabled = false }
}
def subprojects = [
diff --git a/subprojects/groovy-test/build.gradle b/subprojects/groovy-test/build.gradle
index 7c9d7eb..2849c08 100644
--- a/subprojects/groovy-test/build.gradle
+++ b/subprojects/groovy-test/build.gradle
@@ -41,7 +41,7 @@ groovyLibrary {
],
['META-INF/NOTICE', 'META-INF/INDEX.LIST'],
[
- (rootProject.file('notices/NOTICE-GROOIDJARJAR').absolutePath): 'META-INF/NOTICE'
+ (project.relativePath(rootProject.file('notices/NOTICE-GROOIDJARJAR'))): 'META-INF/NOTICE'
]
)
}