Skip to content

Adds updated wrapper jars for grails 3 and 4 #196

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 1 commit into from
Jun 10, 2021
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
Binary file not shown.
1 change: 1 addition & 0 deletions assets/files/wrapper-issue7/grails3/grails-wrapper.jar.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
121f9336c8933a2ada9bd236d10fb876 grails-wrapper.jar
Binary file not shown.
1 change: 1 addition & 0 deletions assets/files/wrapper-issue7/grails4/grails-wrapper.jar.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f41358fa6f48c8e84d50ca88702aed37 grails-wrapper.jar
16 changes: 16 additions & 0 deletions buildSrc/src/main/groovy/org/grails/gradle/CopyAssetsTask.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class CopyAssetsTask extends DefaultTask {
static final String[] JAVASCRIPT_EXTENSIONS = ["*.js"] as String[]
static final String[] CSS_EXTENSIONS = ["*.css"] as String[]
static final String[] IMAGE_EXTENSIONS = ["*.ico", "*.png", "*.svg", "*.jpg", "*.jpeg", "*.gif"]
static final String[] FILE_EXTENSIONS = ["*.jar", "*.md5"]

@InputDirectory
final Property<File> assets = project.objects.property(File)
Expand All @@ -29,6 +30,7 @@ class CopyAssetsTask extends DefaultTask {
copyCss()
copyJavascripts()
copyFonts()
copyFiles()
}

File dist() {
Expand Down Expand Up @@ -96,4 +98,18 @@ class CopyAssetsTask extends DefaultTask {
}
})
}

void copyFiles() {
File outputFiles = new File(dist().absolutePath + '/files')
outputFiles.mkdir()
File files = new File(assets.get().absolutePath + '/files')
project.copy(new Action<CopySpec>() {
@Override
void execute(CopySpec copySpec) {
copySpec.from(files)
copySpec.into(outputFiles)
copySpec.include(recursiveIncludes(FILE_EXTENSIONS))
}
})
}
}