Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
47 lines (38 sloc) 1.72 KB
import org.apache.tools.ant.filters.ReplaceTokens
task copyScript(type: Copy) {
into "$buildDir/"
into('scripts') {
from("../grails-resources/src/grails/home/bash/startGrails") {
rename 'startGrails', 'grailsw'
}
from("../grails-resources/src/grails/home/bash/startGrails.bat") {
rename 'startGrails.bat', 'grailsw.bat'
}
filter(ReplaceTokens, tokens: ['starter.main.class': 'org.grails.wrapper.GrailsWrapper'])
filter(ReplaceTokens, tokens: ['starter.classpath': '@wrapperDir@/grails-wrapper-runtime-@grailsVersion@.jar:@wrapperDir@:.'])
filter(ReplaceTokens, tokens: ['agent.string': '-javaagent:@wrapperDir@/springloaded-core-@springLoadedVersion@.jar -noverify -Dspringloaded=$SPRINGLOADED_PARAMS'])
filter(ReplaceTokens, tokens: ['startup.command': 'startGrails $STARTER_MAIN_CLASS "$@"'])
filter(ReplaceTokens, tokens: ['windows.starter.classpath': '@wrapperDir@/grails-wrapper-runtime-@grailsVersion@.jar;@wrapperDir@;.'])
filter(ReplaceTokens, tokens: ['windows.agent.string': "-javaagent:@wrapperDir@/springloaded-core-@springLoadedVersion@.jar -noverify -Dspringloaded=%SPRINGLOADED_PARAMS%".toString()])
fileMode = 0755
}
}
task runtimeJar(type: Jar) {
// TODO
from('build/classes/main')
}
jar {
from runtimeJar
from "${buildDir}/scripts", {
filter org.apache.tools.ant.filters.ReplaceTokens, tokens: [springLoadedVersion: springLoadedVersion, grailsVersion: grailsVersion]
}
// TODO
exclude 'org/**'
}
//supportJar.appendix = 'wrapper-support'
jar.appendix = 'wrapper-support'
runtimeJar.appendix = 'wrapper-runtime'
artifacts {
runtime /*supportJar,*/ runtimeJar
}
jar.dependsOn copyScript
Jump to Line
Something went wrong with that request. Please try again.