Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
#### Build Status
- [![Java CI](https://github.com/grails/grails-wrapper/actions/workflows/gradle.yml/badge.svg?event=push)](https://github.com/grails/grails-wrapper/actions/workflows/gradle.yml)

Update to the latest wrapper release based on Grails version
---

./grailsw update-wrapper

Versions
---

Expand All @@ -11,5 +16,5 @@ Versions
| 5.0.0 - 5.3.3 | [3.0.0.M1](https://github.com/grails/grails-wrapper/releases) |
| 5.3.4 - 5.3.X | [3.1.0](https://github.com/grails/grails-wrapper/releases) |
| 6.x.x | [4.0.0](https://github.com/grails/grails-wrapper/releases) |
| 7.x.x | [5.0.0](https://github.com/grails/grails-wrapper/releases) |
| 7.x.x | [5.0.x](https://github.com/grails/grails-wrapper/releases) |

4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
projectVersion=5.0.2-SNAPSHOT
grailsVersion=7.0.0-SNAPSHOT
grailsGradlePluginVersion=7.0.0-SNAPSHOT
groovyVersion=4.0.22
springBootVersion=3.2.6
groovyVersion=4.0.23
springBootVersion=3.3.4
grailsShellVersion=7.0.0-SNAPSHOT
8 changes: 7 additions & 1 deletion starter/src/main/java/grails/init/Start.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,15 @@ public static void main(String[] args) {
Authenticator.setDefault(new SystemPropertiesAuthenticator());

try {
if (!NO_VERSION_JAR.exists()) {
if (!NO_VERSION_JAR.exists() || (args.length > 0 && args[0].trim().equals("update-wrapper"))) {
System.out.println("Updating Grails wrapper jar to version: " + getVersion() + " located in: " + NO_VERSION_JAR.getAbsolutePath());
updateJar(getVersion());
// remove "update-wrapper" command argument
if(args.length > 0) {
args[0] = null;
}
}

URLClassLoader child = new URLClassLoader(new URL[]{NO_VERSION_JAR.toURI().toURL()});
Class<?> classToLoad = Class.forName("grails.init.RunCommand", true, child);
Method main = classToLoad.getMethod("main", String[].class);
Expand Down