Skip to content

Instantly share code, notes, and snippets.

@xconnecting
Created July 3, 2013 05:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xconnecting/5915669 to your computer and use it in GitHub Desktop.
Save xconnecting/5915669 to your computer and use it in GitHub Desktop.
[Gradle] JSmooth Sample
apply plugin: 'groovy'
apply plugin: 'eclipse'
archivesBaseName = 'myapp'
ext.jsmoothHome = 'C:/program Files/JSmooth 0.9.9-7'
configurations { jsmooth }
repositories{
flatDir dirs: "${jsmoothHome}/lib"
}
dependencies{
groovy localGroovy()
jsmooth 'net.charabia:jsmoothgen-ant:@jar'
}
jar {
copy {
from configurations.runtime
into "lib"
}
def manifestClasspath = configurations.compile.collect{ 'lib/' + it.getName() }.join(' ')
manifest {
attributes "Main-Class" : "com.example.Main"
attributes 'Class-Path': manifestClasspath
}
from (configurations.compile.resolve().collect { it.isDirectory() ? it : fileTree(it) }) {
exclude 'META-INF/MANIFEST.MF'
exclude 'META-INF/*.SF'
exclude 'META-INF/*.DSA'
exclude 'META-INF/*.RSA'
exclude '**/*.jar'
}
}
build << {
ant.copy(file: 'build/libs/myapp.jar', todir: '.')
}
task jsmooth << {
def basedir = '.'
ant.taskdef(name:'jsmoothgen'
,classpath:configurations.jsmooth.asPath
, classname:"net.charabia.jsmoothgen.ant.JSmoothGen"
)
ant.jsmoothgen(project:"myapp.jsmooth"
,skeletonroot:"${jsmoothHome}/skeletons"
)
}
jsmooth.dependsOn(build)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment