Skip to content

Commit 9cd4301

Browse files
committed
Add wrapper instructions for source dist
1 parent c286cc6 commit 9cd4301

File tree

5 files changed

+32
-16
lines changed

5 files changed

+32
-16
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,11 @@ For further information, please consult the [documentation](https://docs.grails.
110110

111111
## Building Grails
112112

113-
For building Grails, please consult the [CONTRIBUTING.md](CONTRIBUTING.md) file.
113+
For detailed building Grails, please consult the [CONTRIBUTING.md](CONTRIBUTING.md) file. To bootstrap the project from a source distribution, you can execute:
114+
115+
gradle wrapper
116+
117+
Then you can proceed with running any valid gradle command from [CONTRIBUTING.md](CONTRIBUTING.md).
114118

115119
## Licensing
116120

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ subprojects {
9191
}
9292

9393
apply {
94+
from layout.projectDirectory.file('gradle/gradle-wrapper-root-config.gradle')
9495
from layout.projectDirectory.file('gradle/publish-root-config.gradle')
9596
from layout.projectDirectory.file('gradle/rat-root-config.gradle')
9697
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
def props = new Properties()
20+
project.rootProject.layout.projectDirectory.file('.sdkmanrc').asFile.withInputStream {
21+
props.load(it)
22+
}
23+
tasks.withType(Wrapper).configureEach {
24+
gradleVersion = props.gradle
25+
}

gradle/rat-root-config.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ tasks.named('rat') {
2323
'CODE_OF_CONDUCT.md',
2424
'LICENSE',
2525
'NOTICE',
26+
'gradle/wrapper/gradle-wrapper.properties', // gradle wrapper excluded from src zip
2627
'**/build/**', // Gradle generated build directories
2728
'**/.gradle/**', '**/wrapper/**', 'gradlew*', // gradle wrapper files excluded from src zip
2829
'**/*.html', // html files are only in test

gradle/wrapper/gradle-wrapper.properties

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,3 @@
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-
161
distributionBase=GRADLE_USER_HOME
172
distributionPath=wrapper/dists
183
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip

0 commit comments

Comments
 (0)