the 'swc' task is actually a TaskHelper and requires a configured
ProjectModel to work properly. You should switch and use the compc
tasks directly. Probably something more like:
compc :swc do |t|
t.input "VideoScreen"
t.source_path << 'src'
t.include_classes << "com.nikitadudnik.minivideoplayer.view.VideoScreen "
t.include_classes << "com.nikitadudnik.minivideoplayer.view.IVideoScreen"
end
This is assuming you have a folder named 'src' and a main file at:
'src/VideoScreen.as'. This main file should have references to other
classes that you want included in your library.
Here's the rdoc for the COMPCTask:
http://projectsprouts.org/rdoc/classes/Sprout/COMPCTask.html
And here are the rest of 'em:
http://projectsprouts.org/rdoc/
Thanks,
Luke
t.include_classes << "com.nikitadudnik.minivideoplayer.view.VideoScreen "
Should be:
t.include_classes << "com.nikitadudnik.minivideoplayer.view.VideoScreen"
Thanks,
Luke
You may have just hit a notorious and frustrating snag - the rake
tasks don't have a file dependency on the rakefile itself. So if you
edit the rakefile, you'll want to run 'rake clean' in order to be sure
your tasks all execute from scratch.
You can also chain rake commands, so when I'm working out details in
my rakefile, I'll often run:
rake clean [taskname]
In your case, this would be:
rake clean swc
Once you get the compile task to execute, you should see it output in
the terminal exactly as if you had entered it by hand. You can
sometimes debug issues by copying this string and editing it.
Thanks,
Luke
As it turns out, you discovered a pretty major problem with our COMPCTask.
COMPC wasn't working properly if you used any of the params that
aren't implemented by MXMLC.
I just released an update to the as3 bundle and the main sprout gem
that should support your use case as follows:
compc 'bin/SomeProject.swc' do |t|
t.include_classes << 'com.foo.SomeClass'
t.include_classes << 'com.foo.OtherClass'
t.include_classes << 'com.foo.YetAnotherClass'
... more params here
end
Basically, because COMPC extends MXMLC, the 'input' field was being
printed before any params defined by compc and throwing an error that
talked about 'interspersed default options'.
Additionally - we were to_shell-ing the include_classes param
inappropriately. The fix includes the ability to apply a proc to the
add_param field for serialization.
Thanks for finding this!
You should be able to update with:
sudo gem update sprout-as3-bundle
Thanks!
Luke Bayes