multiple main classes?
Hi
Again me.. :) .. is it possible to have multiple mainClass(es) ? Well I've got several stylesheet (.css files) in my project and each should have an own ouput (swf file).
Something like the jar task ...
task sourceJar1(type: Jar) {
baseName = 'ivypublishSource1'
from sourceSets.main.java
}
task sourceJar2(type: Jar) {
baseName = 'ivypublishSource2'
from sourceSets.main.java
}
which generates to jar archives with different names.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac
Support Staff 1 Posted by Yennick Trevels on 19 Oct, 2011 06:30 AM
You can only have one mainClass per project, so I'm afraid this isn't possible. The only solution I can think of is to create a seperate project per css file, which is probably a bit overkill.
Support Staff 2 Posted by Yennick Trevels on 19 Oct, 2011 07:37 AM
Now that I think about it, there's probably another (manual) solution. You could create a custom task where you execute the mxmlc ant task like we do in our AbstractMxmlcTask, something like this:
task compileCss() { ant.java(jar: project.flexHome + '/lib/mxmlc.jar', dir: project.flexHome + '/frameworks', fork: true) { arg(value: '-output=${project.buildDir.path}/myCss.swf') arg(value: '${project.file(/src/main/actionscript/assets).absolutePath}/myCss.css') } } }3 Posted by Cyrill on 23 Oct, 2011 09:47 PM
Thanks a lot it worked for me.. except that i had to write it like this. With your version it could not replace the variable ${proejct.buildDir.path}
task compileCss() {
ant.java(jar: project.flexHome + '/lib/mxmlc.jar',
dir: project.flexHome + '/frameworks',
fork: true) {
arg(value: "-output=${project.buildDir.path}/myCss.swf")
arg(value: "${project.file('/src/main/actionscript/assets').absolutePath}/myCss.css")
}
}
}
Yennick Trevels closed this discussion on 24 Oct, 2011 06:08 AM.