Skip to content

Automate grailsw distribution #14696

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
May 2, 2025
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
3 changes: 3 additions & 0 deletions grails-profiles/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*/skeleton/grailsw
*/skeleton/grailsw.bat
*/skeleton/grails-wrapper.jar
20 changes: 20 additions & 0 deletions grails-profiles/base/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,26 @@ dependencies {
profileRuntimeApi project(':grails-shell-cli')
}

TaskProvider<Copy> copyWrapper = tasks.register('copyGrailsWrapperScripts', Copy)
copyWrapper.configure { Copy copy ->
Project wrapperProject = rootProject.project(':grails-wrapper')
copy.dependsOn(wrapperProject.tasks.named('installDist'))
copy.from(wrapperProject.layout.buildDirectory.dir('install/grails-wrapper'))
copy.into(project.layout.projectDirectory.dir('skeleton'))
}

tasks.named('sourcesProfileJar').configure {
it.dependsOn(copyWrapper)
}

tasks.named('processProfileResources').configure {
it.dependsOn(copyWrapper)
}

tasks.named('compileProfile').configure {
it.dependsOn(copyWrapper)
}

apply {
from rootProject.layout.projectDirectory.file('gradle/publish-config.gradle')
}
Binary file removed grails-profiles/base/skeleton/grails-wrapper.jar
Binary file not shown.
152 changes: 0 additions & 152 deletions grails-profiles/base/skeleton/grailsw

This file was deleted.

89 changes: 0 additions & 89 deletions grails-profiles/base/skeleton/grailsw.bat

This file was deleted.

20 changes: 20 additions & 0 deletions grails-profiles/profile/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,26 @@ dependencies {
profileRuntimeOnly project(':grails-profiles-base')
}

TaskProvider<Copy> copyWrapper = tasks.register('copyGrailsWrapperScripts', Copy)
copyWrapper.configure { Copy copy ->
Project wrapperProject = rootProject.project(':grails-wrapper')
copy.dependsOn(wrapperProject.tasks.named('installDist'))
copy.from(wrapperProject.layout.buildDirectory.dir('install/grails-wrapper'))
copy.into(project.layout.projectDirectory.dir('skeleton'))
}

tasks.named('sourcesProfileJar').configure {
it.dependsOn(copyWrapper)
}

tasks.named('processProfileResources').configure {
it.dependsOn(copyWrapper)
}

tasks.named('compileProfile').configure {
it.dependsOn(copyWrapper)
}

apply {
from rootProject.layout.projectDirectory.file('gradle/publish-config.gradle')
}
Binary file removed grails-profiles/profile/skeleton/grails-wrapper.jar
Binary file not shown.
Loading
Loading