File tree Expand file tree Collapse file tree 4 files changed +49
-2
lines changed Expand file tree Collapse file tree 4 files changed +49
-2
lines changed Original file line number Diff line number Diff line change 2020apply plugin : ' com.github.hierynomus.license-report'
2121
2222List<String > licenseExclusions = rootProject. subprojects. collect {
23- " org.grails:${ it.name} :${ rootProject.projectVersion} " as String
23+ " org.apache. grails:${ it.findProperty('pomArtifactId') ?: it.name} :${ rootProject.projectVersion} " as String
2424}
2525
2626downloadLicenses {
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ file('../gradle.properties').withInputStream {
2828}
2929
3030ext {
31+ isReproducibleBuild = System . getenv(" SOURCE_DATE_EPOCH" ) != null
3132 buildInstant = java.util.Optional . ofNullable(System . getenv(' SOURCE_DATE_EPOCH' ))
3233 .map(Long ::parseLong)
3334 .map(Instant ::ofEpochSecond)
4142
4243allprojects {
4344 props. forEach { k , v ->
44- if (! project. hasProperty(k as String )) {
45+ if (! project. hasProperty(k as String )) {
4546 project. ext. set(k as String , v)
4647 }
4748 }
@@ -72,6 +73,18 @@ allprojects {
7273 }
7374}
7475
76+ subprojects {
77+ configurations. configureEach {
78+ resolutionStrategy {
79+ def cacheHours = isCiBuild || isReproducibleBuild ? 0 : 24
80+ cacheDynamicVersionsFor(cacheHours, ' hours' )
81+ cacheChangingModulesFor(cacheHours, ' hours' )
82+ }
83+ }
84+
85+ apply from : rootProject. layout. projectDirectory. file(' gradle/dependency-licenses.gradle' )
86+ }
87+
7588apply {
7689 // we must apply the publish configuration first or the docs config will not work
7790 from layout. projectDirectory. file(' gradle/publish-root-config.gradle' )
Original file line number Diff line number Diff line change @@ -64,6 +64,10 @@ configurations.configureEach {
6464}
6565
6666dependencies {
67+ implementation " gradle.plugin.com.hierynomus.gradle.plugins:license-gradle-plugin:${ rootProperties.gradleLicensePluginVersion} " , {
68+ // Due to https://github.com/hierynomus/license-gradle-plugin/issues/161, spring must be excluded
69+ exclude group : ' org.springframework' , module : ' spring-core'
70+ }
6771 implementation " io.micronaut.build.internal:micronaut-gradle-plugins:$micronautGradlePlugins "
6872 implementation " com.fizzed:rocker-compiler:$rockerVersion "
6973 implementation " com.fasterxml.jackson.core:jackson-databind:$jacksonDatabindVersion "
Original file line number Diff line number Diff line change 1+ /*
2+ * Licensed to the Apache Software Foundation (ASF) under one
3+ * or more contributor license agreements. See the NOTICE file
4+ * distributed with this work for additional information
5+ * regarding copyright ownership. The ASF licenses this file
6+ * to you under the Apache License, Version 2.0 (the
7+ * "License"); you may not use this file except in compliance
8+ * with the License. You may obtain a copy of the License at
9+ *
10+ * https://www.apache.org/licenses/LICENSE-2.0
11+ *
12+ * Unless required by applicable law or agreed to in writing,
13+ * software distributed under the License is distributed on an
14+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+ * KIND, either express or implied. See the License for the
16+ * specific language governing permissions and limitations
17+ * under the License.
18+ */
19+
20+ apply plugin : ' com.github.hierynomus.license-report'
21+
22+ List<String > licenseExclusions = rootProject. subprojects. collect {
23+ " org.apache.grails:${ it.findProperty('pomArtifactId') ?: it.name} :${ rootProject.projectVersion} " as String
24+ }
25+
26+ downloadLicenses {
27+ includeProjectDependencies = true
28+ dependencyConfiguration = ' runtimeClasspath'
29+ excludeDependencies = licenseExclusions
30+ }
You can’t perform that action at this time.
0 commit comments