Skip to content

Commit 8b78f79

Browse files
authored
Merge pull request #15114 from jdaugherty/7.0.x
Centralizing Gradle Logic
2 parents 920294b + be3829d commit 8b78f79

File tree

141 files changed

+1587
-1105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+1587
-1105
lines changed

.github/workflows/groovy-joint-workflow.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ jobs:
153153
path: ~/.m2/repository
154154
key: cache-local-maven-${{ github.sha }}
155155
- name: "🪶 Add mavenLocal repository to build"
156-
run: sed -i 's|// mavenLocal() // Keep|mavenLocal() // Keep|' build.gradle
156+
run: |
157+
sed -i 's|// mavenLocal() // Keep|mavenLocal() // Keep|' settings.gradle
157158
- name: 'Swap Groovy Version'
158159
run: |
159160
sed -i "/['\"]groovy\.version['\"][[:space:]]*:/c\'groovy.version':'${{ needs.build_groovy.outputs.groovyVersion }}'," dependencies.gradle

UPGRADE7.md

Lines changed: 0 additions & 52 deletions
This file was deleted.

build-logic/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!--
2+
SPDX-License-Identifier: Apache-2.0
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
https://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
-->
16+
# build-logic
17+
The Grails project is structured into 3 separate composite builds. Composite builds make use of Gradle's `includeBuild` feature, which do not share Gradle plugins from `buildSrc`. This project exists to share internal Gradle plugins across all 3 separate builds.
18+

build-logic/build.gradle

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
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+
plugins {
21+
id 'groovy-gradle-plugin'
22+
}
23+
24+
apply {
25+
from file('../dependencies.gradle')
26+
}
27+
28+
repositories {
29+
// mavenLocal()
30+
mavenCentral()
31+
gradlePluginPortal()
32+
maven {
33+
url = 'https://repository.apache.org/content/groups/snapshots'
34+
content {
35+
includeVersionByRegex('org[.]apache[.]grails[.]gradle.*', '.*', '.*-SNAPSHOT')
36+
}
37+
}
38+
maven {
39+
url = 'https://central.sonatype.com/repository/maven-snapshots'
40+
content {
41+
includeVersionByRegex('cloud[.]wondrify.*', '.*', '.*-SNAPSHOT')
42+
}
43+
mavenContent {
44+
snapshotsOnly()
45+
}
46+
}
47+
maven {
48+
url = 'https://repository.apache.org/content/groups/staging'
49+
content {
50+
includeModuleByRegex('org[.]apache[.]grails[.]gradle', 'grails-publish')
51+
}
52+
mavenContent {
53+
releasesOnly()
54+
}
55+
}
56+
}
57+
58+
file('../gradle.properties').withInputStream {
59+
Properties props = new Properties()
60+
props.load(it)
61+
project.ext.gradleProperties = props
62+
}
63+
64+
version = '0.0.1'
65+
group = 'org.apache.grails.buildsrc'
66+
67+
dependencies {
68+
implementation "${gradleBomDependencies['grails-publish-plugin']}"
69+
implementation "org.gradle.crypto.checksum:org.gradle.crypto.checksum.gradle.plugin:${gradleProperties.gradleChecksumPluginVersion}"
70+
implementation "org.cyclonedx.bom:org.cyclonedx.bom.gradle.plugin:${gradleProperties.gradleCycloneDxPluginVersion}"
71+
}
72+
73+
gradlePlugin {
74+
plugins {
75+
publishPlugin {
76+
id = 'org.apache.grails.buildsrc.publish'
77+
implementationClass = 'org.apache.grails.buildsrc.PublishPlugin'
78+
}
79+
sbomPlugin {
80+
id = 'org.apache.grails.buildsrc.sbom'
81+
implementationClass = 'org.apache.grails.buildsrc.SbomPlugin'
82+
}
83+
}
84+
}

build-logic/gradle.properties

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
org.gradle.caching=true
17+
org.gradle.daemon=true
18+
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx1536M
42.7 KB
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)